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

Unexpected message <RCONMessage 0 AUTH_RESPONSE 0B> #79

Open
dustinandband opened this issue Sep 18, 2019 · 3 comments
Open

Unexpected message <RCONMessage 0 AUTH_RESPONSE 0B> #79

dustinandband opened this issue Sep 18, 2019 · 3 comments

Comments

@dustinandband
Copy link

Whenever I run this script I get the following warning (though other than that the script works fine):
Unexpected message <RCONMessage 0 AUTH_RESPONSE 0B>

I use a shell script to launch this python script - which tells the shell script whether or not it's safe to shut down the game server:

#!/usr/bin/python3

import sys
import re
from valve.rcon import RCON

if len(sys.argv) != 4:
    print("Usage: ./program.py <ip> <port> <rcon password>")
    sys.exit(1)

ip = sys.argv[1]
port = int(sys.argv[2])
password = sys.argv[3]

SERVER_ADDRESS = (ip, port)
PASSWORD = password

try:
    with RCON(SERVER_ADDRESS, PASSWORD) as rcon:
        response = rcon.execute("status")
        response_text = response.body.decode('ascii', 'ignore')
        for line in response_text.splitlines():
            if "players :" in line:
                for words in ['0 humans']:
                    if re.search(r'\b' + words + r'\b', line):
                        print("The server is empty")
                    else:
                        print("The server has players")

except ModuleNotFoundError as e:
	print("ModuleNotFoundError: " + str(e))

except Exception as e:
    print("exception: " + str(e))
  • Python-valve Version: (0.2.1)
  • Python Version: 3.6.8
  • Operating System(s)/Platform(s): Ubuntu 18.04
  • Game Server(s) and Version(s): Left 4 Dead 2
@unfrail
Copy link

unfrail commented Jan 19, 2020

Getting the same output in my testing.

I'm working on interfacing with a Squad server, and from all I can tell I'm getting output, but the output formatting is not correct. When I use the flags that suppress/discard output things work well.

Were you able to get this figured out?

I have not been able to receive any output from my RCON interface...

@ghost
Copy link

ghost commented Feb 24, 2021

This is still an issue

@Gheotic
Copy link

Gheotic commented Feb 24, 2021

Having the exact same. I'm also trying to connect to a Squad server hosted in AWS

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

3 participants