swift error: [Errno 111] ECONNREFUSED

Asked by JihwanKim

Dear all...

I have just installed swift with SAIO.

And it is based on Ubuntu 11_04...

It worked well in local terminal... like below.

I made 5 containers and tested upload/download/delete any file in local.

Next, I want to do it in remote system. But it throw any error to me...

Pls, How could I fix it?
-------------------------------------------------------------------------------
[Local]
-------------------------------------------------------------------------------
...
...
...

~# swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser \
     -K sslpass upload sslcont1 lib.tar
lib.tar

~# swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser \
     -K sslpass download sslcont1 lib.tar
lib.tar

~# swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser \
     -K sslpass delete sslcont1 lib.tar
lib.tar

root@swiftmain:~# swift -v -A https://192.168.56.101/auth/v1.0 \
     -U sslacct:ssluser -K sslpass delete sslcont1 lib.tar
lib.tar

root@swiftmain:~# swift -v -A https://192.168.56.101/auth/v1.0 \
     -U sslacct:ssluser -K sslpass stat -v
StorageURL: https://127.0.0.1/v1/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb
Auth Token: AUTH_tkf7f78ee834784f9aa557b658a85cdebc
   Account: AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb
Containers: 5
   Objects: 1
     Bytes: 182855680
Accept-Ranges: bytes

---------------------------------------------------------------------------------
[Remote]
---------------------------------------------------------------------------------

# swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser \
     -K sslpass upload sslcontainer pkg1.gz
Traceback (most recent call last):
  File "/usr/bin/swift", line 949, in run
    self.func(item, *self.args, **self.kwargs)
  File "/usr/bin/swift", line 1639, in _object_job
    headers = conn.head_object(container, obj)
  File "/usr/bin/swift", line 861, in head_object
    return self._retry(None, head_object, container, obj)
  File "/usr/bin/swift", line 792, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/bin/swift", line 573, in head_object
    conn.request('HEAD', path, '', {'X-Auth-Token': token})
  File "/usr/lib/python2.6/httplib.py", line 910, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.6/httplib.py", line 947, in _send_request
    self.endheaders()
  File "/usr/lib/python2.6/httplib.py", line 904, in endheaders
    self._send_output()
  File "/usr/lib/python2.6/httplib.py", line 776, in _send_output
    self.send(msg)
  File "/usr/lib/python2.6/httplib.py", line 735, in send
    self.connect()
  File "/usr/lib/python2.6/httplib.py", line 1108, in connect
    sock = socket.create_connection((self.host, self.port), self.timeout)
  File "/usr/lib/pymodules/python2.6/eventlet/green/socket.py", line 59, in create_connection
    raise error, msg
error: [Errno 111] ECONNREFUSED

-----------------------------------------------------------------------------------
[proxy-server.conf]
-----------------------------------------------------------------------------------
[DEFAULT]
cert_file = /etc/swift/cert.crt
key_file = /etc/swift/cert.key
bind_port = 443
user = swift
log_facility = LOG_LOCAL1

[pipeline:main]
pipeline = healthcheck cache swauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true

[filter:swauth]
use = egg:swauth#swauth
set log_name = swauth
super_admin_key = swauthkey
default_swift_cluster = local#https://127.0.0.1/v1#https://192.168.56.101/v1

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:cache]
use = egg:swift#memcache

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Armando Migliaccio
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Best Armando Migliaccio (armando-migliaccio) said :
#1

ensure you can reach the swift proxy from your remote host, first of all.

Also ensure that bind_ip in your proxy-server.conf is either set to 0.0.0.0 or to the ip address on which the proxy is meant to be accessed.

Revision history for this message
JihwanKim (jih1103) said :
#2

Hello Armando Migliaccio.

Thanks for your answer.

I tested like that you wrote it, but I could not solved it.

So, I have printed log '/var/log/syslog', both of them 'local' and 'remote'.

Command>>
swift -v -A https://192.168.56.101:443/auth/v1.0 -U sslacct:ssluser -K sslpass stat -v

