Description
Describe the bug
If you're using a Velocity proxy with Geyser installed and you try to connect to the proxy using an address the proxy doesn't recognize and have all try
routes unset, Geyser will throw an error in the console instead of failing gracefully and forwarding the disconnect message.
The error in the log:
[17:51:24 INFO] [geyser]: Player connected with username Vyladence
[17:51:24 INFO] [geyser]: Vyladence (logged in as: Vyladence) has connected to the Java server
[17:51:24 INFO] [floodgate]: Floodgate player who is logged in as Vyladence 522c4e28-7f3a-4042-be90-ddfba9bfab75 joined
[17:51:24 INFO]: [connected player] Vyladence (/xxx.xxx.xxx.xxx:0) has connected
[17:51:24 INFO]: [connected player] Vyladence (/xxx.xxx.xxx.xxx:0) has disconnected: There are no available servers to connect you to. Try again later or contact an admin.
[17:51:24 INFO] [floodgate]: Floodgate player logged in as Vyladence disconnected
[17:51:24 INFO] [geyser]: Vyladence has disconnected from the Java server because of Internal Exception: java.nio.channels.ClosedChannelException
[17:51:25 ERROR] [geyser]: An exception occurred:
java.nio.channels.ClosedChannelException: null
at io.netty.channel.local.LocalChannel.doWrite(LocalChannel.java:392) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:929) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:893) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1319) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:935) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:921) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:907) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:125) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:939) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:957) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:982) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:950) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:1000) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:974) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:305) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at org.geysermc.mcprotocollib.network.session.NetworkSession.send(NetworkSession.java:194) ~[?:?]
at org.geysermc.mcprotocollib.network.Session.send(Session.java:187) ~[?:?]
at org.geysermc.geyser.session.DownstreamSession.sendPacket(DownstreamSession.java:41) ~[?:?]
at org.geysermc.geyser.session.GeyserSession.sendDownstreamPacket0(GeyserSession.java:1710) ~[?:?]
at org.geysermc.geyser.session.GeyserSession.sendDownstreamPacket(GeyserSession.java:1700) ~[?:?]
at org.geysermc.geyser.session.GeyserSession.sendDownstreamPacket(GeyserSession.java:1678) ~[?:?]
at org.geysermc.geyser.translator.protocol.java.JavaLoginFinishedTranslator.translate(JavaLoginFinishedTranslator.java:77) ~[?:?]
at org.geysermc.geyser.translator.protocol.java.JavaLoginFinishedTranslator.translate(JavaLoginFinishedTranslator.java:44) ~[?:?]
at org.geysermc.geyser.registry.PacketTranslatorRegistry.translate0(PacketTranslatorRegistry.java:92) ~[?:?]
at org.geysermc.geyser.registry.PacketTranslatorRegistry.translate(PacketTranslatorRegistry.java:70) ~[?:?]
at org.geysermc.geyser.session.GeyserSessionAdapter.packetReceived(GeyserSessionAdapter.java:229) ~[?:?]
at org.geysermc.mcprotocollib.network.session.NetworkSession.callPacketReceived(NetworkSession.java:134) ~[?:?]
at org.geysermc.mcprotocollib.network.session.NetworkSession.channelRead0(NetworkSession.java:277) ~[?:?]
at org.geysermc.mcprotocollib.network.session.NetworkSession.channelRead0(NetworkSession.java:36) ~[?:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:202) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:164) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.local.LocalChannel.readInbound(LocalChannel.java:323) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:469) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:51) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:427) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-58816c80-b474)]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
To Reproduce
- Fire up a velocity server with geyser and floodgate installed
- Configure Velocity to have no default routes, so only forced hosts work
- Set
forward-hostname
totrue
in geyser-velocity/config.yml - Connect to the Velocity server on bedrock using an IP that is not configured in the
forced-hosts
section
Expected behaviour
Geyser should handle the connection reset and forward the disconnect message "There are no available servers to connect you to. Try again later or contact an admin." to the player attempting to join.
Screenshots / Videos
Error message on Bedrock client:
Server Version and Plugins
Velocity build: Velocity 3.4.0-SNAPSHOT (git-58816c80-b474)
Velocity plugin list:
Geyser version: Geyser version 2.6.1-b774
Floodgate version: 2.2.4-SNAPSHOT (b116-0e3163c) (branch: master)
Geyser Dump
https://dump.geysermc.org/xeUN9lhIoyBWJRljzf5FKS4Nvuqypa9R
Geyser Version
Geyser version 2.6.1-b774
Minecraft: Bedrock Edition Device/Version
1.21.60, occurs on all devices that I've tested
Additional Context
No response
Activity