Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Packet size on Fabric Server #103

Open
burdoto opened this issue Nov 29, 2023 · 8 comments
Open

Invalid Packet size on Fabric Server #103

burdoto opened this issue Nov 29, 2023 · 8 comments
Assignees
Labels
bug enhancement help wanted Needs help and/or input from community

Comments

@burdoto
Copy link

burdoto commented Nov 29, 2023

i've seen theres a couple of "invalid packet size" kind of issues;
but none quite matches my issue behaviour;

i literally ALWAYS get the invalid packet size error, no matter the input
grafik

server is hosted on the same machine, password is good and rcon port is unique as well. theres only one server responding to this, but it just wont get better at all no matter what i set up

rcon ports are unique, no duplicates
please let me know what further info you need.

i am running archlinux
java version is 17
mcrcon is on 0.7.2-1

@burdoto
Copy link
Author

burdoto commented Nov 29, 2023

i just noticed when testing on another server that this does NOT apply for all servers; 1.20.1 fabric is the one that was affected

@burdoto burdoto changed the title Invalid Packet size (always) Invalid Packet size on Fabric Server Nov 30, 2023
@WilsontheWolf
Copy link

WilsontheWolf commented Dec 5, 2023

I'm also having this on my fabric server. However, it doesn't seem to be every message. Specifically, help seems to error with a packet size of 4106. Then the next command I run, always errors with some large number. However, if I don't run help first, it doesn't error on the other command, and executations after the first large error work as normal.

image

@Taurous
Copy link

Taurous commented Jan 5, 2024

Just installed mcrcon on my server and I get this error when running help. I'm guessing the help command on a heavily modded server just has too much to send over rcon? Not sure if it's a Minecraft server limitation or this software.

@Tiiffi
Copy link
Owner

Tiiffi commented Oct 30, 2024

Hi,

I'm guessing the help command on a heavily modded server just has too much to send over rcon?

This is propably the reason. Vanilla minecraft doesn't send multipacket responses (it uses pages) and mcrcon doesn't support multipacket responses.

There might a problem with auth exchange too (valve style vs. vanilla minecraft style).

Not sure if it's a Minecraft server limitation or this software.

Limitation of mcrcon.

It would be really helpful if anyone could provide pcap packet capture when this problem happens (use bogus password when capturing).

Otherwise I have to install Fabric server to do some testing.

@Tiiffi Tiiffi added the help wanted Needs help and/or input from community label Nov 9, 2024
@Tiiffi
Copy link
Owner

Tiiffi commented Nov 9, 2024

I am unable to reproduce this problem with Vanilla or Fabric servers.

I need to know exact mods & extensions people are running on their servers.

Probable cause of failure is either too large packets or multipacket responses and I have never tested Minecraft server with multipacket responses. Most servers I have tested are splitting larger packets to pages (like Bukkit).

@burdoto
Copy link
Author

burdoto commented Nov 9, 2024

Previously, I was encountering this issue in the All the Fabric 5 modpack; it has been updated a lot since and I am currently unable to try again, but I assume it should still be reproducible using that.

@HoodedDeath
Copy link

HoodedDeath commented Jan 27, 2025

For what it's worth, I'm currently able to replicate what seems to be this exact issue running an All the Mods 10-2.23 server, which uses Minecraft 1.21.1 and NeoForge. I'm getting the same inconsistent, but always invalid packet size.

I don't have enough knowledge with C to help with an actual solution, but I'll attempt to get some packet captures that might help.

@HoodedDeath
Copy link

Got a couple captures to compare. One from a server running the problematic modpack, and the second from a vanilla server of the same game version.

For both captures, the password was '1234' and that can be seen in packet 4 of both in wireshark. I then ran 'help', followed by 'say hi'. For reference, 192.168.50.2 is the server the world is running on and 192.168.50.3 is the machine connecting through rcon.

For the modded server that gives me invalid packet size warnings, when running 'help', I get Warning: invalid packet size (4106). Must over 10 and less than 4096., then running 'say hi' right after it, I get Warning: invalid packet size (1953656688). Must over 10 and less than 4096. even though both servers gave an 80 byte response to the 'say hi' command. Seems like it probably is the multi-packet response from the help command messing things up.

I separately tested a different order and found that the invalid packet sizes only start after a large response and don't last forever. I can send multiple 'say hi' commands without problems, then send 'help' and get the invalid size issue, and then send 3 'say hi' commands and the third one no longer has an invalid size warning.

Modded PCAP (causes invalid packet size warning)

Vanilla PCAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement help wanted Needs help and/or input from community
Projects
None yet
Development

No branches or pull requests

5 participants