2

I have installed OpenStack Swift service on machine 1 (Centos 6) by following instructions given on http://docs.openstack.org/developer/swift/development_saio.html.

I am able to retrieve token using curl on the same environment.

curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://machine-1IP:8099/auth/v1.0

* About to connect() to machine-1 ip port 8099 (#0)
*   Trying machine-1ip... connected
* Connected to machine-1 port 8099 (#0)
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: machine-1IP:8099
> Accept: */*
> X-Storage-User: test:tester
> X-Storage-Pass: testing
>
< HTTP/1.1 200 OK
< X-Storage-Url: http://machine-1IP:8099/v1/AUTH_test
< X-Auth-Token: AUTH_tk1dc541c4be23424a92477b13deaa2fac
< Content-Type: text/html; charset=UTF-8
< X-Storage-Token: AUTH_tk1dc541c4be23424a92477b13deaa2fac
< Content-Length: 0
< Date: Thu, 18 Jul 2013 11:45:34 GMT

If I try to access it from another machine (Machine 2). I am getting host is not reachable exception. I am able to ping machine-1 from machine-2.

curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://machine-1IP:port/auth/v1.0

* Adding handle: conn: 0xa7b670
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xa7b670) send_pipe: 1, recv_pipe: 0
* Could not resolve host: test
* Closing connection 0
curl: (6) Could not resolve host: test
* Adding handle: conn: 0xa7c1b0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 1 (0xa7c1b0) send_pipe: 1, recv_pipe: 0
* Could not resolve host: testing'
* Closing connection 1
curl: (6) Could not resolve host: testing'
* About to connect() to machine-1 IP port 8099 (#2)
*   Trying machine-1 IP...
* Adding handle: conn: 0xa7c1b0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 2 (0xa7c1b0) send_pipe: 1, recv_pipe: 0
* Host unreachable
* Failed connect to machine-1IP:8099; Host unreachable
* Closing connection 2
curl: (7) Failed connect to Machine-1 IP:8099; Host unreachable

Please suggest why Swift REST services are not accessible from remote machine? Did I missed out anything in configurations?

Chetan Shirke
  • 896
  • 4
  • 13
  • 35
  • Is your external machines resolv.conf is aware about the IP address it should map to when a request is directed to "machine-1IP" – koolhead17 Dec 10 '13 at 13:06

1 Answers1

0

Host unreachable means Machine 2 can not access to Machine 1. It's not related to Openstack/Swift. Check your router settings and /etc/hosts.

* Could not resolve host: testing'
* Failed connect to machine-1IP:8099; Host unreachable
Efe Kahraman
  • 1,438
  • 14
  • 21