Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Redis connection not reinstated on connection failure.

Đang mở
#834 10 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, redis
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu với RedisDataSource.java, đặc biệt là get0, và xem xét cách cấu hình Redis PSN dùng chung tạo và sử dụng kết nối của nó. Tái hiện lỗi máy chủ không hoạt động được mô tả trong issue, sau đó xác minh rằng một lần đọc Redis tiếp theo sẽ khôi phục kết nối mà không yêu cầu /reloadalias.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

CMDHELPER-2829 - Reported by CyaNox

After having the test server idle for a while (no scripts calling any PSN calls that would store in the Redis PSN) the following error popped up once it tried to retrieve a value from the Redis PSN:

The line in question is nothing wrong with as it works perfectly fine after boot up and also after a /reloadalias but for completeness sake I'll add the line of code as well:

  ...
  @g = get_value('redis.permissions.' . @where . 's') # @@@ The line that initiated the error @@@
  ...

The error:

20:51:15 [INFO] IOException: com.laytonsmith.libs.redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe
        proc _permissions_permission_ex:/.../Permissions.inc.ms:159
        proc _permissions_add_permission_to_group:/.../Permissions.inc.ms:194
        <<main code>>:/.../Permissions.msa:16

20:51:15 [SEVERE] The previous MethodScript error had an attached cause:
20:51:15 [SEVERE] com.laytonsmith.persistance.DataSourceException: com.laytonsmith.libs.redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe
20:51:15 [SEVERE]       at com.laytonsmith.persistance.RedisDataSource.get0(RedisDataSource.java:112)
20:51:15 [SEVERE]       at com.laytonsmith.persistance.AbstractDataSource.get(AbstractDataSource.java:68)
20:51:15 [SEVERE]       at com.laytonsmith.persistance.PersistanceNetwork.get(PersistanceNetwork.java:110)
20:51:15 [SEVERE]       at com.laytonsmith.core.functions.Persistance$get_value.exec(Persistance.java:151)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.eval(Script.java:310)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.eval(Script.java:272)
20:51:15 [SEVERE]       at com.laytonsmith.core.Procedure.execute(Procedure.java:191)
20:51:15 [SEVERE]       at com.laytonsmith.core.Procedure.cexecute(Procedure.java:149)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.eval(Script.java:239)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.eval(Script.java:272)
20:51:15 [SEVERE]       at com.laytonsmith.core.Procedure.execute(Procedure.java:194)
20:51:15 [SEVERE]       at com.laytonsmith.core.Procedure.cexecute(Procedure.java:149)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.eval(Script.java:239)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.seval(Script.java:210)
20:51:15 [SEVERE]       at com.laytonsmith.core.Procedure.cexecute(Procedure.java:147)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.eval(Script.java:239)
20:51:15 [SEVERE]       at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1494)
20:51:15 [SEVERE]       at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1454)
20:51:15 [SEVERE]       at com.laytonsmith.core.Script.run(Script.java:164)
20:51:15 [SEVERE]       at com.laytonsmith.core.AliasCore.alias(AliasCore.java:150)
20:51:15 [SEVERE]       at com.laytonsmith.commandhelper.CommandHelperServerListener.onServerCommand(CommandHelperServerListener.java:41)
20:51:15 [SEVERE]       at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
20:51:15 [SEVERE]       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
20:51:15 [SEVERE]       at java.lang.reflect.Method.invoke(Method.java:606)
20:51:15 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
20:51:15 [SEVERE]       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
20:51:15 [SEVERE]       at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30)
20:51:15 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:478)
20:51:15 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:463)
20:51:15 [SEVERE]       at net.minecraft.server.v1_6_R3.DedicatedServer.as(DedicatedServer.java:272)
20:51:15 [SEVERE]       at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:241)
20:51:15 [SEVERE]       at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:493)
20:51:15 [SEVERE]       at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:425)
20:51:15 [SEVERE]       at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
20:51:15 [SEVERE] Caused by: com.laytonsmith.libs.redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe
20:51:15 [SEVERE]       at com.laytonsmith.libs.redis.clients.jedis.Connection.flush(Connection.java:66)
20:51:15 [SEVERE]       at com.laytonsmith.libs.redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:180)
20:51:15 [SEVERE]       at com.laytonsmith.libs.redis.clients.jedis.Connection.getBulkReply(Connection.java:171)
20:51:15 [SEVERE]       at com.laytonsmith.libs.redis.clients.jedis.Jedis.get(Jedis.java:67)
20:51:15 [SEVERE]       at com.laytonsmith.persistance.RedisDataSource.get0(RedisDataSource.java:109)
20:51:15 [SEVERE]       ... 33 more
20:51:15 [SEVERE] Caused by: java.net.SocketException: Broken pipe
20:51:15 [SEVERE]       at java.net.SocketOutputStream.socketWrite0(Native Method)
20:51:15 [SEVERE]       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
20:51:15 [SEVERE]       at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
20:51:15 [SEVERE]       at com.laytonsmith.libs.redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:29)
20:51:15 [SEVERE]       at com.laytonsmith.libs.redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:227)
20:51:15 [SEVERE]       at com.laytonsmith.libs.redis.clients.jedis.Connection.flush(Connection.java:64)
20:51:15 [SEVERE]       ... 37 more

Relevant PSN config:

$shared=redis://localhost:6379?timeout=90&password=pass

# Shared
storage.redis.**=$shared
Ngôn ngữ chính
Java
Star
128
Fork
70
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của EngineHub/CommandHelper

Tất cả issue của EngineHub/CommandHelper

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.