Ask Your Question
0

Swauth: Account creation failed: 500 server error

asked 2011-11-12 23:37:38 -0500

amit-k-jain gravatar image

Hi all,

I've installed Swift as Swift-all-in-one as described in the

http://www.slideshare.net/joshuamckenty/openstack-swift-msst-2011-tutorial-day (http://www.slideshare.net/joshuamcken...)

the above describes Swift installation when Swauth was part of Swift. To work with current version, I had to install Swauth as a separate component.

That went good and I'm able to get proxy server up and running along with other components.

Doing this

swauth-prep -K swauthkey -U '.super_admin' -A https://192.168.6.128:443/auth/

works fine.

Now when I try to add users doing below:

swauth-add-user -K swauthkey -U '.super_admin' -A https://192.168.6.128:443/auth/ -a test tester testing

I get Account creation failed: 500 Server Error.

Seems like part of this command is working as when I do

swauth-list -K swauthkey -U '.super_admin' -A https://192.168.6.128:443/auth/

I see that the account has been added:

{"accounts": [{"name": "test"}]}

Could you help me to know what I'm doing wrong.

Here is my account server configuration:

[DEFAULT] devices = /srv/1/node mount_check = false bind_port = 6012 user = swiftdemo log_facility = LOG_LOCAL2

[pipeline:main] pipeline = account-server

[app:account-server] use = egg:swift#account

[account-replicator] vm_test_mode = yes

[account-auditor]

[account-reaper]

And my proxy server configuration is:

[DEFAULT] bind_port = 443 bind_ip = 192.168.6.128 cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key user = swiftdemo log_facility = LOG_LOCAL1

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

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

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

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

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

The swift.conf only has the configuration for swauthkey.

Please let me know if anything else is needed. Thanks for help, Amit

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2012-06-24 16:29:16 -0500

I had the same problem. Can someone show me how to solue this problem.

edit flag offensive delete link more
0

answered 2011-11-13 00:45:50 -0500

amit-k-jain gravatar image

Output in /var/log/syslog shows following:

Nov 12 16:42:45 ubuntu proxy-server STDOUT: EXCEPTION IN handle: Traceback (most recent call last):#012

File "/usr/local/lib/python2.6/dist-packages/swauth-1.0.3.dev-py2.6.egg/swauth/middleware.py", line 415, in handle#012 return self.handle_request(req)(env, start_response)#012

File "/usr/local/lib/python2.6/dist-packages/swauth-1.0.3.dev-py2.6.egg/swauth/middleware.py", line 482, in handle_request#012 req.response = handler(req)#012

File "/usr/local/lib/python2.6/dist-packages/swauth-1.0.3.dev-py2.6.egg/swauth/middleware.py", line 1008, in handle_put_user#012 resp.headers['x-container-meta-account-id']}#012

File "/usr/lib/pymodules/python2.6/webob/headers.py", line 16, in __getitem__#012 raise KeyError(key)#012KeyError: 'x-container-meta-account-id'#012: {'HTTP_X_CF_TRANS_ID': 'tx9bf80c55-2c77-4823-b615-8255e31f07f9', 'SCRIPT_NAME': '/auth/v2/reseller/reseller', 'webob.adhoc_attrs': {'start_time': 1321144965.590857, 'bytes_transferred': '-', 'client_disconnect': False}, 'REQUEST_METHOD': 'PUT', 'PATH_INFO': '', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': '', 'eventlet.posthooks': [(<bound method="" swauth.posthooklogger="" of="" <swauth.middleware.swauth="" object="" at="" 0x92b24ec="">>, (<request at="" 0x935828c="" put="" https:="" 192.168.6.128="" auth="" v2="" reseller="" reseller="">,), {})], 'SERVER_NAME': '192.168.6.128', 'REMOTE_ADDR': '192.168.6.128', 'eventlet.input': <eventlet.wsgi.input object="" at="" 0x92bd30c="">, 'HTTP_X_AUTH_ADMIN_KEY': 'firepass', 'wsgi.url_scheme': 'https', 'SERVER_PORT': '443', 'HTTP_X_AUTH_USER_KEY': 'reseller', 'HTTP_X_AUTH_ADMIN_USER': '.super_admin', 'HTTP_X_AUTH_USER_ADMIN': 'true', 'wsgi.input': <eventlet.wsgi.input object="" at="" 0x92bd30c="">, 'HTTP_HOST': '192.168.6.128', 'swift.cache': <swift.common.memcached.memcachering object="" at="" 0x92b59ec="">, 'HTTPS': 'on', 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <swift.common.utils.loggerfileobject object="" at="" 0x92b708c="">, 'wsgi.multiprocess': False, 'CONTENT_TYPE': None, 'HTTP_ACCEPT_ENCODING': 'identity'}

edit flag offensive delete link more
0

answered 2011-11-16 10:59:33 -0500

c35sys gravatar image

Try to modify "default_swift_cluster" in "[filter:swauth]" section as following:

default_swift_cluster = local#https://192.168.6.128:443/v1#https://127.0.0.1:443/v1

Then restart swift.

Another trick is to use https://github.com/btorch/swift-saio.sh , it will configure everything for you (with swauth).

edit flag offensive delete link more
0

answered 2012-06-22 08:51:29 -0500

I did that and also I added account_autocreate = true in

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

still I am getting the same error I dont want to use the saio. What is the solution

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-11-12 23:37:38 -0500

Seen: 294 times

Last updated: Jun 24 '12