xmlrpc: hostname nor servname provided ?

L

Laszlo Nagy

I'm running a service on a machine. The service is written in Python (of
course) and it connects to an XMLRPC server periodically.
It recreates the ServerProxy instance each time it needs to connect to
the RPC server.

The server is created with this code:

server = xmlrpclib.ServerProxy(local.SERVER_URL,allow_none=True) #
local.SERVER_URL is something like 'https://myserver.com:3421'


After running for a few hours, I always get this:

2006-07-25 16:33:26,431 ERROR .main Traceback (most recent call last):
File "/home/gandalf/AmazonOfferDownloader/AmazonOfferDownloader.py",
line 27, in run
logger.info("Connected to %s",server.serversignature())
File "/usr/local/lib/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/local/lib/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/local/lib/python2.4/xmlrpclib.py", line 1129, in request
self.send_content(h, request_body)
File "/usr/local/lib/python2.4/xmlrpclib.py", line 1243, in send_content
connection.endheaders()
File "/usr/local/lib/python2.4/httplib.py", line 798, in endheaders
self._send_output()
File "/usr/local/lib/python2.4/httplib.py", line 679, in _send_output
self.send(msg)
File "/usr/local/lib/python2.4/httplib.py", line 646, in send
self.connect()
File "/usr/local/lib/python2.4/httplib.py", line 1072, in connect
sock.connect((self.host, self.port))
File "<string>", line 1, in connect
gaierror: (8, 'hostname nor servname provided, or not known')

This exception does not stop my server program and it keeps trying to
connect to the xmlrpc server, but it raises the same exception again and
again.
However, if I restart the program then everything works. The XML RPC
server has a static IP address and it is never restarted/reconfigured.
I cannot find the problem. Please help me.


Laszlo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top