Ask Your Question

Swauth: Account creation failed: 500 server error

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

amit-k-jain gravatar image

Hi all,

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

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

works fine.

Now when I try to add users doing below:

swauth-add-user -K swauthkey -U '.super_admin' -A -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

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



And my proxy server configuration is:

[DEFAULT] bind_port = 443 bind_ip = 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#

[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

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

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

edit flag offensive delete link more

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

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/", line 415, in handle#012 return self.handle_request(req)(env, start_response)#012

File "/usr/local/lib/python2.6/dist-packages/", line 482, in handle_request#012 req.response = handler(req)#012

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

File "/usr/lib/pymodules/python2.6/webob/", 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:="""" auth="" v2="" reseller="" reseller="">,), {})], 'SERVER_NAME': '', 'REMOTE_ADDR': '', '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': '', '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

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

c35sys gravatar image

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

default_swift_cluster = local#

Then restart swift.

Another trick is to use , it will configure everything for you (with swauth).

edit flag offensive delete link more

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

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-11-12 23:37:38 -0600

Seen: 368 times

Last updated: Jun 24 '12