SRCDS Steam group


[Solved] socket.error: [Errno 111] Connection refused
#1
Hello,

everything worked fine and now it returns this error.

Code:
./srcds.py -p my_rcon_pass -a ip_dedicated_server

or

Code:
./srcds.py -p my_rcon_pass -a ip_dedicated_server -x my_port

Quote:Traceback (most recent call last):
File "./srcds.py", line 537, in
s = SRCDS(options.addr,rconpass=options.rcon)
File "./srcds.py", line 128, in init
self.authenticatercon()
File "./srcds.py", line 166, in authenticatercon
self.details()
File "./srcds.py", line 394, in details
raw_details = self.anyresponse(DETAILS)
File "./srcds.py", line 369, in anyresponse
data = self.udpsock.recv(4096)
socket.error: [Errno 111] Connection refused

so:
Code:
sudo iptables -L
Quote:Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp

Code:
sudo nmap -p 27020 -sU ip_dedicated_server

Quote:Starting Nmap 6.00 ( http://nmap.org ) at 2014-01-02 06:35 CET
Nmap scan report for 1XX-XXX-XXX-XX.rev.poneytelecom.eu (1XX-XXX-XXX-XX)
Host is up.
PORT STATE SERVICE
27020/udp open|filtered unknown

Nmap done: 1 IP address (1 host up) scanned in 2.16 seconds

port is open, how to fix ?

HLSW rcon work's fine.

edit : I just tested from my PC to my dedicated server with nmap and I no problems:
Code:
sudo nmap -p 27020 -sU ip_dedicated_server

Quote:Starting Nmap 6.00 ( http://nmap.org ) at 2014-01-02 06:35 CET
Nmap scan report for 1XX-XXX-XXX-XX.rev.poneytelecom.eu (1XX-XXX-XXX-XX)
Host is up.
PORT STATE SERVICE
27020/udp open|filtered unknown

Nmap done: 1 IP address (1 host up) scanned in 2.16 seconds

Sincerely,


Attached Files
.zip   srcds.zip (Size: 5.1 KB / Downloads: 1)
Reply
#2
This error means that the client cannot connect to the port on the computer running server script. This can be caused by few things, like lack of routing to the destination or you have a firewall somewhere between your client and the server - it could be on server itself or on the client etc. Note that a server must perform the sequence socket(), bind(), listen(), accept() (possibly repeating the accept() to service more than one client), while a client only needs the sequence socket(), connect(). Also note that the server does not sendall()/recv() on the socket it is listening on but on the new socket returned by accept(). Try the following:
  • Check if you really have that port listening on the server (this should tell you if your code does what you think it should): based on you OS, but on linux you could do something like netstat -ntulp
  • Check from the server, if you're accepting the connections to the server: again based on your OS, but telnet LISTENING_IP LISTENING_PORT should do the job
  • Check if you can access the port of the server from the client , but not using the code: just us the telnet (or appropriate command for your OS) from the client
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)