GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.71k stars 675 forks source link

Geyser players time out on Velocity proxy. #4236

Closed TheKrafter closed 7 months ago

TheKrafter commented 11 months ago

Describe the bug

Bedrock Edition users attempting to connect any of to my Paper servers via the Velocity proxy are kicked from the server with one of three errors (but the same thing in the velocity log):

The backend server's log shows them as connecting and disconnecting:

``` [20:48:46 INFO]: UUID of player .TheKrafter2217 is 00000000-0000-0000-0009-01f870fc1c98 [20:48:46 INFO]: [floodgate] Floodgate player logged in as .TheKrafter2217 joined (UUID: 00000000-0000-0000-0009-01f870fc1c98) [20:48:46 INFO]: .TheKrafter2217 joined the game [20:48:46 INFO]: .TheKrafter2217[/IP_ADDRESS] logged in with entity id 35988 at ([season2]-0.5, 66.0, 1.5) [20:49:16 INFO]: [floodgate] Floodgate player logged in as .TheKrafter2217 disconnected [20:49:16 INFO]: .TheKrafter2217 lost connection: Disconnected [20:49:16 INFO]: .TheKrafter2217 left the game ```

The proxy shows them as timing out:

``` [01:56:26 INFO] [geyser]: /IP_ADDRESS:39127 tried to connect! [01:56:27 INFO] [geyser]: Player connected with username TheKrafter2217 [01:56:27 INFO] [geyser]: TheKrafter2217 (logged in as: TheKrafter2217) has connected to the Java server [01:56:27 INFO] [floodgate]: Floodgate player who is logged in as .TheKrafter2217 00000000-0000-0000-0009-01f870fc1c98 joined [01:56:27 INFO]: [connected player] .TheKrafter2217 (/IP_ADDRESS:0) has connected [01:56:27 INFO]: [server connection] .TheKrafter2217 -> smp2 has connected [01:56:58 INFO]: [server connection] .TheKrafter2217 -> smp2 has disconnected [01:56:58 INFO]: [connected player] .TheKrafter2217 (/IP_ADDRESS:0) has disconnected: An internal error occurred in your connection. [01:56:58 INFO] [geyser]: TheKrafter2217 has disconnected from the Java server because of Read timed out. [01:56:58 ERROR]: io.netty.handler.timeout.ReadTimeoutException [01:56:58 INFO] [floodgate]: Floodgate player logged in as TheKrafter2217 disconnected [01:56:58 ERROR]: [connected player] .TheKrafter2217 (/IP_ADDRESS:0): read timed out ```

However, Java players can connect fine, and Bedrock players have been able to connect fine until recently, after which (as this error persisted) I updated Geyser, floodgate, and Velocity.

To Reproduce

  1. Add server with Velocity proxy infront of it
  2. Attempt to connect
  3. Get kicked

Expected behaviour

Bedrock players connect to the Velocity proxy via Geyser, and are connected through to the backend Paper server.

Screenshots / Videos

Screenshots of the various errors

![Screenshot from 2023-10-21 20-42-56](https://github.com/GeyserMC/Geyser/assets/75903664/92e5a98c-de9b-4b89-bd58-384c8d3f7729) ![Screenshot from 2023-10-21 21-02-20](https://github.com/GeyserMC/Geyser/assets/75903664/641bb3d1-db7f-46d6-bf2d-7ff2dfa58f69) ![image](https://github.com/GeyserMC/Geyser/assets/75903664/6f333d44-12df-43cb-8e6e-96939c859d0a)

Server Version and Plugins

Velocity:

Backend:

Same thing happens when connecting to another backend server:

Geyser Dump

https://dump.geysermc.org/uUdhUwli52hb1NI2lmygRNmTCHG43Ert

Geyser Version

2.2.0-SNAPSHOT (git-master-51236f7)

Minecraft: Bedrock Edition Device/Version

v1.20.32 Android (mcpelauncher-linux) & iOS

Additional Context

It seems like it may be important so here is the network setup

I've been trying to fix this for days, I've tried removing the config and just changing the one setting I need for stuff to work on my setup (forward-host: true), but to no avail.

anirudhbansal005 commented 11 months ago

Remove via plugins from proxy and install them on backend servers

TechnicallyCoded commented 11 months ago

Same issue here.

Here is some additional debug information I am getting which may help

[17:41:05 INFO]: [server connection] .TCoded -> hub has connected
[17:41:05 INFO] [geyser]: Could not find packet for ClientboundUpdateEnabledFeaturesPacket
[17:41:05 INFO] [geyser]: Could not find packet for ClientboundFinishConfigurationPacket
[17:41:14 INFO] [geyser]: Scoreboard updater: took 1 ms. Updated 1 players
mastachef commented 11 months ago

Having same problem

onebeastchris commented 11 months ago

@mastachef Which backend server version are you running? Additionally, please send a Geyser dump.

TheKrafter commented 11 months ago

As per @CloudyOrk's suggestion moving Via plugins to backend servers did resolve this issue.

I don't think that's the intended behavior though, thoughts?

SamGamerYT commented 11 months ago

As per @CloudyOrk's suggestion moving Via plugins to backend servers did resolve this issue.

I don't think that's the intended behavior though, thoughts?

I can't do that as if I do that the plugin "TAB" throws an error saying the player's version is invalid and then their bossbar glitches out.

onebeastchris commented 11 months ago

ViaVersion itself says to only install ViaVersion on the backends, not on both the proxy and backend servers - marked as a "common mistake" on their wiki.

As for @SamGamerYT , if tab throws an error without ViaVersion on the proxy, that sounds like a tab issue... I'd recommend to contact them. Or, try to only have ViaVersion on the proxy and not the backend.

TechnicallyCoded commented 11 months ago

?? I only had viaversion on the proxy. Same issue. This is a plugin interaction issue between geyser and viaversion and idk who's fault it is. But it's definitely not the user's fault.

onebeastchris commented 11 months ago

@TechnicallyCoded try installing ViaVersion only on the backend servers instead, they recommend that over installing it on the proxy. Additionally, if not done already, you should update the proxy version to one that natively supports 1.20.2 connections.

TechnicallyCoded commented 11 months ago

Velocity was already updated to support 1.20.2 natively. When I sent my original reply to this issue, I had just downloaded everything minutes ago (velocity, geyser, and viaversion).

Moving the viaversion plugin to every backend server is a migration we have started to doing a few days ago because of this.

But this is not normal behavior regardless and needs some resolution. More specifically, geyser is saying it doesn't know how to handle the ClientboundFinishConfigurationPacket which is required to move the player out of the configuration phase which would very likely explain the client timing out while trying to connect as it can never proceed.

TechnicallyCoded commented 11 months ago

More reading about this behavior in 1.20.2 can be found here: https://wiki.vg/Protocol#Configuration

onebeastchris commented 11 months ago

Thanks for the detailed info. What is the exact error logged by Geyser?

Geyser (or rather, mcpl which Geyser uses to listen/send Java edition packets) does listen & respond to the ClientboundFinishConfigurationPacket here. However, it only does so if the client is in the configuration phase - as is standard for a Java client. What's likely happening here is that either Geyser doesnt properly recognize the configuration status, or that ViaVersion on the proxy causes a conflict that results in the same thing, or similar. If you are getting an error, please send the full one.

onebeastchris commented 7 months ago

Closing as ViaVersion themselves recommend installing ViaVersion only on the backend servers, instead of the proxy.