problem in Authencation

Bug #1208348 reported by abdulhamed

This bug report was converted into a question: question #233704: problem in Authencation.

8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Invalid
Undecided
Unassigned

Bug Description

I am using a tutoriel :http://swift.openstack.org/development_saio.html

I'm currently trying to create a swift environment for some test, but got the following error when getting an X-Storage-Url and X-Auth-Token using test command.

root@swift:~# curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:8080/auth/v1.0
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1... connected
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:8080
> Accept: */*
> X-Storage-User: test:tester
> X-Storage-Pass: testing
>
< HTTP/1.1 200 OK
< X-Storage-Url: http://127.0.0.1:8080/v1/AUTH_test
< X-Auth-Token: AUTH_tkca30d37fee024ed7a41e738a726f38e7
< Content-Type: text/html; charset=UTF-8
< X-Storage-Token: AUTH_tkca30d37fee024ed7a41e738a726f38e7
< Content-Length: 0
< Date: Mon, 05 Aug 2013 07:07:35 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

root@swift:~# curl -v -H 'X-Auth-Token: AUTH_tkca30d37fee024ed7a41e738a726f38e7' http://127.0.0.1:8080/v1/AUTH_test
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1... connected
> GET /v1/AUTH_test HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:8080
> Accept: */*
> X-Auth-Token: AUTH_tkca30d37fee024ed7a41e738a726f38e7
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 131
< Content-Type: text/html; charset=UTF-8
< Date: Mon, 05 Aug 2013 07:08:51 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0
<html><h1>Unauthorized</h1><p>This server could not verify that you are authorized to access the document you requested.</p></html>root@swift:~#

I am new for openstack, Ples help me..

Revision history for this message
Kun Huang (academicgareth) wrote :

Could you give your config file and log file here, you could use paste.openstack.org for pasting any text

Revision history for this message
abdulhamed (abdulhamed-h) wrote :

thank's for your reply, can you pls tell me which conf file you require and how to get it....

Revision history for this message
Kun Huang (academicgareth) wrote :

SAIO uses syslog to manage logs, and if you follow SAIO documents totally, you could find logs in /var/log/swift/proxy.error and /var/log/swift/proxy.log.

And your config file should be here: /etc/swift/proxy-server.conf

Revision history for this message
abdulhamed (abdulhamed-h) wrote :

thank you so much, i have pasted my log file and config file in paste.openstack.org..... can u pls tell me what mistake i made..

Revision history for this message
abdulhamed (abdulhamed-h) wrote :
Download full text (8.3 KiB)

this is my log and config files...pls tell me where i mistake..

root@swift:~# gedit /etc/swift/proxy-server.conf

[DEFAULT]
bind_port = 8080
workers = 1
user = swift
log_facility = LOG_LOCAL1
eventlet_debug = true

[pipeline:main]
pipeline = healthcheck cache tempauth proxy-logging proxy-server

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

[filter:tempauth]
use = egg:swift#tempauth
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:cache]
use = egg:swift#memcache

[filter:proxy-logging]
use = egg:swift#proxy_logging

root@swift:~# gedit /var/log/swift/proxy.log

Aug 2 09:49:41 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/19/41 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:17 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/17 HEAD /v1/AUTH_test HTTP/1.0 2$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 PUT /v1/AUTH_test/fb6eda9e620$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 PUT /v1/AUTH_test/54d1bb52107$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 PUT /v1/AUTH_test/463a56f5e54$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 PUT /v1/AUTH_test/571e3d330fc$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 PUT /v1/AUTH_test/920b1f611a5$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 PUT /v1/AUTH_test/3ab840381c3$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/2013/04/20/30 GET /v1/AUTH_test HTTP/1.0 20$
Aug 2 09:50:30 swift proxy-server 127.0.0.1 127.0.0.1 02/Aug/20...

Read more...

Revision history for this message
Kun Huang (academicgareth) wrote :

hi

look at this:
Aug 2 09:50:30 swift proxy-server Container GET returning 503 for (503, 503, 503) (txn: txfc0c648332124d$
an exception result should be (404,404,404), some errors in get container server

BTW, do you set a correct ring? when following SAIO document.

If you're not sure that,

1. look at /etc/rsyslog.d/10-swift.conf, and uncomment the line:
"#local1,local2,local3,local4,local5.* /var/log/swift/all.log"

2. add log_level = DEBUG in your proxy-server.conf and container-server.conf

3. restart proxy server&conainer server and curl again

4. look at /var/log/swift/all.log; some trackback of that "503" will be in log; now you could debug it further or paste the traceback here.

BTW, if you use paste.openstack.org, you could share your link instead of copy any content here, for example: http://paste.openstack.org/show/42723/

Revision history for this message
Kun Huang (academicgareth) wrote :

s/an exception result/an excepted result

Revision history for this message
abdulhamed (abdulhamed-h) wrote :

Thank you so much, after trying this method i am not getting the authorization error, Then, I followed the 4th step that i posted the /var/log/swift/proxy.error and I pasted it here(http://paste.openstack.org/show/43396/)..
and pls can you tell me which is the prefferred method to upload file, image e.t.c

Revision history for this message
Kun Huang (academicgareth) wrote :

A preferred method based on what?

May be you just want a general method. Here is something from John Dickinson, you could have a first understanding from this:

"""
There are a few things you can look at.

First, the slowdowns you are seeing may be because of the increased numbers of files on disk. This causes the background processes to do more work, which can cause some issues for the server processes.

Second (and perhaps more likely), how is your data arranged? Are you putting every object into the same container? Swift is optimized for access across the entire namespace, so spreading your data across many containers can help improve write performance. Since you are running with account and proxy servers on the same spinning media as the object servers, as you get your cluster more full, write performance will degrade significantly with many objects in a single container. With your setup, you should probably have a max of about a million objects in a single container. If you separate your account and container servers to use SSDs (and perhaps separate machines), you could do 100x this number effectively. Note that this issue doesn't affect read performance. Object eead performance should stay high no matter the cardinality of objects in a single container.
"""

Revision history for this message
abdulhamed (abdulhamed-h) wrote :

Thank you for your help. Actually i have been looking to upload a photo/file in swift but am facing some problem as .

root@swift:/home/swift# swift -U test:tester -K testing -A http://127.0.0.1:8080/auth/v1.0 upload Downloads/giluxe.jpg

Usage: swift [options] upload [options] container file_or_directory [file_or_directory] [...]
    Uploads to the given container the files and directories specified by the
    remaining args. -c or --changed is an option that will only upload files
    that have changed since the last upload. -S <size> or --segment-size <size>
    will upload the files in segments no larger than size. -C <container> or
    --segment-container <container> will specify the location of the segments
    to <container>. --leave-segments are options as well (see --help for more).

Do you have any idea how i can do?

Revision history for this message
Kun Huang (academicgareth) wrote :

swift -U test:tester -K testing -A http://127.0.0.1:8080/auth/v1.0 upload <your container here> Downloads/giluxe.jpg

Revision history for this message
abdulhamed (abdulhamed-h) wrote :

i found cyberduck as a useful interface to connect with swift but its for only mac & windows os. Am using ubuntu 12.04 LTS is their any tool like cyberduck.

Revision history for this message
Kun Huang (academicgareth) wrote :

You could ask any questions in https://answers.launchpad.net/swift

Changed in swift:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.