Bungee - Spigot Automatic Server Reconnect (Bungee-Reconnect) 1.3.5

Automatically reconnects players when a server goes down or restarts

  1. [19:43:28] [Netty Worker IO Thread #2/WARN]: [ip|IllegalAcces] <-> DownstreamBridge <-> [Survival-1] - bad packet ID, are mods in use!? Couldn't read all bytes from a packet. For more information, launch Waterfall with -Dwaterfall.packet-decode-logging=true
    [19:43:28] [Netty Worker IO Thread #2/INFO] [Reconnect] [FINE]: [ip|IllegalAcces] <-> DownstreamBridge <-> [Survival-1] exception thrown on this bridge for user "IllegalAcces"
    io.netty.handler.codec.DecoderException: net.md_5.bungee.protocol.BadPacketException: Couldn't read all bytes from a packet. For more information, launch Waterfall with -Dwaterfall.packet-decode-logging=true
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[waterfall.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:e6526b1:445]
    at java.lang.Thread.run(Thread.java:831) [?:?]
    Caused by: net.md_5.bungee.protocol.BadPacketException: Couldn't read all bytes from a packet. For more information, launch Waterfall with -Dwaterfall.packet-decode-logging=true
    [19:43:28] [Netty Worker IO Thread #2/INFO] [Reconnect]: Reconnecting "IllegalAcces" to "Survival-1"
    [19:43:28] [Netty Worker IO Thread #2/INFO] [Reconnect] [FINE]: starting reconnecter for "IllegalAcces" will be waiting for: 10000
    [19:43:28] [Netty Worker IO Thread #2/INFO]: [ip|IllegalAcces] <-> DownstreamBridge <-> [Survival-1] has disconnected
    [19:43:38] [Reconnect Pool Thread #0/INFO] [Reconnect] [FINE]: Reconnecter running
    [19:43:38] [Reconnect Pool Thread #0/INFO] [Reconnect] [FINE]: Reconnecter enqueuing for attempt
    [19:43:38] [Reconnect Pool Thread #0/INFO] [Reconnect] [FINE]: Reconnecter connecting...
    [19:43:38] [Reconnect Pool Thread #0/INFO] [Reconnect] [FINE]: Reconnecter connection established.
    [19:43:38] [Netty Worker IO Thread #2/INFO]: [IllegalAcces|ip] <-> ServerConnector [Survival-1] has connected
    [19:43:38] [Reconnect Pool Thread #2/INFO] [Reconnect] [FINE]: Reconnecter running
    [19:43:38] [Reconnect Pool Thread #2/INFO] [Reconnect] [FINE]: Reconnecter channel future failed
    [19:43:38] [Reconnect Pool Thread #0/INFO] [Reconnect] [FINE]: Reconnecter running
    [19:43:38] [Reconnect Pool Thread #0/INFO] [Reconnect] [FINE]: Reconnecter status check returned false
    [19:43:38] [Reconnect Pool Thread #0/INFO] [Reconnect] [FINE]: Reconnecter cancel invoked. false
     
  2. Tau

    Tau

    something cancelled the channel future.
    i'd say it's because of the same reason they got kicked in the first place.

    that being said reconnect should have continued reconnecting them.
    i think i've found the problem
     
  3. Tau

    Tau

  4. On some reason all my servers showing RESTARTING... But they are online no errors, restart the servers also showing RESTARTING...
    When i restart bungee not helps. When i stop all servers include bungeecord, and start all servers again all works fine. but looks like its not stable?

    how can this happend, my server is on development, there are some times 0 online for 18 hours. will it freez at some time when no players are online?

    Now i have a second question, is it also possible to restart bungee without kick players?
     
  5. Tau

    Tau

    enable debug in reconnects config, reload the plugin with /reconnect reload and post the contents of console when this happens.

    if your servers are freezing try checking if you allocated enough memory.
    the freezing issue may also be related to: https://github.com/PaperMC/Paper/issues/5980

    as for restarting the bungeecord process without kicking players would require transferring the connections to a surrogate process and then transferring them back. I may look into this when i have some free time.
     
  6. Thank You, i think it can’t be the memory i use 16GB memory for my test server. Otherwise i have really messed up something :-D But i will enable the debug asap. Good idea :)

    And very nice you will look into restart bungee.
     
  7. Tau

    Tau

    if you run a docker container for the server keep in mind the JVM uses more than what it's allocated.
     
  8. How much does /reconnect reload actually reload of the plugin?
     
  9. Tau

    Tau

    #89 Tau, Aug 23, 2021
    Last edited: Aug 23, 2021
    • Useful Useful x 1
  10. How its going on the plan to make bungee restart possible?
     
  11. Tau

    Tau

    It's not as of yet.
     
  12. Reconnect suddenly stopped working when I changed default messages in bukkit that are sent when player is kicked on the server on server restart
     
  13. Tau

    Tau

    That's because reconnect relies on those messages.
    If you change the restart/close message make sure to update the regex in the reconnect config.
     
  14. Code (Text):
      restart: |-
        §r
              §7[§6❖§7] §6§lKyodo §7[§6❖§7]
        §r
        §fThe server is currently restarting§7!
        §fjoin §6https://kyodo.club/discord §ffor more info§7!
        §r
    This is how my code looks like in spigot.yml
    How should I setup the regex?
     
  15. Tau

    Tau

    don't bother with the color codes, colors are formatting are stripped before the two are compared.

    as for the regex you could do:
    Code (Text):
    (?i)((server closed|server is restarting)+$|((?s).*The server is currently restarting.*))
    that should work? (untested)
    for an environment to test your regex try https://regex101.com/
     
    #95 Tau, Oct 6, 2021
    Last edited: Oct 6, 2021
  16. Hello @Tau,

    My server is in 1.8.8 and I use ViaVersion to authorize all versions from 1.7 to 1.16. The plugin works perfectly with a client in 1.8 but when I am with a client other than 1.8 I am automatically returned to the lobby with the error "The server only supports version 1.8.8" or "[Proxy] Lost connection to server".
    I think the server is restarting and ViaVersion is not loaded yet and it tries to reconnect.

    I added the disconnection message in the regex but it doesn't change anything.

    Do you know how I can fix this problem?
     
    #96 Floflobel, Oct 19, 2021
    Last edited: Oct 19, 2021
  17. Tau

    Tau

    Try using viaversion on bungeecord or increase delay before trying in config
    also, make sure to escape the "." in regex for "1.8.8"
     
  18. Thanks for the quick answer, it was a problem with the regex because the error message is actually a variable. I succeeded in taking the message without the variables.
     
  19. Tau

    Tau

  20. hi, idk but my problem " kicked while connecting to lobby Connection throttled! Please wait before reconnecting " :)