Ask Your Question
0

swauth failed in swift: Account creation failed: 500 Server Error

asked 2013-10-29 09:30:42 -0500

qi-weining gravatar image

tempauth and swauth both failed. I want to use swauth.

"swauth-prep -K swauthkey" OK. "swauth-add-user" is wrong.

I have changed "default_swift_cluster = cluster_name#https://210...*:8080/v1" to "default_swift_cluster = cluster_name#https://192.168.1.2:8080/v1" and "default_swift_cluster = local#https://127.0.0.1/v1", nothing help.

swift@cloud1:~$ swift-init proxy start WARNING: Unable to increase file descriptor limit. Running as non-root? Starting proxy-server...(/etc/swift/proxy-server.conf) swift@cloud1:~$ swauth-prep -K swauthkey swift@cloud1:~$ vi /var/log/syslog swift@cloud1:~$ swauth-add-user -A http://210. .*:8080/auth/ -K swauthkey -a test tester testing Account creation failed: 500 Server Error swift@cloud1:~$ swauth-add-user -A http://192.168.1.2:8080/auth/ -K swauthkey -a test tester testing Account creation failed: 500 Server Error swift@cloud1:~$ swauth-add-user -A http://127.0.0.1:8080/auth/ -K swauthkey -a test tester testing Account creation failed: 500 Server Error

I have four DELL servers. (1) proxy server IP:210...*, 192.168.1.2 (2) storage server IP:192.168.1.3 (3) storage server IP:192.168.1.4 (4) storage server IP:192.168.1.5

/etc/swift/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 = catch_errors healthcheck cache swauth proxy-server
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

[filter:swauth] use = egg:swauth#swauth

Highly recommended to change this.

super_admin_key = swauthkey #default_swift_cluster = local#http://127.0.0.1:8080/auth/v1.0 default_swift_cluster = cluster_name#https://210...*:8080/v1

#[filter:tempauth] #use = egg:swift#tempauth #user_system_root = testpass.admin https://192.168.1.2: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:catch_errors] #use = egg:swift#catch_errors

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

log in /var/log/syslog Oct 29 17:11:56 cloud1 proxy-server Started child 2066 Oct 29 17:12:26 cloud1 proxy-server - 127.0.0.1 29/Oct/2013/09/12/26 POST /auth/v2/.prep HTTP/1.0 204 - - .super_admin - - - - - 0.2906 Oct 29 17:16:43 cloud1 proxy-server - 210.. .* 29/Oct/2013/09/16/43 GET /auth/v2/test HTTP/1.0 404 - - .super_admin - - - - - 0.0128 Oct 29 17:16:43 cloud1 proxy-server ERROR WSGI: code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\xcc\x01\x00\x00\xc8\x03\x02Ro|\xfbS`v2|BD\x98>\xb8\xd8\x12\x11H\x9e\xfbU\xfd\x91\x8b\xc4\xde\xa3\x9fa') Oct 29 17:16:43 cloud1 proxy-server ERROR: Exception while trying to communicate with https://210.75.225.40:8080//v1/AUTH_48b22037-a54b-4f6d-9177-5e8e8c3b491a (https://210.75.225.40:8080//v1/AUTH_4...) (txn: txbc630a7ec5984316a0d8dbface8a7212) Oct 29 17:16:43 cloud1 proxy-server STDOUT: EXCEPTION IN handle: Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/swauth-1.0.8-py2.7.egg/swauth/middleware.py", line 454, in handle#012 ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2013-10-29 10:47:16 -0500

qi-weining gravatar image

I have changed "/etc/swift/proxy-server.conf". And it runs.

swift@cloud1:~$ vi /etc/swift/proxy-server.conf swift@cloud1:~$ swift-init proxy stop Signal proxy-server pid: 2322 signal: 15 No proxy-server running swift@cloud1:~$ swift-init proxy start WARNING: Unable to increase file descriptor limit. Running as non-root? Starting proxy-server...(/etc/swift/proxy-server.conf) swift@cloud1:~$ swauth-prep -K swauthkey swift@cloud1:~$ swauth-add-user -A http://127.0.0.1:8080/auth/ -K swauthkey -a test tester testing

swift@cloud1:~$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat -v StorageURL: http://210.75.225.40:8080/v1/AUTH_fd28eaae-f8e1-4565-8778-bcc797b4b582 (http://210.75.225.40:8080/v1/AUTH_fd2...) Auth Token: AUTH_tk676b9a0e318b47b0ad88c5efbc5758fb Account: AUTH_fd28eaae-f8e1-4565-8778-bcc797b4b582 Containers: 0 Objects: 0 Bytes: 0 Accept-Ranges: bytes X-Timestamp: 1383040923.86914 Content-Type: text/plain; charset=utf-8

swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing upload test1 cert.key cert.key swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing upload test1 proxy_server.conf Local file 'proxy_server.conf' not found swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing upload test1 proxy-server.conf proxy-server.conf swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat -v StorageURL: http://210.75.225.40:8080/v1/AUTH_fd28eaae-f8e1-4565-8778-bcc797b4b582 (http://210.75.225.40:8080/v1/AUTH_fd2...) Auth Token: AUTH_tk676b9a0e318b47b0ad88c5efbc5758fb Account: AUTH_fd28eaae-f8e1-4565-8778-bcc797b4b582 Containers: 1 Objects: 1 Bytes: 912 Accept-Ranges: bytes X-Timestamp: 1383040923.86914 Content-Type: text/plain; charset=utf-8 swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat -v StorageURL: http://210.75.225.40:8080/v1/AUTH_fd28eaae-f8e1-4565-8778-bcc797b4b582 (http://210.75.225.40:8080/v1/AUTH_fd2...) Auth Token: AUTH_tk676b9a0e318b47b0ad88c5efbc5758fb Account: AUTH_fd28eaae-f8e1-4565-8778-bcc797b4b582 Containers: 1 Objects: 1 Bytes: 912 Accept-Ranges: bytes X-Timestamp: 1383040923.86914 Content-Type: text/plain; charset=utf-8 swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing list
test1 swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing list test1 cert.key proxy-server.conf swift@cloud1:/etc/swift$ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat
Account: AUTH_fd28eaae-f8e1-4565-8778-bcc797b4b582 Containers: 1 Objects: 1 Bytes: 912 Accept-Ranges: bytes X-Timestamp: 1383040923.86914 Content-Type: text/plain; charset=utf-8

[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 = catch_errors healthcheck cache swauth proxy-server
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

[filter:swauth] use = egg:swauth#swauth

Highly recommended to change this.

super_admin_key = swauthkey default_swift_cluster = local#http://210.75.225.40:8080/v1#http://192.168.1.2:8080/v1#http://127.0 ... (more)

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: 2013-10-29 09:30:42 -0500

Seen: 615 times

Last updated: Oct 29 '13