Ask Your Question
0

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

asked 2012-08-24 17:58:38 -0500

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.

edit retag flag offensive close merge delete

7 answers

Sort by ยป oldest newest most voted
0

answered 2012-08-28 16:21:39 -0500

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

edit flag offensive delete link more
0

answered 2012-08-28 16:11:16 -0500

alexyang gravatar image

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.

edit flag offensive delete link more
0

answered 2012-08-27 07:31:54 -0500

alexyang gravatar image

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.

edit flag offensive delete link more
0

answered 2012-08-27 17:17:32 -0500

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

edit flag offensive delete link more
0

answered 2012-08-27 17:19:31 -0500

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

P.

edit flag offensive delete link more
0

answered 2012-08-28 01:56:05 -0500

alexyang gravatar image

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

edit flag offensive delete link more
0

answered 2012-08-28 15:49:26 -0500

Hello,

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

hosts:

127.0.0.1 localhost ::1 localhost6.localdomain6 localhost6 10.5.102.147 http://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

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: 2012-08-24 17:58:38 -0500

Seen: 169 times

Last updated: Aug 28 '12