3

我是 Swift 的新手,但试图将它安装在我的CentOS 6.5 VM. 我已经做好了

  1. 安装最新的 Swift 版本 (1.12.0)python-swiftclient (2.0.2)及其依赖项
  2. xfs在_/svr/node/d1
  3. 创建环并将设备添加到环(帐户、容器、对象)
  4. 构建环,为每个环生成一个 .ring.gz 文件。将它们放在 /etc/swift
  5. 配置hash_path_prefix代理
  6. 设置TempAuth和添加新用户'myaccount:me'的密码'pa'
  7. 启动代理和帐户。

我希望能成功

swift -A http://localhost:8080/auth/v1.0 -U myaccount:me -K pa stat

但命令告诉我“找不到帐户”。要查看详细信息,我做了

swift --debug -v -A http://localhost:8080/auth/v1.0 -U myaccount:me -K pa stat

输出是 INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost DEBUG:requests.packages.urllib3.connectionpool:"GET /auth/v1.0 HTTP/1.1" 200 0 DEBUG:swiftclient:REQ: curl -i http://localhost:8080/auth/v1.0 -X GET DEBUG:swiftclient:RESP STATUS: 200 OK DEBUG:swiftclient:RESP HEADERS: [('content-length', '0'), ('x-trans-id', 'tx88b6b6b71ec14c3393248-00530de039'), ('x-auth-token', 'AUTH_tkdc7e842046e9469da324f2ec82c80a92'), ('x-storage-token', 'AUTH_tkdc7e842046e9469da324f2ec82c80a92'), ('date', 'Wed, 26 Feb 2014 12:38:17 GMT'), ('x-storage-url', 'http://localhost:8080/v1/AUTH_myaccount'), ('content-type', 'text/html; charset=UTF-8')] INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost DEBUG:requests.packages.urllib3.connectionpool:"HEAD /v1/AUTH_myaccount HTTP/1.1" 404 0 INFO:swiftclient:REQ: curl -i http://localhost:8080/v1/AUTH_myaccount -I -H "X-Auth-Token: AUTH_tkdc7e842046e9469da324f2ec82c80a92" INFO:swiftclient:RESP STATUS: 404 Not Found INFO:swiftclient:RESP HEADERS: [('date', 'Wed, 26 Feb 2014 12:38:17 GMT'), ('content-length', '0'), ('content-type', 'text/html; charset=UTF-8'), ('x-trans-id', 'tx553c40e63c69470e9d146-00530de039')] ERROR:swiftclient:Account HEAD failed: http://localhost:8080:8080/v1/AUTH_myaccount 404 Not Found Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 1192, in _retry rv = func(self.url, self.token, *args, **kwargs) File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 469, in head_account http_response_content=body) ClientException: Account HEAD failed: http://localhost:8080:8080/v1/AUTH_myaccount 404 Not Found Account not found

这里一点头绪都没有。任何想法?先谢谢了!

4

1 回答 1

2

我想通了:在 proxy-server.conf 中,添加这两行

allow_account_management = true
account_autocreate = true
于 2014-02-26T13:14:24.590 回答