Ask Your Question

Revision history [back]

503 error running multiple-server

I I've been following the instruction on http://swift.openstack.org/howto_installmultinode.html#configure-the-proxy-node. I have three storage and a proxy server running as 4 vms(host only). proxy server: 192.168.175.128 storage 1 : 192.168.175.130 storage 2 :192.168.175.131 storage 3 :192.168.175.133

ring builds perfectly, rebalanced perfectly. rm -f .builder *.ring.gz backups/.builder backups/*.ring.gz

swift-ring-builder object.builder create 18 3 1 swift-ring-builder object.builder add z1-192.168.175.130:6000/sda3 1 swift-ring-builder object.builder add z2-192.168.175.131:6000/sda3 1 swift-ring-builder object.builder add z3-192.168.175.133:6000/sda3 1 swift-ring-builder object.builder rebalance

swift-ring-builder container.builder create 18 3 1 swift-ring-builder container.builder add z1-192.168.175.130:6001/sda3 1 swift-ring-builder container.builder add z2-192.168.175.131:6001/sda3 1 swift-ring-builder container.builder add z3-192.168.175.133:6001/sda3 1 swift-ring-builder container.builder rebalance

swift-ring-builder account.builder create 18 3 1 swift-ring-builder account.builder add z1-192.168.175.130:6002/sda3 1 swift-ring-builder account.builder add z2-192.168.175.131:6002/sda3 1 swift-ring-builder account.builder add z3-192.168.175.133:6002/sda3 1 swift-ring-builder account.builder rebalance

When I was trying to start proxy server, tempauth was not working, and then I noticed swauth is still installed with in swift(I can see all the swauth commands files, like swauth-prep, swauth-add-user under /usr/bin), I've changed my proxy-server.conf as below

[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 swauth proxy-server

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

[filter:swauth] use = egg:swift#swauth default_swift_cluster = local#http://192.168.175.128:8080/v1#http://localhost:8080/v1 super_admin_key = swauthkey

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

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

memcache_servers = 192.168.175.128:11211

then when i try to run

root@ubuntu:/etc/swift# swauth-prep -K swauthkey

Auth subsystem prep failed: 500 Server Error

I get this error in sys.log

Jun 17 04:08:32 ubuntu proxy-server Account PUT returning 503 for [503, 503, 503] (txn: tx9fadfec6-1f85-4e8f-9982-2987bc44465d) Jun 17 04:08:32 ubuntu proxy-server - - 17/Jun/2011/11/08/32 PUT /v1/AUTH_.auth HTTP/1.0 503 - - - - - - tx9fadfec6-1f85-4e8f-9982-2987bc44465d - 0.0125 Jun 17 04:08:32 ubuntu proxy-server STDOUT: EXCEPTION IN handle: Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 320, in handle#012 return self.handle_request(req)(env, start_response)#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 383, in handle_request#012 req.response = handler(req)#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 402, in handle_prep#012 (path, resp.status))#012Exception: Could not create the main auth account: /v1/AUTH_.auth 503 Internal Server Error#012: {'SCRIPT_NAME': '/auth/v2', 'webob.adhoc_attrs': {'start_time': 1308308912.1579649, 'bytes_transferred': '-', 'client_disconnect': False}, 'REQUEST_METHOD': 'POST', 'PATH_INFO': '/.prep', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': '', 'eventlet.posthooks': [(<bound method="" swauth.posthooklogger="" of="" <swift.common.middleware.swauth.swauth="" object="" at="" 0x93d22ac="">>, (<request at="" 0x93dde0c="" post="" http:="" 127.0.0.1:8080="" auth="" v2="" .prep="">,), {})], 'SERVER_NAME': '127.0.0.1', 'REMOTE_ADDR': '127.0.0.1', 'eventlet.input': <eventlet.wsgi.input object="" at="" 0x93da34c="">, 'HTTP_X_AUTH_ADMIN_KEY': 'swauthkey', 'wsgi.url_scheme': 'http', 'SERVER_PORT': '8080', 'HTTP_X_AUTH_ADMIN_USER': '.super_admin', 'HTTP_X_CF_TRANS_ID': 'tx9fadfec6-1f85-4e8f-9982-2987bc44465d', 'wsgi.input': <eventlet.wsgi.input object="" at="" 0x93da34c="">, 'HTTP_HOST': '127.0.0.1:8080', 'swift.cache': <swift.common.memcached.memcachering object="" at="" 0x93d23cc="">, 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <swift.common.utils.loggerfileobject object="" at="" 0x936948c="">, 'wsgi.multiprocess': False, 'CONTENT_TYPE': None, 'HTTP_ACCEPT_ENCODING': 'identity'} (txn: tx9fadfec6-1f85-4e8f-9982-2987bc44465d)

================================ root@ubuntu:/etc/swift# swauth-add-user -K swauthkey -a shengjie shengjie passw0rd Account creation failed: 500 Server Error

User creation failed: 500 Server Error

Jun 17 04:09:40 ubuntu proxy-server - - 17/Jun/2011/11/09/40 HEAD /v1/AUTH_.auth/shengjie HTTP/1.0 404 - - - - - - txd8c7a9fe-7e99-4d87-9f7c-9b404b1ab643 - 0.0130 Jun 17 04:09:40 ubuntu proxy-server - - 17/Jun/2011/11/09/40 PUT /v1/AUTH_.auth/shengjie HTTP/1.0 404 - - - - - - txd8c7a9fe-7e99-4d87-9f7c-9b404b1ab643 - 0.0008 Jun 17 04:09:40 ubuntu proxy-server STDOUT: EXCEPTION IN handle: Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 320, in handle#012 return self.handle_request(req)(env, start_response)#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 383, in handle_request#012 req.response = handler(req)#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 612, in handle_put_account#012 'account: %s %s' % (path, resp.status))#012Exception: Could not create account within main auth account: /v1/AUTH_.auth/shengjie 404 Not Found#012: {'SCRIPT_NAME': '/auth/v2/shengjie', 'webob.adhoc_attrs': {'start_time': 1308308980.1818759, 'bytes_transferred': '-', 'client_disconnect': False}, 'REQUEST_METHOD': 'PUT', 'PATH_INFO': '', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': '', 'eventlet.posthooks': [(<bound method="" swauth.posthooklogger="" of="" <swift.common.middleware.swauth.swauth="" object="" at="" 0x93d22ac="">>, (<request at="" 0x93dde2c="" put="" http:="" 127.0.0.1:8080="" auth="" v2="" shengjie="">,), {})], 'SERVER_NAME': '127.0.0.1', 'REMOTE_ADDR': '127.0.0.1', 'eventlet.input': <eventlet.wsgi.input object="" at="" 0x93da34c="">, 'HTTP_X_AUTH_ADMIN_KEY': 'swauthkey', 'wsgi.url_scheme': 'http', 'SERVER_PORT': '8080', 'HTTP_X_AUTH_ADMIN_USER': '.super_admin', 'HTTP_X_CF_TRANS_ID': 'txd8c7a9fe-7e99-4d87-9f7c-9b404b1ab643', 'wsgi.input': <eventlet.wsgi.input object="" at="" 0x93da34c="">, 'HTTP_HOST': '127.0.0.1:8080', 'swift.cache': <swift.common.memcached.memcachering object="" at="" 0x93d23cc="">, 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <swift.common.utils.loggerfileobject object="" at="" 0x936948c="">, 'wsgi.multiprocess': False, 'CONTENT_TYPE': None, 'HTTP_ACCEPT_ENCODING': 'identity'} (txn: txd8c7a9fe-7e99-4d87-9f7c-9b404b1ab643) Jun 17 04:09:40 ubuntu proxy-server - - 17/Jun/2011/11/09/40 HEAD /v1/AUTH_.auth/shengjie HTTP/1.0 404 - - - - - - txc417a4df-7cd5-4eca-94a2-063a6a60de57 - 0.0118 Jun 17 04:09:40 ubuntu proxy-server STDOUT: EXCEPTION IN handle: Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 320, in handle#012 return self.handle_request(req)(env, start_response)#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 383, in handle_request#012 req.response = handler(req)#012 File "/usr/lib/pymodules/python2.6/swift/common/middleware/swauth.py", line 891, in handle_put_user#012 (path, resp.status))#012Exception: Could not retrieve account id value: /v1/AUTH_.auth/shengjie 404 Not Found#012: {'HTTP_X_CF_TRANS_ID': 'txc417a4df-7cd5-4eca-94a2-063a6a60de57', 'SCRIPT_NAME': '/auth/v2/shengjie/shengjie', 'webob.adhoc_attrs': {'start_time': 1308308980.2007799, 'bytes_transferred': '-', 'client_disconnect': False}, 'REQUEST_METHOD': 'PUT', 'PATH_INFO': '', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': '', 'eventlet.posthooks': [(<bound method="" swauth.posthooklogger="" of="" <swift.common.middleware.swauth.swauth="" object="" at="" 0x93d22ac="">>, (<request at="" 0x93dde8c="" put="" http:="" 127.0.0.1:8080="" auth="" v2="" shengjie="" shengjie="">,), {})], 'SERVER_NAME': '127.0.0.1', 'REMOTE_ADDR': '127.0.0.1', 'eventlet.input': <eventlet.wsgi.input object="" at="" 0x93da30c="">, 'HTTP_X_AUTH_ADMIN_KEY': 'swauthkey', 'wsgi.url_scheme': 'http', 'SERVER_PORT': '8080', 'HTTP_X_AUTH_USER_KEY': 'passw0rd', 'HTTP_X_AUTH_ADMIN_USER': '.super_admin', 'HTTP_X_AUTH_USER_ADMIN': 'true', 'wsgi.input': <eventlet.wsgi.input object="" at="" 0x93da30c="">, 'HTTP_HOST': '127.0.0.1:8080', 'swift.cache': <swift.common.memcached.memcachering object="" at="" 0x93d23cc="">, 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <swift.common.utils.loggerfileobject object="" at="" 0x936948c="">, 'wsgi.multiprocess': False, 'CONTENT_TYPE': None, 'HTTP_ACCEPT_ENCODING': 'identity'} (txn: txc417a4df-7cd5-4eca-94a2-063a6a60de57)