Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection loss leads to breakage of the plugin #12

Open
Folas1337 opened this issue Nov 27, 2024 · 3 comments
Open

Connection loss leads to breakage of the plugin #12

Folas1337 opened this issue Nov 27, 2024 · 3 comments

Comments

@Folas1337
Copy link

What is happening?

If wherever the plugin is running loses connection to the redis server, it'll leave the plugin in a state where it's unusable.

What did you expect to happen?

I would like the plugin to attempt reconnecting if the connection ever breaks so it can recover into a healthy state after the lost connection is re-established.

Version

build 90 of ConnectorPlugin

Config

# Plugin debugging
debug: true

# Currently supported types:
# - "plugin_messages" (will not be able to send messages from server without any players online)
# - "redis" (does not require online players)
# - "mqtt" (does not require online players)
messenger-type: redis

# The group this server is in
group: global

# Put specific plugins into different groupings
plugin-groups:
  pluginname: specialgroup

# Should be the same name as in the proxy config
server-name: ... redacted ...

# Redis messenger settings
redis:
  host: ... redacted ...
  port: 6379
  db: 0
  timeout: 60
  password: ... redacted ...

# Mqtt messenger settings
mqtt:
  broker-uri: tcp://localhost:1883
  keep-alive: 30
  username: mqttuser
  password: password1

Server/system Version

Paper version 1.21.3-65-master@7e789e8

Log

There are a couple lines reading like this:
[06:12:57] [lettuce-nioEventLoop-4-3/WARN] [de.themoep.connectorplugin.lib.lettuce.core.protocol.ConnectionWatchdog]: Cannot reconnect to [... redacted .../<unresolved>:6379]: ... redacted ...

What other programs/plugins are you running?

Lots but they should have very little to do with this bug/request

Additional context

No response

@Folas1337
Copy link
Author

Oh and I had the same issue with https://github.com/Hexaoxide/Carbon and @Draycia already responded, saying the solution might be to use jedispool and even though I do not know what that even is, you can potentially look at https://github.com/ProxioDev/ValioBungee which seems to do just that :)

@Phoenix616
Copy link
Owner

Phoenix616 commented Nov 28, 2024

I never had issues with that myself (I use redis too) but I will do some testing to see if the automatic reconnect is actually not working correctly.

But just fyi: This plugin uses lettuce to handle connecting to redis, not jedis so a solution which was used for plugins that use jedis wouldn't work. ;)

@Folas1337
Copy link
Author

Oh yeah, maybe one specific thing to reproduce my scenario:

  • I have ConnectorPlugin on a backend server as well as on a velocity proxy
  • The backend server did not lose connection to the Redis server but the velocity proxy did

I hope that helps track down the issue more easily :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants