Advertisement
rfmonk

xml rpc server refuses connection

Apr 13th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.11 KB | None | 0 0
  1. """I'm following along in Python for Unix and Linux system administrators.
  2. in an ipython shell I use the following code"""
  3.  
  4. import xmlrpclib
  5. x = xmlrpclib.ServerProxy('http://localhost:8765')
  6. x.ls('.')
  7.  
  8. """ This gives me the following error message, but what exactly is going on here?
  9. :
  10.  
  11. /usr/lib/python2.6/httplib.pyc in send(self, str)
  12.    737         if self.sock is None:
  13.    738             if self.auto_open:
  14. --> 739                 self.connect()
  15.    740             else:
  16.    741                 raise NotConnected()
  17.  
  18. /usr/lib/python2.6/httplib.pyc in connect(self)
  19.    718         """Connect to the host and port specified in __init__."""
  20.    719         self.sock = socket.create_connection((self.host,self.port),
  21. --> 720                                              self.timeout)
  22.    721
  23.    722         if self._tunnel_host:
  24.  
  25. /usr/lib/python2.6/socket.pyc in create_connection(address, timeout)
  26.    557         except error, msg:
  27.    558             if sock is not None:
  28.    559                 sock.close()
  29.    560
  30. --> 561     raise error, msg
  31.  
  32. error: [Errno 111] Connection refused
  33. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement