Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Redis connection not reinstated on connection failure.

Offen
#834 10 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
java, redis
Bereich
databases

Rechercherichtung

Beginne mit RedisDataSource.java, insbesondere mit get0, und überprüfe, wie die gemeinsam genutzte Redis-PSN-Konfiguration ihre Verbindung erstellt und verwendet. Reproduziere den im Issue beschriebenen Fehler bei einem inaktiven Server und verifiziere anschließend, dass ein nachfolgender Redis-Lesevorgang die Verbindung wiederherstellt, ohne dass /reloadalias erforderlich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
Java
Sterne
128
Forks
70
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus EngineHub/CommandHelper

Alle Issues in EngineHub/CommandHelper

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.