How can we help you today?
Start a new topic
Answered

Sraps: connection refused

Today we've tried to verify the ownership of a certain Snom phone via the Sraps XML-RPC. Suddenly we're getting a "Failed to connect to secure-provisioning.snom.com port 8083: Connection refused" error message on every request.


Strangely enough, I'm not getting this message on my laptop. It only happens on our server.


Is there some blacklist you are applying? 


Sincerely,


Sander


Best Answer

Hi Sander,


Apologies for the delay, I was off unexpectedly for the last weeks.


If the script works on your laptop, than it is probably not a password issue. It seems to me that your server is having a netowrk problem connecting to the SRAPS server: "socket.error: [Errno 111] Connection refused". Can it be that a firewall is blocking the connection? Can you maybe try to connect your laptop (the one that works) to the same switch port as the server and check the connection?


You could also try to get a PCAP trace (using tcpdump, or wireshark, for example) of the server and check the network packets.


Thanks

Catalina


Hi Sander,


Yesterday we did some maintenance work with the redirection server.

The system is back up and running but we have had some problems with the user accounts. Can you please manually try to login to the portal (https://sraps.snom.com) and if that fails try to reconfigure your password using the "Forgotten your password?" wizard?

Let me know if you still have problems.

Thanks
Catalina

Hi Catalina,


Thank you for your swift reply :).


I have already reset our credentials and can login with them in the portal. The strange thing is, requests from my laptop work perfectly. But the exact same request from our server gets denied every time. They use the exact same credentials and request configuration.

Could there be something else at play here?


Sincerely,

Sander

Hi Catalina,


Due to my vacation I was unable to respond for a few days. I have tried the Redirection CLI tool and I get the exact same problem.


When I execute the CLI via our server:

  

./sraps.py
Username: Verbonden
Password:
Traceback (most recent call last):
  File "./sraps.py", line 664, in <module>
    pwd_val = validate_password(username, password)
  File "./sraps.py", line 322, in validate_password
    s.network.echo("ping")
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1591, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1301, in single_request
    self.send_content(h, request_body)
  File "./sraps.py", line 210, in send_content
    connection.endheaders()
  File "/usr/lib64/python2.7/httplib.py", line 1052, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 890, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 852, in send
    self.connect()
  File "/usr/lib64/python2.7/httplib.py", line 1266, in connect
    HTTPConnection.connect(self)
  File "/usr/lib64/python2.7/httplib.py", line 833, in connect
    self.timeout, self.source_address)
  File "/usr/lib64/python2.7/socket.py", line 571, in create_connection
    raise err
socket.error: [Errno 111] Connection refused

 


And executed locally, on my laptop:

 

./sraps.py
Username: Verbonden
Password:
###############################################
  Snom Redirection Server Console Ver. 1.4.1
  (c) 2010-2018 snom technology AG
###############################################
Verbonden%>

 

Clearly there is something going on on a network level. I'm expecting some sort of blacklist/firewall. Could you please check if the IP-address 37.97.152.71 is in your firewall? That is the IP-address our server uses.

Thank you in advance.


Bump :)

Dear support,


Please respond and help, as we're still experiencing this issue.

Answer

Hi Sander,


Apologies for the delay, I was off unexpectedly for the last weeks.


If the script works on your laptop, than it is probably not a password issue. It seems to me that your server is having a netowrk problem connecting to the SRAPS server: "socket.error: [Errno 111] Connection refused". Can it be that a firewall is blocking the connection? Can you maybe try to connect your laptop (the one that works) to the same switch port as the server and check the connection?


You could also try to get a PCAP trace (using tcpdump, or wireshark, for example) of the server and check the network packets.


Thanks

Catalina

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


Hi Quincy,


Thanks for the reply though the issue has been solved by now :)


Have a great day!

Login or Signup to post a comment