[Openstack] BadStatusLine: '' between Swift-proxy and Keystone (Ubuntu 12.04 - Havana)
thorfinn at poivron.org
thorfinn at poivron.org
Wed Oct 23 14:44:45 UTC 2013
Hi all.
I installed Swift nodes on Ubuntu 12.04 and ubuntu-cloud-archives repo
(Havana version) using these guides
http://docs.openstack.org/havana/install-guide/install/apt/content/ch_swift.html
http://docs.openstack.org/developer/swift/howto_installmultinode.html
Here's our software configuration :
* HAproxy : 192.168.3.251
# Swift Proxy
listen dev-swiftproxy 0.0.0.0:8080
mode tcp
balance source
option tcplog
option tcpka
source 0.0.0.0 usesrc clientip
server controller-1 192.168.3.111:8080 check inter 2000 rise 2
fall 5
server controller-2 192.168.3.211:8080 check inter 2000 rise 2
fall 5
# Keystone
listen dev-auth-public 0.0.0.0:5000
mode http
balance source
option httplog
option httpclose
option forwardfor
server controller1 192.168.3.141:5000 check inter 2000 rise 2 fall
5
server controller2 192.168.3.241:5000 check inter 2000 rise 2 fall
5
listen dev-auth-admin 0.0.0.0:35357
mode http
balance source
option httplog
option httpclose
option forwardfor
server controller1 192.168.3.141:35357 check inter 2000 rise 2
fall 5
server controller2 192.168.3.241:35357 check inter 2000 rise 2
fall 5
* Keystone 1 : 192.168.3.141
* Keystone 2 : 192.168.3.241
* Swift proxy 1 : 192.168.3.111
* Swift proxy 2 : 192.168.3.211
My proxy-server.conf is:
[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 authtoken keystoneauth proxy-server
[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = admin
[filter:authtoken]
paste.filter_factory =
keystoneclient.middleware.auth_token:filter_factory
# Delaying the auth decision is required to support token-less
# usage for anonymous referrers ('.r:*').
delay_auth_decision = true
# cache directory for signing certificate
signing_dir = /home/swift/keystone-signing
# auth_* settings refer to the Keystone server
auth_protocol = http
auth_host = 192.168.3.251
auth_port = 35357
# the same admin_token as provided in keystone.conf
admin_token = pass
# the service tenant and swift userid and password created in
Keystone
admin_tenant_name = service
admin_user = swift
admin_password = swift
[filter:cache]
use = egg:swift#memcache
memcache_servers = 192.168.1.111:11211
[filter:catch_errors]
use = egg:swift#catch_errors
[filter:healthcheck]
use = egg:swift#healthcheck
In the "Verify the installation" part when I execute (through HAProxy)
:
# swift --debug -V 2.0 -A http://192.168.3.251:5000/v2.0 -U
service:swift -K swift stat
I have this error :
# swift --debug -V 2.0 -A http://192.168.3.251:5000/v2.0 -U
service:swift -K swift stat
REQ: curl -i -X POST http://192.168.3.251:5000/v2.0/tokens -H
"Content-Type: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.httpclient:REQ: curl -i -X POST
http://192.168.3.251:5000/v2.0/tokens -H "Content-Type:
application/json" -H "User-Agent: python-keystoneclient"
REQ BODY: {"auth": {"tenantName": "service", "passwordCredentials":
{"username": "swift", "password": "swift"}}}
DEBUG:keystoneclient.httpclient:REQ BODY: {"auth": {"tenantName":
"service", "passwordCredentials": {"username": "swift", "password":
"swift"}}}
INFO:urllib3.connectionpool:Starting new HTTP connection (1):
192.168.3.251
DEBUG:urllib3.connectionpool:"POST /v2.0/tokens HTTP/1.1" 200 3313
RESP: [200] CaseInsensitiveDict({'date': 'Wed, 23 Oct 2013 13:56:40
GMT', 'vary': 'X-Auth-Token', 'content-length': '3313', 'content-type':
'application/json', 'connection': 'close'})
RESP BODY: {"access": {"token": {"issued_at":
"2013-10-23T13:56:40.365230", "expires": "2013-10-24T13:56:40Z", "id":
"MIIGTQYJKoZIhvcNAQcCoIIGPjCCBjoCAQExCTAHBgUrDgMCGjCCBKMGCSqGSIb3DQEHAaCCBJQEggSQeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMC0yM1QxMzo1Njo0MC4zNjUyMzAiLCAiZXhwaXJlcyI6ICIyMDEzLTEwLTI0VDEzOjU2O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9XSwgImVuZHBvaW50c19saW5rcyI6IFtdLCAidHlwZSI6ICJpZGVudGl0eSIsICJuYW1lIjogImtleXN0b25lIn1dLCAidXNlciI6IHsidXNlcm5hbWUiOiAic3dpZnQiLCAicm9sZXNfbGlua3MiOiBbXSwgImlkIjogIjYzZWVjNjMyYWI3NTRiYzY5NTgzY2M0YTI5Yjc0MDVmIiwgInJvbGVzIjogW3sibmFtZSI6ICJhZG1pbiJ9XSwgIm5hbWUiOiAic3dpZnQifSwgIm1ldGFkYXRhIjogeyJpc19hZG1pbiI6IDAsICJyb2xlcyI6IFsiZjUwNjczYjliNDUwNDQyZGI1OGRkYTExYjQ4M2ZkMmUiXX19fTGCAYEwggF9AgEBMFwwVzELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVVuc2V0MQ4wDAYDVQQHDAVVbnNldDEOMAwGA1UECgwFVW5zZXQxGDAWBgNVBAMMD3d3dy5leGFtcGxlLmNvbQIBATAHBgUrDgMCGjANBgkqhkiG9w0BAQEFAASCAQAIQUsQ3aCgXsBUZsNToOHh9nSNs3BYbuIQjtrNQaYU65AILsYM+I+kh-woSfjdx29gjnU3G-X0jonYc2wv+OrY3A7DPQjuCov5rPpbm05wOZdXyEp4udXPFR69W5oWcM4K-dzLBBkJBhItKMQ-Jo3SwqxyZIkqP8mfakEDeNwfHGS
+1JDM080
jIU3CZ-h0fnT2+TonXTJpd6if48P2qM5laPAaOjOeC51EGd5gU7-BUhnAgKmlRDy1pWiC953lqM+LR99MEHmdSk03ouMS2Gi9SwSsWn8ZcZDjnwjjr7zJQSbcNMzIM29aU91s8M6AQ9iBLiHNltCcyewmzBb9JRo0",
"tenant": {"description": "Service Tenant", "enabled": true, "id":
"5becb4a93e7f498bbe83534f4481dc0d", "name": "service"}},
"serviceCatalog": [{"endpoints": [{"adminURL":
"http://192.168.3.251:8080/v1/AUTH_5becb4a93e7f498bbe83534f4481dc0d",
"region": "regionOne", "internalURL":
"http://192.168.3.251:8080/v1/AUTH_5becb4a93e7f498bbe83534f4481dc0d",
"id": "37aed18776d9453db72a7875ec7e69da", "publicURL":
"http://192.168.3.251:8080/v1/AUTH_5becb4a93e7f498bbe83534f4481dc0d"}],
"endpoints_links": [], "type": "object-store", "name": "swift"},
{"endpoints": [{"adminURL": "http://192.168.3.251:35357/v2.0", "region":
"regionOne", "internalURL": "http://192.168.3.251:5000/v2.0", "id":
"0bf7216352ac418fa385d5ff3ff89f30", "publicURL":
"http://192.168.3.251:5000/v2.0"}], "endpoints_links": [], "type":
"identity", "name": "keystone"}], "user": {"username": "swift",
"roles_links": [], "id": "63eec632ab754bc69583cc4a29b7405f", "roles":
[{"name": "admin"}], "name": "swift"}, "metadata": {"is_admin": 0,
"roles": ["f50673b9b450442db58dda11b483fd2e"]}}}
DEBUG:keystoneclient.httpclient:RESP: [200]
CaseInsensitiveDict({'date': 'Wed, 23 Oct 2013 13:56:40 GMT', 'vary':
'X-Auth-Token', 'content-length': '3313', 'content-type':
'application/json', 'connection': 'close'})
RESP BODY: {"access": {"token": {"issued_at":
"2013-10-23T13:56:40.365230", "expires": "2013-10-24T13:56:40Z", "id":
"MIIGTQYJKoZIhvcNAQcCoIIGPjCCBjoCAQExCTAHBgUrDgMCGjCCBKMGCSqGSIb3DQEHAaCCBJQEggSQeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMC0yM1QxMzo1Njo0MC4zNjUyMzAiLCAiZXhwaXJlcyI6ICIyMDEzLTEwLTI0VDEzOjU2OjQwWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIlNlcnZpY2UgVGVuYW50IiwgImVuYWJsZWQiOiB0cnVlLCAiaWQiOiAiNWJlY2I0YTkzZTdmNDk4YmJlODM1MzRmNDQ4MWRjMGQiLCAibmFtZSI6ICJzZXJ2aWNlIn19LCAic2VydmljZUNhdGFsb2ciOiBbeyJlbmRwb2ludHMiOiBbeyJhZG1pbl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pZnQifSwgIm1ldGFkYXRhIjogeyJpc19hZG1pbiI6IDAsICJyb2xlcyI6IFsiZjUwNjczYjliNDUwNDQyZGI1OGRkYTExYjQ4M2ZkMmUiXX19fTGCAYEwggF9AgEBMFwwVzELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVVuc2V0MQ4wDAYDVQQHDAVVbnNldDEOMAwGA1UECgwFVW5zZXQxGDAWBgNVBAMMD3d3dy5leGFtcGxlLmNvbQIBATAHBgUrDgMCGjANBgkqhkiG9w0BAQEFAASCAQAIQUsQ3aCgXsBUZsNToOHh9nSNs3BYbuIQjtrNQaYU65AILsYM+I+kh-woSfjdx29gjnU3G-X0jonYc2wv+OrY3A7DPQjuCov5rPpbm05wOZdXyEp4udXPFR69W5oWcM4K-dzLBBkJBhItKMQ-Jo3SwqxyZIkqP8mfakEDeNwfHGS
+1JDM080
jIU3CZ-h0fnT2+TonXTJpd6if48P2qM5laPAaOjOeC51EGd5gU7-BUhnAgKmlRDy1pWiC953lqM+LR99MEHmdSk03ouMS2Gi9SwSsWn8ZcZDjnwjjr7zJQSbcNMzIM29aU91s8M6AQ9iBLiHNltCcyewmzBb9JRo0",
"tenant": {"description": "Service Tenant", "enabled": true, "id":
"5becb4a93e7f498bbe83534f4481dc0d", "name": "service"}},
"serviceCatalog": [{"endpoints": [{"adminURL":
"http://192.168.3.251:8080/v1/AUTH_5becb4a93e7f498bbe83534f4481dc0d",
"region": "regionOne", "internalURL":
"http://192.168.3.251:8080/v1/AUTH_5becb4a93e7f498bbe83534f4481dc0d",
"id": "37aed18776d9453db72a7875ec7e69da", "publicURL":
"http://192.168.3.251:8080/v1/AUTH_5becb4a93e7f498bbe83534f4481dc0d"}],
"endpoints_links": [], "type": "object-store", "name": "swift"},
{"endpoints": [{"adminURL": "http://192.168.3.251:35357/v2.0", "region":
"regionOne", "internalURL": "http://192.168.3.251:5000/v2.0", "id":
"0bf7216352ac418fa385d5ff3ff89f30", "publicURL":
"http://192.168.3.251:5000/v2.0"}], "endpoints_links": [], "type":
"identity", "name": "keystone"}], "user": {"username": "swift",
"roles_links": [], "id": "63eec632ab754bc69583cc4a29b7405f", "roles":
[{"name": "admin"}], "name": "swift"}, "metadata": {"is_admin": 0,
"roles": ["f50673b9b450442db58dda11b483fd2e"]}}}
ERROR:swiftclient:''
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line
1110, in _retry
rv = func(self.url, self.token, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line
418, in head_account
resp = conn.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
''
Anyone can help me on this?
More information about the Openstack
mailing list