Ask Your Question
0

Failed to get Get an X-Storage-Url and X-Auth-Token

asked 2011-08-05 10:08:56 -0500

gyliu gravatar image

Hi All,

I'm currently trying to create a swift environment for some test, but got the following error when getting an X-Storage-Url and X-Auth-Token using test command.

root@proxy-node:/etc/swift# 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 172.17.1.121 port 8080 (#0) * Trying 172.17.1.121... connected * Connected to 172.17.1.121 (172.17.1.121) port 8080 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSL connection using AES256-SHA * Server certificate: * subject: C=CH; ST=SHANXI; L=XIAN; O=Platform; OU=Computing; CN=Guangya; emailAddress=gyliu@platform.com * start date: 2011-08-05 09:36:55 GMT * expire date: 2011-09-04 09:36:55 GMT * common name: Guangya (does not match '172.17.1.121') * issuer: C=CH; ST=SHANXI; L=XIAN; O=Platform; OU=Computing; CN=Guangya; emailAddress=gyliu@platform.com * SSL certificate verify result: self signed certificate (18), continuing anyway.

GET /auth/v1.0 HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 Host: 172.17.1.121:8080 Accept: / X-Storage-User: system:root X-Storage-Pass: testpass

< HTTP/1.1 401 Unauthorized < Content-Length: 358 < Content-Type: text/html; charset=UTF-8 < Date: Fri, 05 Aug 2011 09:57:37 GMT < <html> <head> <title>401 Unauthorized</title> </head> <body>

401 Unauthorized

This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.

</body> * Connection #0 to host 172.17.1.121 left intact * Closing connection #0 * SSLv3, TLS alert, Client hello (1): </html>root@proxy-node:/etc/swift# vi proxy-server.conf

root@proxy-node:/etc/swift# cat proxy-server.conf [DEFAULT] cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key bind_port = 8080 workers = 8 user = swift

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

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

[filter:auth] use = egg:swift#auth user_system_root = testpass .admin https://172.17.1.121:8080/v1/AUTH_system

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

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

I was using multi-node configuration, the steps that I followed is get from: http://swift.openstack.org/howto_installmultinode.html (http://swift.openstack.org/howto_inst...)

Thanks,

Guangya Liu gyliu@platform.com

edit retag flag offensive close merge delete

9 answers

Sort by ยป oldest newest most voted
0

answered 2011-08-10 10:28:39 -0500

gyliu gravatar image

Can anyone give a help? Thanks!

edit flag offensive delete link more
0

answered 2011-08-05 14:38:02 -0500

gyliu gravatar image

BTW: I was using http://swift.openstack.org/howto_installmultinode.html (http://swift.openstack.org/howto_inst...) for my multi node configuration. Thanks

edit flag offensive delete link more
0

answered 2011-08-05 10:10:33 -0500

gyliu gravatar image

It would be highly appreciated if some one can give some on-time help!

edit flag offensive delete link more
0

answered 2011-08-05 10:53:24 -0500

gyliu gravatar image

/var/log/syslog report the following:

Aug 5 18:44:01 proxy-node proxy-server - 172.17.1.121 05/Aug/2011/10/44/01 GET /auth/v1.0 HTTP/1.0 401 - curl/7.19.7%20%28x86_64-pc-linux-gnu%29%20libcurl/7.19.7%20OpenSSL/0.9.8k%20zlib/1.2.3.3%20libidn/1.15 - - - - tx0d3c87d4-c21d-49d7-bd88-89b9c57c5d58 - 0.0005 Aug 5 18:50:12 proxy-node proxy-server - 172.17.1.121 05/Aug/2011/10/50/12 GET /auth/v1.0 HTTP/1.0 401 - curl/7.19.7%20%28x86_64-pc-linux-gnu%29%20libcurl/7.19.7%20OpenSSL/0.9.8k%20zlib/1.2.3.3%20libidn/1.15 - - - - tx03fb2b60-163f-43db-ad37-689bcf189975 - 0.0004

edit flag offensive delete link more
0

answered 2011-08-05 13:59:24 -0500

annegentle gravatar image

Hi Guangya - I'm no expert on the swift authorization systems but I've played with it many a time, just not with the latest trunk. My guess is that you need this tempauth line rather than the current auth in the [filter:auth] section.

[filter:tempauth] use = egg:swift#tempauth user_system_root = testpass .admin https://$PROXY_LOCAL_NET_IP:8080/v1/AUTH_system

To give you a little history, the Swift project used to supply a project called swauth within the Swift project, but that is now separated out - see https://tlohg.wordpress.com/2011/06/0... .

With the incubation of Keystone, a common auth project for the OpenStack projects, the tempauth is a placeholder. Someone else can probably better advise you for your situation, but let us know if you're setting up a proof of concept or doing a full deployment and we can help with the auth piece.

Anne

edit flag offensive delete link more
0

answered 2011-08-05 14:35:05 -0500

gyliu gravatar image

Thanks Anne for the quick response, after I update proxy-server, I got the previous error in /var/log/syslog:

