Ask Your Question
0

couldn't connect to host after setup swift

asked 2013-06-27 16:40:38 -0500

osyahoo2013 gravatar image

Hello Swift Guru,

I had just done setup the swift on my proxy and storage nodes. When trying to run cURL and swift for verification and I am getting "couldn't connecto host". I am using "TempAuth" as an authentication method, not sure the syntax i am using is correct, below is the syntax. Can someone please help me out?

hostname swift]$ curl -i -H 'X-Auth-Key: swift' -H 'X-Auth-User: admin:admin' http://localhost:8080/auth/v2.0 curl: (7) couldn't connect to host

does the port 8080 is listening? i don't see it under <netstat -pl="">

Thanks, Jimmy

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-06-27 22:50:41 -0500

creiht gravatar image

That error usually means that either the services are not running, or you are using the wrong port. Swift services are usually started with something like:

swift-init main start

You can also check /etc/swift/proxy-server.conf to see what ip and port it is set to listen to.

TempAuth also only works with the v1.0 auth contract, so if you should use the following URL:

http://localhost:8080/auth/v1.0

edit flag offensive delete link more

Comments

Hi Creiht,

Thanks for the respond!

I finally got the services started but then when I test to run the curl command on locahost, I got below error. I saw that http or port 80 is listening by running <netstat -pl>.

osyahoo2013 gravatar imageosyahoo2013 ( 2013-07-01 16:16:14 -0500 )edit
0

answered 2013-07-01 16:18:26 -0500

osyahoo2013 gravatar image

Hi Creiht,

Thanks for the respoind!

I finally got the services started but then when I test to run the curl command on locahost, I got below error. I saw that http or port 80 is listening by running <netstat -pl="">

[root@cleverloadgen11 swift]# cat proxy-server.conf [DEFAULT] bind_ip = 10.218.36.74 bind_port = 80 backlog = 4096 swift_dir = /etc/swift workers = 1 expiring_objects_container_divisor = 86400 user = swift cert_file = /etc/swift key_file = /etc/swift max_clients = 1024

+++

[root@loadgen11 swift]# curl http://localhost:80 curl: (7) couldn't connect to host [root@loadgen11 swift]#

+++

[root@loadgen11 swift]# netstat -pln | grep 80 tcp 0 0 10.0.0.74:80 0.0.0.0:* LISTEN 3255/python
[root@cleverloadgen11 swift]#

Thanks in advance for the help!

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

Stats

Asked: 2013-06-27 16:40:38 -0500

Seen: 714 times

Last updated: Jul 01 '13