ProxioDev / ValioBungee

Synchronize players data between BungeeCord / Velocity proxies
Eclipse Public License 1.0
202 stars 52 forks source link

proxy seconds behind! (Time not synchronized or server down?) spamming console #1

Closed TheMagBum closed 3 years ago

TheMagBum commented 3 years ago

i have this error since some times: 13:23:35 [SEVERE] [RedisBungee] proxy-1_ZPu1cV is 15971 seconds behind! (Time not synchronized or server down?) the server is offline and i will that it is offline

ghost commented 3 years ago

what do you mean by "the server is offline and i will that it is offline"?

TheMagBum commented 3 years ago

i have turn off the server, but the error come too

ghost commented 3 years ago

have you turned off the server nicely, with "end" command?

TheMagBum commented 3 years ago

No, I think the server was frozen and I terminated it

ghost commented 3 years ago

in that case it is normal, you need to stop it nicely in order to not have these warnings

TheMagBum commented 3 years ago

The problem is that I am using Redis with a cloud and I can't recreate the serverid

ghost commented 3 years ago

I see, let's see what @ham1255 thinks about this

ham1255 commented 3 years ago

Never seen this error before, make sure your system time is right + and shutdown every bungee cord nicely

ham1255 commented 3 years ago

and also you could ignore this since this isn't harmful i think btw will check code if there some changes needed.

mattmalec commented 3 years ago

I've seen this before with my Kubernetes infrastructure. It occurs when RedisBungee doesn't have the chance to remove itself from the "heartbeats" key in the Redis server (i.e. not safely shutting down the server, a SIGKILL, etc.)

A heartbeat object is JSON formatted and looks like: { "server-id-1": "last-heartbeat-time", "server-id-2": "last-heartbeat-time", "server-id-3": "last-heartbeat-time" } and etc.

You could fix this by either removing the key of the offending server from that object or by completely deleting the heartbeats key from Redis. You should restart all your proxies for data consistency if you remove the heartbeat key entirely, but it's not necessary if you remove the offending server from the object.

As a more permanent fix, a config option that removes any server that have missed the heartbeat after X amount of seconds would be nice to see. Let me know if you'd like me to PR that addition.

Hope this helps. Thanks!

ham1255 commented 3 years ago

Thanks for info!

ham1255 commented 3 years ago

I've seen this before with my Kubernetes infrastructure. It occurs when RedisBungee doesn't have the chance to remove itself from the "heartbeats" key in the Redis server (i.e. not safely shutting down the server, a SIGKILL, etc.)

A heartbeat object is JSON formatted and looks like:

`{

"server-id-1": "last-heartbeat-time",

"server-id-2": "last-heartbeat-time",

"server-id-3": "last-heartbeat-time"

}`

and etc.

You could fix this by either removing the key of the offending server from that object or by completely deleting the heartbeats key from Redis. You should restart all your proxies for data consistency if you remove the heartbeat key entirely, but it's not necessary if you remove the offending server from the object.

As a more permanent fix, a config option that removes any server that have missed the heartbeat after X amount of seconds would be nice to see. Let me know if you'd like me to PR that addition.

Hope this helps. Thanks!

But this kind of thing is harmless but if it causing issues please tell me!

ham1255 commented 3 years ago

And also when that error happens what i can do is delete the server

mattmalec commented 3 years ago

RedisBungee updates its heartbeat every 3 seconds to ensure the Redis server hasn't just randomly died. If its unable to update the heartbeat, it could be that a server has lost its connection to Redis, or simply that the server wasn't shutdown safely.

ham1255 commented 3 years ago

i made pull request try it

2