Aug 5 22:30:44 proxy-node proxy-server UNCAUGHT EXCEPTION#012Traceback (most recent call last):#012 File "/usr/bin/swift-proxy-server", line 22, in <module>#012 run_wsgi(conf_file, 'proxy-server', default_port=8080, *options)#012 File "/usr/lib/pymodules/python2.6/swift/common/wsgi.py", line 126, in run_wsgi#012 app = loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 204, in loadapp#012 return loadobj(APP, uri, name=name, *kw)#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 224, in loadobj#012 global_conf=global_conf)#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext#012 global_conf=global_conf)#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 278, in _loadconfig#012 return loader.get_context(object_type, name, global_conf)#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 405, in get_context#012 global_additions=global_additions)#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 503, in _pipeline_app_context#012 for name in pipeline[:-1]]#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 363, in get_context#012 object_type, name=name)#012 File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 528, in find_config_section#012 self.filename))#012LookupError: No section 'auth' (prefixed by 'filter') found in config /etc/swift/proxy-server.conf

I searched this problem and found the logger by resolving the problem using auth instead of tempauth: https://answers.launchpad.net/swift/+question/164132 (https://answers.launchpad.net/swift/+...)

BTW: I'm going to first create a POC env and later might put into producton, so it would be great if I can get a solution for this.

So can you please give more help on this? Again, thanks very much for your help. ;-)

edit flag offensive delete link more
0

answered 2011-08-09 02:35:56 -0500

gyliu gravatar image

Hi, I was able to create a single node swift and it runs well with swauth, but when run multi-node, I got into the following errors, can someone give any help? Thanks.

/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf /usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py:8: UserWarning: Module netifaces was already imported from /usr/lib/pymodules/python2.6/netifaces.so, but /usr/lib/pymodules/python2.6 is being added to sys.path import pkg_resources Traceback (most recent call last): File "/usr/bin/swift-proxy-server", line 22, in <module> run_wsgi(conf_file, 'proxy-server', default_port=8080, *options) File "/root/swift/trunk/swift/common/wsgi.py", line 122, in run_wsgi File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 204, in loadapp return loadobj(APP, uri, name=name, *kw) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 224, in loadobj global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 278, in _loadconfig return loader.get_context(object_type, name, global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 405, in get_context global_additions=global_additions) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 503, in _pipeline_app_context for name in pipeline[:-1]] File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 409, in get_context section) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 431, in _context_from_use object_type, name=use, global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 361, in get_context global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 285, in _loadegg return loader.get_context(object_type, name, global_conf) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 561, in get_context object_type, name=name) File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 587, in find_egg_entry_point possible.append((entry.load(), protocol, entry.name)) File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) ImportError: No module named middleware.healthcheck

edit flag offensive delete link more
0

answered 2011-08-11 23:53:06 -0500

I have exactly same problem. I used http://swift.openstack.org/howto_installmultinode.html (http://swift.openstack.org/howto_inst...) How do I figure out which version I am using? Is it 1.3 or 1.4.3?

1) Initially I used tempauth - pipeline = healthcheck cache tempauth proxy-server With that swift-proxy-server /etc/swift/proxy-server.conf would not start at all.

root@proxyServer:~# swift-proxy-server /etc/swift/proxy-server.conf /usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py:8: UserWarning: Module netifaces was already imported from /usr/lib/pymodules/python2.6/netifaces.so, but /usr/lib/pymodules/python2.6 is being added to sys.path import pkg_resources root@proxyServer:~# ps aux|grep swift root 2863 0.0 0.1 7624 900 pts/0 S+ 16:00 0:00 grep --color=auto swift ... and no one uses port 8080 ...

2) I changed tempauth to auth [DEFAULT] cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key bind_port = 8080 workers = 8 user = swift

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

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

[filter:auth] use = egg:swift#auth user_system_root = testpass .admin https://192.168.0.1:8080/v1/AUTH_system

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

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

Now I get < HTTP/1.1 401 Unauthorized < Content-Length: 358 < Content-Type: text/html; charset=UTF-8 < Date: Thu, 11 Aug 2011 23:15:26 GMT < <html> <head> <title>401 Unauthorized</title> </head> <body>

401 Unauthorized

This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.

edit flag offensive delete link more
0

answered 2011-08-12 16:24:57 -0500

I am suspicious of the version of swift we get. apt-cache show swift shows: Package: swift Source: swift Priority: optional Section: net Installed-Size: 284 Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Architecture: all Version: 1.2.0-0ubuntu1~lucid0 Depends: python-swift (= 1.2.0-0ubuntu1~lucid0), python (>= 2.6) Filename: pool/main/s/swift/swift_1.2.0-0ubuntu1~lucid0_all.deb Size: 57176 MD5sum: ede471f408957e541c1d05904d53a19a SHA1: 097e7ded1382df1a228c02621676057999462933 Description: A distributed virtual object store (common files) Swift is a distributed virtual object store. Original-Maintainer: Soren Hansen soren@ubuntu.com

It looks like while following instructions we get release 1.2 which is swift latest release and not 1.4.3 as stated in http://swift.openstack.org/howto_installmultinode.html (http://swift.openstack.org/howto_inst...)

So we need to these instructions to install: http://swift.openstack.org/1.2/howto_installmultinode.html (http://swift.openstack.org/1.2/howto_...)

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-08-05 10:08:56 -0500

Seen: 189 times

Last updated: Aug 12 '11