Failed to run the swift after following the guide http://docs.openstack.org/developer/swift/development_saio.html

asked 2011-06-24 23:33:35 -0500

ghuang gravatar image

Hello, I used this docments http://docs.openstack.org/developer/swift/development_saio.html (http://docs.openstack.org/developer/s...) to install swift on Ubuntu12.04 in my virtual machine.I selected the loopback device for the storage and followed the configuration guides.

There is a little problem when excute "sudo pip install -r swift/test-requirements.txt",but it's all right when run the "cp ~/swift/test/sample.conf /etc/swift/test.conf" .and when it comes to run the shell "curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:8080/auth/v1.0%22 (http://127.0.0.1:8080/auth/v1.0") ,it returns the "try 127.0.0.1 ... connecttion refused"

when run the commads as following: root@qihuaVM:~/swift# swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat No handlers could be found for logger "swiftclient" [Errno 111] Connection refused

I don't know why,sorry for my poor description of my problem,any idea will be apreciated!

edit retag flag offensive close merge delete

14 answers

Sort by ยป oldest newest most voted
0

answered 2011-06-27 02:33:47 -0500

ghuang gravatar image

ghuang@ubuntu:~$ netstat -an --tcp|grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN

How do I kill http-proxy service?

Thanks.

edit flag offensive delete link more
0

answered 2011-07-06 15:26:45 -0500

btorch gravatar image

Hope it's working now.

edit flag offensive delete link more
0

answered 2011-06-27 02:03:31 -0500

ghuang gravatar image

Hi Marcelo,

Thanks for your reply. I am using Ubuntu 10.04 and swift 1.4.0. I followed SAIO 1.4.0 to install and configure my swift. Here's my port stat:

ghuang@ubuntu:~$ nmap 127.0.0.1

Starting Nmap 5.00 ( http://nmap.org ) at 2011-06-26 18:52 PDT Interesting ports on localhost (127.0.0.1): Not shown: 993 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 873/tcp open rsync 3260/tcp open iscsi 8080/tcp open http-proxy 8443/tcp open https-alt 9001/tcp open tor-orport

Does this look normal to you? Also, how do I change the http-proxy port not to be 8080?

Thanks.

edit flag offensive delete link more
0

answered 2011-06-27 02:35:35 -0500

btorch gravatar image

Hi

Although the nmap scan is helpful, it would be better if you provide a "netstat -ntpl" output run as root. I can't tell what is attached to port 8080, it could be any other real service and not swift.

edit flag offensive delete link more
0

answered 2011-06-27 02:40:50 -0500

btorch gravatar image

If run the command I mentioned as root and you will see the pid for it. Then you can make the decision to kill it if it's a bad swift-proxy hung. It could also be a legitimate service you already have listening on that port, if so change the swift-proxy port to something else.

edit flag offensive delete link more
0

answered 2011-06-28 21:57:40 -0500

ghuang gravatar image

I think I have a typo on curl command I posted. Here's the correct one, but still got "404 Not Found":

ghuang@ubuntu:~$ curl -v -H "X-Auth-User: test:tester" -H "X-Auth-Key: testing" http://127.0.0.1:8088/auth/v1.0 * About to connect() to proxy 127.0.0.1 port 8088 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 8088 (#0)

GET http://127.0.0.1:8088/auth/v1.0 HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 Host: 127.0.0.1:8088 Accept: / Proxy-Connection: Keep-Alive X-Auth-User: test:tester X-Auth-Key: testing

< HTTP/1.1 404 Not Found < Content-Length: 154 < Content-Type: text/html; charset=UTF-8 < Date: Tue, 28 Jun 2011 21:48:39 GMT < <html> <head> <title>404 Not Found</title> </head> <body>

404 Not Found

The resource could not be found.

</body> * Connection #0 to host 127.0.0.1 left intact * Closing connection #0 </html>

Thanks.

edit flag offensive delete link more
0

answered 2011-06-28 21:35:22 -0500

ghuang gravatar image

BTW, I am using swift 1.4.0, not 1.4.2. I noticed the documentation on http://swift.openstack.org/development_saio.html (http://swift.openstack.org/developmen...) is for 1.4.2. Where can I find the documentation on 1.4.0?

Thanks.

edit flag offensive delete link more
0

answered 2011-06-28 22:28:53 -0500

btorch gravatar image

For "swauth-set-account-service ", you are providing an incorrect ADMIN_URL (check the example provided by --help) .. it should be "http://127.0.0.1:8088/auth/ " and not "http://127.0.0.1:8088/auth/v1.0"

I'm not sure about docs for 1.4.0, try asking in the #openstack channel. The person that generates those are always on the channel.

For the "404" that you received, check the syslog to find out what errors you are really getting.

A couple of other things you could try, is to use the swauth tools to see if you can list, create, delete accounts/users .. then if those work try using a new account to auth using url

edit flag offensive delete link more
0

answered 2011-06-25 20:33:09 -0500

btorch gravatar image

is the proxy hung listening on that port ? As root run "swift-init all stop" and then check if there is anything listening on 8080. if there is, check what it is and kill it. Then start everything back online with "swift-init all start" .. btw, what version is this ?

edit flag offensive delete link more
0

answered 2011-06-27 16:50:22 -0500

ghuang gravatar image

Hi Marcelo,

Running "netstat -ntpl" as root really helps. Now I can see which process is really listening on port 8080. After killing that process, I can now starting swift proxy-server and run st command.

If I am going to change the swift-proxy port to say 8088, what configuration change do I need to make? Is it the bind_port in /etc/swift/proxy-server.conf the only place I need to modify? Do I need to do anything else after modifying /etc/swift/proxy-server.conf?

Thanks so much for your help!

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-06-24 23:33:35 -0500

Seen: 1,481 times

Last updated: Jul 06 '11