Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

socket.error: [Errno 111] Connection refused

I have setup single development instance using - http://swift.openstack.org/development_saio.html - things work fine as per this page. I am trying to connect programatically as follows and getting connection refused error :

:~/python-cloudfiles$ python Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import cloudfiles conn=cloudfiles.get_connection(authurl='http://127.0.0.1:11000/v1.0',username='test:tester',api_key='testing') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "cloudfiles/__init__.py", line 98, in get_connection return Connection(args, *kwargs) File "cloudfiles/connection.py", line 86, in __init__ self._authenticate() File "cloudfiles/connection.py", line 92, in _authenticate (url, self.cdn_url, self.token) = self.auth.authenticate() File "cloudfiles/authentication.py", line 67, in authenticate conn.request('GET', '/' + self.uri, headers=self.headers) File "/usr/lib/python2.7/httplib.py", line 955, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 989, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 951, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 811, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 773, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 754, in connect self.timeout, self.source_address) File "/usr/lib/python2.7/socket.py", line 571, in create_connection raise err socket.error: [Errno 111] Connection refused