2

http://docs.openstack.org/developer/swift/development_saio.htmlの指示に従って、マシン 1 (Centos 6) に OpenStack Swift サービスをインストールしました。

同じ環境でcurlを使用してトークンを取得できます。

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

別のマシン (マシン 2) からアクセスしようとすると、ホストに到達できないという例外が発生しています。machine-2 から machine-1 に ping を実行できます。

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

リモート マシンから Swift REST サービスにアクセスできない理由を教えてください。構成で何かを見逃していませんか?

4

1 に答える 1

0

Host unreachableは、Machine 2 が Machine 1 にアクセスできないことを意味します。これは、Openstack/Swift とは関係ありません。ルーターの設定と を確認してください/etc/hosts

* Could not resolve host: testing'
* Failed connect to machine-1IP:8099; Host unreachable
于 2015-09-14T06:03:12.483 に答える