OpenStack Object Storage (Swift)

HTTP/1.1 500 Internal Server Error

Asked by Richard Rysavy on 2012-04-16

Hi
I have problem whit s3curl

perl ./s3curl.pl --id test:tester --key testing --get -- -s -v -k https://swift:8080/v1/AUTH_test

result is

Will sleep and continue despite this problem.
Please set up /home/ris/.s3curl for future requests.
* About to connect() to swift port 8080 (#0)
* Trying 127.0.1.1... connected
* Connected to swift (127.0.1.1) port 8080 (#0)
* successfully set certificate verify locations:
* CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
* subject: C=CZ; ST=Czech; L=Brno; O=Agora plus a.s.; CN=swift; <email address hidden>
* start date: 2012-04-15 05:58:26 GMT
* expire date: 2012-05-15 05:58:26 GMT
* common name: swift (matched)
* issuer: C=CZ; ST=Czech; L=Brno; O=Agora plus a.s.; CN=swift; <email address hidden>
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /v1/AUTH_test HTTP/1.1
> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
> Host: swift:8080
> Accept: */*
> Date: Mon, 16 Apr 2012 06:21:02 +0000
> Authorization: AWS test:tester:rGdajbbFXSmj3TbsLfxB/suQkCQ=
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Content-Length: 912
< Date: Mon, 16 Apr 2012 06:21:02 GMT
< Connection: close
<
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/swift/common/middleware/healthcheck.py", line 38, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/swift/common/middleware/memcache.py", line 47, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/swift/common/middleware/tempauth.py", line 132, in __call__
    groups = self.get_groups(env, token)
  File "/usr/lib/python2.7/dist-packages/swift/common/middleware/tempauth.py", line 210, in get_groups
    msg = base64.urlsafe_b64decode(unquote(token))
  File "/usr/lib/python2.7/urllib.py", line 1203, in unquote
    res = s.split('%')
AttributeError: 'NoneType' object has no attribute 'split'
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

wher is problem ?

ris@swift:~/s3-curl$ curl -k -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' https://swift:8080/auth/v1.0
* About to connect() to swift port 8080 (#0)
* Trying 127.0.1.1... connected
* Connected to swift (127.0.1.1) port 8080 (#0)
* successfully set certificate verify locations:
* CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
* subject: C=CZ; ST=Czech; L=Brno; O=Agora plus a.s.; CN=swift; <email address hidden>
* start date: 2012-04-15 05:58:26 GMT
* expire date: 2012-05-15 05:58:26 GMT
* common name: swift (matched)
* issuer: C=CZ; ST=Czech; L=Brno; O=Agora plus a.s.; CN=swift; <email address hidden>
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
> Host: swift:8080
> Accept: */*
> X-Storage-User: test:tester
> X-Storage-Pass: testing
>
< HTTP/1.1 200 OK
< X-Storage-Url: https://127.0.0.1:8080/v1/AUTH_test
< X-Storage-Token: AUTH_tk44a6361d094e4d1b8aba3616dfacda0f
< X-Auth-Token: AUTH_tk44a6361d094e4d1b8aba3616dfacda0f
< Content-Length: 0
< Date: Mon, 16 Apr 2012 06:21:49 GMT
<
* Connection #0 to host swift left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

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_LOCAL1

[pipeline:main]
#pipeline = healthcheck cache tempauth swauth swift3 staticweb proxy-server
pipeline = healthcheck cache tempauth swift3 proxy-server

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

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

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

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

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

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Richard Rysavy
Solved:
2012-04-20
Last query:
2012-04-20
Last reply:
Richard Rysavy (rysavy) said : #1

Sorry for all mistake is in configuration.
when I try standard deploy https://github.com/nii-cloud/dodai-deploy/wiki
and add to /etc/swift/proxy-server.conf
[pipeline:main]
pipeline = healthcheck cache swift3 swauth proxy-server
[filter:swift3]
use = egg:swift#swift3
and change s3curl.pl
my @endpoints = ( '192.168.168.112' );
s3curl.pl --id test:tester --key testing -- -s -v -k https://192.168.168.112:8080/

All working
IP or name had to by same as url.

if you use --debug 1
s3curl.pl --debug 1 --id test:tester --key testing -- -s -v -k https://192.168.168.112:8080/
you see
s3curl: Found the url: host=192.168.168.112; port=8080; uri=/; query=;
s3curl: ordinary endpoint signing case
s3curl: StringToSign='GET\n\n\nFri, 20 Apr 2012 12:29:41 +0000\n/'
s3curl: exec curl -H Date: Fri, 20 Apr 2012 12:29:41 +0000 -H Authorization: AWS test:tester:bjDk1F6fOVVVLowRejNOQD94+OY= -L -H content-type:

if you use wrong addres which is not on @endpoints
perl /home/ris/s3-curl/s3curl.pl --debug 1 --id test:tester --key testing -- -s -v -k https://localhost:8080/
you see
s3curl: Found the url: host=192.168.168.112; port=8080; uri=/; query=;
s3curl: ordinary endpoint signing case
s3curl: StringToSign='GET\n\n\nFri, 20 Apr 2012 12:29:41 +0000\n/'
s3curl: exec curl -H Date: Fri, 20 Apr 2012 12:29:41 +0000 -H Authorization: AWS test:tester:bjDk1F6fOVVVLowRejNOQD94+OY= -L -H content-type: