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

rcon against local ark server times out #60

Open
Hr46ph opened this issue Nov 24, 2017 · 2 comments
Open

rcon against local ark server times out #60

Hr46ph opened this issue Nov 24, 2017 · 2 comments

Comments

@Hr46ph
Copy link

Hr46ph commented Nov 24, 2017

I'm actually just learning Python. I'm trying out different things with python-valve.

Basically, just copy/pasted this and adjusted it for my own server from this page:
https://python-valve.readthedocs.io/en/latest/rcon.html

#!/usr/bin/python

import valve.rcon

address = ("1.2.3.4", 27020)
password = "myadminpassword"

with valve.rcon.RCON(address, password, timeout=30) as rcon:
    response = rcon.execute("broadcast Hello, world!")
    print(response.text)

The firewall on my server is open, I can telnet to the RCON port (specified on the command line and in the game ini file.

I am using battlemetrics.com using the same port on the public IP address (forwarded from the router) which just works.

When I change the port to the incorrect port, I immediately get a 'connection refused'. When I change the IP address, it never connects. When I change the password to be incorrect, it actually tells me the password is wrong.

It connects, authenticates, but the command is never executed.

Any ideas please?

Thanks.

@AngellusMortis
Copy link

As a note for this, it works in SourceRcon.py (which it looks like most of the Source RCON Python code came from), but that only supports Python 2.

I am now trying to investigate the difference between the two, but I am not the best at low level netcode.

@AngellusMortis
Copy link

Looks like the issue is that ARK does not support Multiple-packet responses.

I have made a change on my personal github that adds a new option for RCON to disable it from trying to except these type of responses. I will use for now and I may get around to adding proper unit tests and making a pull request in the following days.

I also made a Bug post on the official ARK forums: https://survivetheark.com/index.php?/forums/topic/279275-rcon-does-not-support-multiple-packets-responses/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants