socket.error: [Errno 111] Connection refused

asked 2011-06-01 11:01:52 -0600

ved gravatar image

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

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2011-06-01 11:19:07 -0600

ved gravatar image

The API call fails with port 8080 also. But ST works against this URL

~/swift/trunk$ st -A -U test:tester -K testing stat Account: AUTH_7616beed-9ac5-4153-a287-d24ca896dabb Containers: 0 Objects: 0 Bytes: 0 Accept-Ranges: bytes

edit flag offensive delete link more

answered 2011-06-01 12:39:22 -0600

gholt gravatar image

Are you sure you're using the exact same auth url in both cases? The cloudfiles bindings' example should probably look like this:

conn=cloudfiles.get_connection(authurl='', username='test:tester', api_key='testing')

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-06-01 11:01:52 -0600

Seen: 4,089 times

Last updated: Jun 01 '11