=======================================================================================
Local : 127.0.0.1 (192.168.56.101) : Here, just printed HTTP messages.
--------------------------------------------------------------------------------------------------------------------------
Jun 26 13:22:57 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:22:57 +0000] "GET /sdb3/134313/AUTH_.auth/sslacct/ssluser" 200 111 "-" "-" "%(orig)s Swauth" 0.0006
Jun 26 13:22:57 swiftmain proxy-server - - 26/Jun/2012/04/22/57 GET /v1/AUTH_.auth/sslacct/ssluser HTTP/1.0 200 - %25%28orig%29s%20Swauth - - - - - - 0.0028
Jun 26 13:22:57 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:22:57 +0000] "GET /sdb2/126268/AUTH_.auth/.token_6/AUTH_tkabd80bff2868411ca7cad7a186c62cb6" 200 212 "-" "-" "%(orig)s Swauth" 0.0014
Jun 26 13:22:57 swiftmain proxy-server - - 26/Jun/2012/04/22/57 GET /v1/AUTH_.auth/.token_6/AUTH_tkabd80bff2868411ca7cad7a186c62cb6 HTTP/1.0 200 - %25%28orig%29s%20Swauth - - - - - - 0.0042
Jun 26 13:22:57 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:22:57 +0000] "GET /sdb3/254191/AUTH_.auth/sslacct/.services" 404 - "-" "-" "%(orig)s Swauth" 0.0002
Jun 26 13:22:57 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:22:57 +0000] "GET /sdb4/254191/AUTH_.auth/sslacct/.services" 200 108 "-" "-" "%(orig)s Swauth" 0.0004
Jun 26 13:22:57 swiftmain proxy-server - - 26/Jun/2012/04/22/57 GET /v1/AUTH_.auth/sslacct/.services HTTP/1.0 200 - %25%28orig%29s%20Swauth - - - - - - 0.0057
Jun 26 13:22:57 swiftmain swauth - 192.168.56.101 26/Jun/2012/04/22/57 GET /auth/v1.0/ HTTP/1.0 200 - - - - - - - - 0.0155
<B>Jun 26 13:22:57 swiftmain account-server 127.0.0.1 - - [26/Jun/2012:04:22:57 +0000] "HEAD /sdb4/82451/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb" 204 - "-" "-" "-" 0.0019 ""
Jun 26 13:22:57 swiftmain proxy-server 127.0.0.1 127.0.0.1 26/Jun/2012/04/22/57 HEAD /v1/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb HTTP/1.0 204 - - sslacct%3Assluser%2CAUTH_tkabd80bff2868411ca7cad7a186c62cb6 - - - - - 0.0045
</B>
=======================================================================================
Remote : 192.168.56.103 --> (192.168.56.101)
--------------------------------------------------------------------------------------------------------------------------

Jun 26 13:30:40 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:30:40 +0000] "GET /sdb3/134313/AUTH_.auth/sslacct/ssluser" 200 111 "-" "-" "%(orig)s Swauth" 0.0004
Jun 26 13:30:40 swiftmain proxy-server - - 26/Jun/2012/04/30/40 GET /v1/AUTH_.auth/sslacct/ssluser HTTP/1.0 200 - %25%28orig%29s%20Swauth - - - - - - 0.0025
Jun 26 13:30:40 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:30:40 +0000] "GET /sdb2/126268/AUTH_.auth/.token_6/AUTH_tkabd80bff2868411ca7cad7a186c62cb6" 200 212 "-" "-" "%(orig)s Swauth" 0.0006
Jun 26 13:30:40 swiftmain proxy-server - - 26/Jun/2012/04/30/40 GET /v1/AUTH_.auth/.token_6/AUTH_tkabd80bff2868411ca7cad7a186c62cb6 HTTP/1.0 200 - %25%28orig%29s%20Swauth - - - - - - 0.0026
Jun 26 13:30:40 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:30:40 +0000] "GET /sdb3/254191/AUTH_.auth/sslacct/.services" 404 - "-" "-" "%(orig)s Swauth" 0.0002
Jun 26 13:30:40 swiftmain object-server 127.0.0.1 - - [26/Jun/2012:04:30:40 +0000] "GET /sdb4/254191/AUTH_.auth/sslacct/.services" 200 108 "-" "-" "%(orig)s Swauth" 0.0004
Jun 26 13:30:40 swiftmain proxy-server - - 26/Jun/2012/04/30/40 GET /v1/AUTH_.auth/sslacct/.services HTTP/1.0 200 - %25%28orig%29s%20Swauth - - - - - - 0.0046
Jun 26 13:30:40 swiftmain swauth - 192.168.56.103 26/Jun/2012/04/30/40 GET /auth/v1.0/ HTTP/1.0 200 - - - - - - - - 0.0125
=======================================================================================

and I met the error on terminal in (192.168.56.103)
[Errno 111] ECONNREFUSED

I made this systems on the Oracle VirtualBox, and Ubuntu 11_04(swift server).
No ufw and iptables.
And it's well-connecting(ssh:22, ping) to swift-server(192.168.56.101) from 192.168.56.103 (testing for connection)

Please, if anybody has know like this... let me know. Or if you have some guidance, pls...

Have a good day!

Revision history for this message
JihwanKim (jih1103) said :
#3

I think that "GET" had correctly run, but last two "HEAD" had not responsed to the remote-side swift.
Again, try it... any other ways...

Good day!!

Revision history for this message
JihwanKim (jih1103) said :
#4

I think that "GET" had correctly run, but last two "HEAD" had not responsed to the remote-side swift.
Again, try it... any other ways...

Good day!!

Revision history for this message
JihwanKim (jih1103) said :
#5

.. Wrong click... I need an answer...

Revision history for this message
JihwanKim (jih1103) said :
#6

All is fixed... Thanks..

The problem is only for ip address on proxy-server.conf, I change the bind_ip = 0.0.0.0 to bind_ip = 172.30.1.134...
And work well...

Revision history for this message
JihwanKim (jih1103) said :
#7

Thanks Armando Migliaccio, that solved my question.

Revision history for this message
JihwanKim (jih1103) said :
#8

All is fixed... Thanks..

The problem is only for ip address on proxy-server.conf, I change the bind_ip = 0.0.0.0 to bind_ip = 172.30.1.134...

and VirtualBox network changed host-only to bridged...

And work well...