Ask Your Question
0

swauth-prep : httplib.BadStatusLine

asked 2011-10-15 08:44:41 -0500

stand-by-me1190 gravatar image

Hi. I try to run swauth using command :

swauth-prep -K swauthkey Traceback (most recent call last): File "/usr/local/bin/swauth-prep", line 5, in <module> pkg_resources.run_script('swauth==1.0.3.dev', 'swauth-prep') File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/lib/python2.6/dist-packages/swauth-1.0.3.dev-py2.6.egg/EGG-INFO/scripts/swauth-prep", line 57, in <module> resp = conn.getresponse() File "/usr/lib/python2.6/dist-packages/swift/common/bufferedhttp.py", line 95, in getresponse response = HTTPConnection.getresponse(self) File "/usr/lib/python2.6/httplib.py", line 990, in getresponse response.begin() File "/usr/lib/python2.6/httplib.py", line 391, in begin version, status, reason = self._read_status() File "/usr/lib/python2.6/httplib.py", line 355, in _read_status raise BadStatusLine(line)

Here's my proxy-server.config :

[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 set log_name=swift-proxy set log_level = DEBUG set log_headers =True

[filter:swauth] use = egg:swauth#swauth set log_name = swift-swauth set log_level =DEBUG
set log_headers= True
super_admin_key = swauthkey defaul_swift_cluster = local#https://10.2.48.90:8080/v1

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

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

Please help me resolve this problem. Thank.

edit retag flag offensive close merge delete

6 answers

Sort by ยป oldest newest most voted
0

answered 2011-10-21 15:38:52 -0500

tonytkdk gravatar image

Thanks btorch........ very clear now

edit flag offensive delete link more
0

answered 2012-06-26 11:09:08 -0500

forgot to mention the version i am installing essex

edit flag offensive delete link more
0

answered 2011-10-18 00:56:51 -0500

btorch gravatar image

Try giving the Auth URL ... you can find out the flags with --help

edit flag offensive delete link more
0

answered 2011-10-21 15:24:11 -0500

btorch gravatar image

Hi Hugo,

Two things you need to correct.

1) Your proxy-server.conf needs to have "#allow_account_management = true" uncommented. 2) Your "swift-prep" command needs to have the URL as it's shown in the help output * Obviously if you change port numbers and enable SSL, you would modify the Auth URL according to your changes.

So, the command you should run is "swauth-prep -K skey -A http://127.0.0.1:8080/auth/%22 (http://127.0.0.1:8080/auth/")

root@saio-1:~# swauth-prep --help Usage: swauth-prep [options]

Options: -h, --help show this help message and exit

-A ADMIN_URL, --admin-url=ADMIN_URL The URL to the auth subsystem (default: http://127.0.0.1:8080/auth/

-U ADMIN_USER, --admin-user=ADMIN_USER The user with admin rights to add users (default: .super_admin).

-K ADMIN_KEY, --admin-key=ADMIN_KEY The key for the user with admin rights to add users.

edit flag offensive delete link more
0

answered 2011-10-20 18:44:57 -0500

tonytkdk gravatar image

root@swift:~# swauth-prep -K skey -A http://127.0.0.1:8080/v1 Auth subsystem prep failed: 401 Unauthorized root@swift:~# swauth-prep -K skey -A http://127.0.0.1:8080/auth Auth subsystem prep failed: 500 Server Error root@swift:~# swauth-prep -K skey -A http://127.0.0.1:8080/auth/v1.0 Auth subsystem prep failed: 400 Bad Request root@swift:~# swauth-prep -K skey -A http://127.0.0.1:8080 Auth subsystem prep failed: 401 Unauthorized

withi Swauth + swift 1.4.4 .......which line is correct to initialize the Swauth backing store ??

My proxy-server.conf :

[DEFAULT] bind_port = 8080 user = root log_facility = LOG_LOCAL1

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

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

[filter:swauth] use = egg:swauth#swauth set log_name = swift-swauth set log_level =DEBUG set log_headers= True super_admin_key = skey defaul_swift_cluster = local#http://192.168.1.104:8080/v1#http://127.0.0.1:8080/v1

#[filter:keystone] #use = egg:keystone#tokenauth #auth_protocol = http #auth_host = 192.168.1.105 #auth_port = 35357 #admin_token = 999888777666 #delay_auth_decision = 0 #service_protocol = http #service_host = 192.168.1.105 #service_port = 8100 #service_pass = dTpw

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

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

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

edit flag offensive delete link more
0

answered 2012-06-26 10:09:15 -0500

I tried the same command

swauth-prep -U .super_admin -K swauthkey -A http://192.168.1.214:8080/auth

It is working fine in my command line but my Dashboard Containers listing is giving problem

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]

For DevAuth:

pipeline = healthcheck cache auth proxy-server

For Swauth:

pipeline = healthcheck cache swauth proxy-server

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

Only needed for DevAuth

[filter:auth]

use = egg:swift#auth

ssl = true

Only needed for Swauth

[filter:swauth] use = egg:swift#swauth set log_name = swift-swauth set log_level =DEBUG set log_headers= True default_swift_cluster = local#http://192.168.1.214:8080/v1#http://127.0.0.1:8080/v1

Highly recommended to change this key to something else!

super_admin_key = swauthkey

#[filter:authtoken] #paste.filter_factory = keystone.middleware.auth_token:filter_factory #service_protocol = http #service_host = 192.168.1.213 #service_port = 5000 #auth_host = 192.168.1.213 #auth_port = 35357 #auth_protocol = http #auth_uri = http://192.168.1.213:5000/ #admin_tenant_name = service #admin_user = swift #admin_password = swift #delay_auth_decision = 0

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

[filter:cache] use = egg:swift#memcache memcache_servers = 192.168.1.214:11211 set log_name = cache

If I add the following in the proxy server, I am getting "Auth subsystem prep failed: 500 Server Error" and still the dashboard fails

[filter:swiftauth] paste.filter_factory = keystone.middleware.swift_auth:filter_factory operator_roles = admin, SwiftOperator is_admin = true

[filter:authtoken] paste.filter_factory = keystone.middleware.auth_token:filter_factory service_protocol = http service_host = 192.168.1.213 service_port = 5000 auth_host = 192.168.1.213 auth_port = 35357 auth_protocol = http auth_uri = http://192.168.1.213:5000/ admin_tenant_name = service admin_user = swift admin_password = swift delay_auth_decision = 0

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-10-15 08:44:41 -0500

Seen: 324 times

Last updated: Jun 26 '12