【问题标题】:Not able to access Swift REST services from remote machine无法从远程机器访问 Swift REST 服务
【发布时间】:2013-07-18 16:09:04
【问题描述】:

我已经按照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 ping machine-1。

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 服务?我是否遗漏了配置中的任何内容?

【问题讨论】:

  • 当请求被定向到“machine-1IP”时,您的外部机器 resolv.conf 是否知道它应该映射到的 IP 地址

标签: openstack openstack-swift


【解决方案1】:

Host unreachable 表示机器 2 无法访问机器 1。它与 Openstack/Swift 无关。检查您的路由器设置和/etc/hosts

* Could not resolve host: testing'
* Failed connect to machine-1IP:8099; Host unreachable

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-12
    • 2020-03-06
    • 2013-03-17
    • 2022-06-27
    • 1970-01-01
    相关资源
    最近更新 更多