Ask Your Question
0

socket.error: [Errno 111] Connection refused

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

ved gravatar image

I have setup single development instance using - http://swift.openstack.org/development_saio.html (http://swift.openstack.org/developmen...) - 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

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

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 http://127.0.0.1:8080/auth/v1.0 -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
0

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='http://127.0.0.1:8080/auth/v1.0', username='test:tester', api_key='testing')

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 3,555 times

Last updated: Jun 01 '11