Elytrium / LimboReconnect

Reconnect your players after server restart
GNU General Public License v3.0
37 stars 13 forks source link

[BUG] Not connected to server! (IllegalStateException and NPE) #18

Closed kainlighty closed 1 year ago

kainlighty commented 1 year ago

While on the server, I wrote restart, after it kicked with such an exception. In the debag Match: true

config.yml:

serializer: LEGACY_AMPERSAND
# Send player to the limbo, if disconnect reason contains this text (using regex)
trigger-message: "(?i).*Restarting.*"
# Server status check interval in milliseconds
check-interval: 1000
# Server status check timeout in milliseconds
ping-timeout: 500
# Reconnect delay after server startup
join-delay: 10000
# Send to limbo or use current server's world
use-limbo: false
# Require permission to reconnect (limboreconnect.reconnect)
require-permission: false
world:
  # Dimensions: OVERWORLD, NETHER, THE_END
  dimension: "OVERWORLD"
  # Load world from file
  load-world: false
  # Schematic file name
  world-file-path: "world.schem"
  world-file-type: WORLDEDIT_SCHEM
  world-light-level: 15
  gamemode: ADVENTURE
  world-coords:
    x: 0
    y: 100
    z: 0
  player-coords:
    x: 0
    y: 100
    z: 0
    pitch: 0.0
    yaw: 90.0
[00:25:53 INFO]: [!!!com.velocitypowered.proxy.connection.client.ConnectedPlayer@969a8ab=>java.lang.NullPointerException:Cannot invoke "java.net.InetSocketAddress.toString()" because the return value of "com.velocitypowered.proxy.connection.client.ConnectedPlayer.getRemoteAddress()" is null!!!] has disconnected: An internal error has occurred in your connection.
[00:25:53 ERROR]: [!!!com.velocitypowered.proxy.connection.client.ConnectedPlayer@969a8ab=>java.lang.NullPointerException:Cannot invoke "java.net.InetSocketAddress.toString()" because the return value of "com.velocitypowered.proxy.connection.client.ConnectedPlayer.getRemoteAddress()" is null!!!]: exception handling exception in com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler@138eff9b
java.lang.IllegalStateException: Not connected to server!
        at com.velocitypowered.proxy.connection.client.ConnectedPlayer.ensureAndGetCurrentServer(ConnectedPlayer.java:243) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler.handle(ClientPlaySessionHandler.java:261) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.protocol.packet.chat.legacy.LegacyChat.handle(LegacyChat.java:121) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.connection.MinecraftConnection.channelRead(MinecraftConnection.java:151) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:92) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:61) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:509) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at java.lang.Thread.run(Thread.java:833) [?:?]
[00:25:53 ERROR]: [!!!com.velocitypowered.proxy.connection.client.ConnectedPlayer@969a8ab=>java.lang.NullPointerException:Cannot invoke "java.net.InetSocketAddress.toString()" because the return value of "com.velocitypowered.proxy.connection.client.ConnectedPlayer.getRemoteAddress()" is null!!!]: exception encountered in com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler@138eff9b
java.lang.IllegalStateException: Not connected to server!
        at com.velocitypowered.proxy.connection.client.ConnectedPlayer.ensureAndGetCurrentServer(ConnectedPlayer.java:243) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler.handle(ClientPlaySessionHandler.java:261) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.protocol.packet.chat.legacy.LegacyChat.handle(LegacyChat.java:121) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.connection.MinecraftConnection.channelRead(MinecraftConnection.java:151) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:92) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:61) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:509) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity.jar:3.2.0-SNAPSHOT (git-8dcc7ee3-b294)]
        at java.lang.Thread.run(Thread.java:833) [?:?]
kainlighty commented 1 year ago

Fixed it thanks to pull request