-
Notifications
You must be signed in to change notification settings - Fork 117
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 (-551878174) #45
Comments
Same |
Are your Windows 7 machine and server 32-bit or 64-bit? |
Win 7 - 64 bit
…----------------------------------------
From: "Tyler M" <[email protected]>
Sent: Saturday, May 9, 2020 4:40 PM
To: "Tiiffi/mcrcon" <[email protected]>
Cc: "OIITCONZ" <[email protected]>, "Author" <[email protected]>
Subject: Re: [Tiiffi/mcrcon] Invalid Packet size (-551878174) (#45)
Are your Windows 7 machine and server 32-bit or 64-bit?
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
----All Outsourced Information Technology Limiteds work, sales and correspondence is covered under our terms of service and privacy policies found at https://outsourcedit.co.nz/tandc . Our online invoicing system is found at https://invoice.outsourcedit.co.nz and invoices, receipts and quotes can be accessed there. All goods and services sold are covered under the Sale of Goods Act and the Consumer Guarantees Act of NZ and will be liable for GST where applicable.
|
Well, I thought this might have something to do with packet size being defined as an |
Hello, I have been off from the project for a while now but I can check if I can reproduce this problem.
I believe endianness may become a problem on some rarer platforms. Older versions of the mcrcon source even had endiannes related functions but endian-independent code was never implemented because I didn't have good way to test it. Currently packet handling is is pretty ugly and probably one of the oldest part of the code and I feel it needs refactoring anyway. |
So, I need way to reproduce this before I can fix it. |
It happen when you defined -p (default port) if you just omitted it, it doesn;t happen. |
I've same problem My 1.12.2 server.properties have lines: In my linux terminal I use: Result: :'c |
Use the mcrcon's default port and it'll work fine |
Ok, after researching and doing a lot of testing, i have found that this error only happens with certain specific ports. For example: And I execute: It also happens if I omit the port (25575 default): The server console shows when starting the server that this service is already being used. So I solved the problem by changing to a random port not occupied by any service in server.properties. (I use 2525) In my server.properties: I hope this can help someone |
I had the same issue on an Ubuntu Linux server. Changing the RCON port from 25575 to 55565 (or anywhere inside the private port range of 49152-65535) worked. Maybe you could add a check and provide a more helpful error message? |
Same on ubuntu if rcon in sh file. I added -P with def port and it works |
Same problem on Ubuntu 20.04
|
I probably would have to see tcpdump of the traffic to determine what is actually going on. It is possible that there is another service running on default Minecraft rcon port (25575) and mcrcon is somehow succesfully connecting but getting nonsensical packets back from the whatever service it connected. |
I simply changed DATA_BUFFSIZE from 4096 to 8192. Now commands like help work correctly. |
In this case server is probably sending multipacket response which is not supported by mcrcon. @jasonkuehl I am still wondering why the rcon client is getting responses in some cases even though the port or listening ip is set incorrectly. |
Closing issue. This is going nowhere. |
I know this issue is close @Tiiffi but I was able to reproduce it on Ubuntu x64 machine. Curious if you saw this in another rcon-related tool -- https://mctools.readthedocs.io/en/master/rcon.html
Interestingly, the stop command actually stopped the server even though I got the packet error |
Hello @saicrazyfire That 1446 / 1460 byte outgoing packet size limit is certainly a new thing to me. It is not documented in Valvesoftware wiki. Thanks for the info, I have to investigate this further. This protocol is actually quite poorly documented and differenet games have their own quirky implementations of it. This makes it hard to write compatible clients. Now for the packet size problem.
Correct maximum packet size should be 4106 and I will correct this in next release. Thanks. |
You might have to look into Minecraft's RCON protocol instead of Valve's RCON protocol. Seems like they're not interchangeable. From the same library I linked above:
The library also links to a helpful guide on Minecraft's implementation of RCON here Edit: more info For your question
The library above makes it seems like Minecraft sends packets up to 4096 bytes, but it can also send multiple packets for the request if it is >4096 total bytes. The specific library I linked assumes if RCON server sends out a 4096 byte packet, it is a multi-packet response
For my hosting server, I'm running Ubuntu 20.04.3 LTS. On top of that, I'm actually running a modded Minecraft server (FTB Oceanblock), but that should be less relevant; Minecraft RCON should still work on it. It's based on Minecraft 1.16.5, iirc |
Disappointing that this went nowhere, I'd provide tcpdumps if I could. |
@OIITCONZ Got a working Fork. You can now set the buffer size with an option: @Tiiffi I don't see how this is an issue with the port. The error occurs for me if i want to read the content of for example an ender chest or inventory. If the inventory contains to much items and data, which happens fast if there are shulker boxes, its simply the max byte size that is exceeded. Update: Made it work. Your issue might still be something to do with the port but i managed to increase the response site anyway. Had to add a global buffsize variable for the return packets. MCRCON only ever read the first packet, now it reads every packet until the buffer is full or there are no more packets. |
I'm getting an error when trying gto connect mcrcron in Windows 7 to Linux MC. Latest version.
Warning: invalid packet size (-551878174). Must over 10 and less than 4096.
Authentication failed!
Command line is:
@mcrcon.exe -t -H redacted.com -P 12345 -p redactedpassword
Name: mcrcon (minecraft rcon)
Version: 0.7.1
Date: 02.01.2020
The text was updated successfully, but these errors were encountered: