[Errno -2] Name or service not known when running swift stat

Asked by pbd

Hello,

This is the first attempt at running Swift (on CentOS 6.2), so most likely a novice error on my side...
The configuration is 1 proxy and 3 nodes. Current proxy conf is using tempauth with the "standard" user/password mentioned in the tutorials.
swift-bench appears to be working, however any other command (like swift stat, swift upload, curl for the account) fail with the same error:

 curl -k -v -H 'X-Storage-User: system:root' -H 'X-Storage-Pass: testpass' https://$PROXY_LOCAL_NET_IP:8080/auth/v1.0
--> HTTP/1.1 200 OK

curl -k -v -H 'X-Auth-Token: AUTH_tkaf9857e2514a4111b3f3e1783cba3223' https://$PROXY_LOCAL_NET_IP:8080/v1/AUTH_system
--> HTTP/1.1 204 No Content

 swift -A https://$PROXY_LOCAL_NET_IP:8080/auth/v1.0 -U system:root -K testpass stat
[Errno -2] Name or service not known

Can someone point me in the right direction as to what could be happening ?

Thanks in advance,
P.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Yang
Solved:
Last query:
Last reply:
Revision history for this message
Alex Yang (alexyang) said :
#1

You can check the log of proxy-server, if there is no log for your request, check the /etc/hosts or the connection to your proxy-server.

Revision history for this message
pbd (pbenard) said :
#2

Hello Alex,

The connection does work properly apparently, but i still get the "[Errno -2] Name or service not known" reply when trying to HEAD the account:

From the storage node:

 curl -k -v -H 'X-Storage-User: system:root' -H 'X-Storage-Pass: testpass' https://$PROXY_LOCAL_NET_IP:8080/auth/v1.0
-- > HTTP/1.1 200 OK

On the proxy node:

proxy-server - 10.5.128.113 27/Aug/2012/16/53/44 GET /auth/v1.0 HTTP/1.0 200 - curl/7.19.7%20%28x86_64-unknown-linux-gnu%29%20libcurl/7.19.7%20NSS/3.12.7.0%20zlib/1.2.3%20libidn/1.18%20libssh2/1.2.2 - - - - - - 0.0009

Then again for the stat command:

storage node:

swift -A https://$PROXY_LOCAL_NET_IP:8080/auth/v1.0 -U system:root -K testpass stat
--> [Errno -2] Name or service not known

proxy server:

proxy-server - 10.5.128.113 27/Aug/2012/16/54/18 GET /auth/v1.0/ HTTP/1.0 200 - - - - - - - - 0.0012

I must have overlooked something simple, but i am not sure what. Is there a debugging option that may provide more information about the error ?

Thanks,
Pascal

Revision history for this message
pbd (pbenard) said :
#3

Sorry - i meant that I still get the error when running a s"wift stat" command, not a "HEAD" on the account.

P.

Revision history for this message
Alex Yang (alexyang) said :
#4

You can show your configuration of temp-auth in proxy-server.conf and the /etc/hosts to me.

Revision history for this message
pbd (pbenard) said :
#5

Hello,

This is the /etc/hosts and proxy-server-conf:

hosts:

127.0.0.1 localhost
::1 localhost6.localdomain6 localhost6
10.5.102.147 hmog20.h.sharpcast.com hmog20

proxy-server.conf:

=====

[DEFAULT]
cert_file = /etc/swift/cert.crt
key_file = /etc/swift/cert.key
bind_port = 8080
workers = 8
user = swift
log_facility = LOG_LOCAL0

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

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
log_facility = LOG_LOCAL0
log_headers = true
log_level =DEBUG

[filter:tempauth]
use = egg:swift#tempauth
user_system_root = testpass .admin https://$PROXY_LOCAL_NET_IP:8080/v1/AUTH_system
user_admin_admin = admin .admin .reseller_admin
user_test_tester = testing .admin
user_test2_tester2 = testing2 .admin
user_test_tester3 = testing3

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

[filter:cache]
use = egg:swift#memcache
memcache_servers = 10.5.102.147:11211

=====

the IP variable is set properly:

 export PROXY_LOCAL_NET_IP=10.5.102.147

curl -k -v -H 'X-Storage-User: system:root' -H 'X-Storage-Pass: testpass' https://$PROXY_LOCAL_NET_IP:8080/auth/v1.0
* About to connect() to 10.5.102.147 port 8080 (#0)
* Trying 10.5.102.147... connected
* Connected to 10.5.102.147 (10.5.102.147) port 8080 (#0)
...
...
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 NSS/3.12.7.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: 10.5.102.147:8080
> Accept: */*
> X-Storage-User: system:root
> X-Storage-Pass: testpass
>
< HTTP/1.1 200 OK
< X-Storage-Url: https://$PROXY_LOCAL_NET_IP:8080/v1/AUTH_system
< X-Storage-Token: AUTH_tk0d08108db98d475988389e8d24822712
< X-Auth-Token: AUTH_tk0d08108db98d475988389e8d24822712
< Content-Length: 0
< Date: Tue, 28 Aug 2012 15:42:08 GMT

Then:

curl -k -v -H 'X-Auth-Token: AUTH_tk0d08108db98d475988389e8d24822712' https://$PROXY_LOCAL_NET_IP:8080/v1/AUTH_system
* About to connect() to 10.5.102.147 port 8080 (#0)
* Trying 10.5.102.147... connected
* Connected to 10.5.102.147 (10.5.102.147) port 8080 (#0)
...
...
> GET /v1/AUTH_system HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 NSS/3.12.7.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: 10.5.102.147:8080
> Accept: */*
> X-Auth-Token: AUTH_tk0d08108db98d475988389e8d24822712
>
< HTTP/1.1 200 OK
< X-Account-Object-Count: 1
< X-Account-Bytes-Used: 426
< X-Account-Container-Count: 1
< Accept-Ranges: bytes
< Content-Length: 14
< Content-Type: text/plain; charset=utf-8
< Date: Tue, 28 Aug 2012 15:46:11 GMT
<
TestContainer
* Connection #0 to host 10.5.102.147 left intact
* Closing connection #0

I was able to create/upload TestContainer and a file using curl commands.

The 'swift' stat command however still fails :

swift -A https://$PROXY_LOCAL_NET_IP:8080/auth/v1.0 -U system:root -K testpass stat
[Errno -2] Name or service not known

Revision history for this message
Best Alex Yang (alexyang) said :
#6

I know, you must replace the $PROXY_LOCAL_NET_IP with actual IP address in tempauth.
Beacuse the swift-client is not shell, it will not translate the env $PROXY_LOCAL_IP with actual IP address.

Revision history for this message
pbd (pbenard) said :
#7

Thanks Alex!
Indeed that solved the problem - Sorry for such a newbie issue :(
I'll progress from here hopefully.
Thanks,
Pascal