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