当我执行service ceph-radosgw start/restart时后台log一直报如下错误:
39 2016-12-18 07:17:22.637209 7f14b28ad8a0 0 ceph version 0.94.5 (9764da52395923e0b32908d83a9f7304401fee43), process radosgw, pid 5119
40 2016-12-18 07:17:22.637373 7f14b28ad8a0 -1 WARNING: libcurl doesn't support curl_multi_wait()
41 2016-12-18 07:17:22.637436 7f14b28ad8a0 -1 WARNING: cross zone / region transfer performance may be affected
42 2016-12-18 07:17:22.817819 7f14b28ad8a0 0 framework: fastcgi
43 2016-12-18 07:17:22.817904 7f14b28ad8a0 0 framework: civetweb
44 2016-12-18 07:17:22.817947 7f14b28ad8a0 0 framework conf key: port, val: 7480
45 2016-12-18 07:17:22.817999 7f14b28ad8a0 0 starting handler: civetweb
46 2016-12-18 07:17:22.821149 7f14b28ad8a0 0 starting handler: fastcgi
47 2016-12-18 07:17:22.835872 7f14875fe700 -1 failed to list objects pool_iterate returned r=-2
48 2016-12-18 07:17:22.835880 7f14875fe700 0 ERROR: lists_keys_next(): ret=-2
49 2016-12-18 07:17:22.835886 7f14875fe700 0 ERROR: sync_all_users() returned ret=-2
50 2016-12-18 07:30:10.118648 7f67907658a0 0 ceph version 0.94.5 (9764da52395923e0b32908d83a9f7304401fee43), process radosgw, pid 5471
51 2016-12-18 07:30:10.118832 7f67907658a0 -1 WARNING: libcurl doesn't support curl_multi_wait()
52 2016-12-18 07:30:10.118898 7f67907658a0 -1 WARNING: cross zone / region transfer performance may be affected
53 2016-12-18 07:30:10.409475 7f67907658a0 0 framework: fastcgi
54 2016-12-18 07:30:10.409491 7f67907658a0 0 framework: civetweb
55 2016-12-18 07:30:10.409496 7f67907658a0 0 framework conf key: port, val: 7480
56 2016-12-18 07:30:10.409511 7f67907658a0 0 starting handler: civetweb
57 2016-12-18 07:30:10.418029 7f67907658a0 0 starting handler: fastcgi
58 2016-12-18 07:30:10.424927 7f67754f8700 -1 failed to list objects pool_iterate returned r=-2
59 2016-12-18 07:30:10.424939 7f67754f8700 0 ERROR: lists_keys_next(): ret=-2
60 2016-12-18 07:30:10.424947 7f67754f8700 0 ERROR: sync_all_users() returned ret=-2
通过curl访问报的错误如下:
[root@ceph-rgw ceph]# curl http://ceph-rgw.objectstore.com
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
liang.zheng1@veritas.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
找了好久才发现是防火墙的问题:
On some systems, you may need to set SELinux to Permissive. If you are unable to communicate with the gateway after attempting to start it, try executing:
If the result is 1 or Enforcing, execute:
Then, restart Apache and the gateway daemon to see if that resolves the issue. If it does, you can configure your system to disable SELinux.
中间还碰到一个问题,执行ceph -k /etc/ceph/ceph.client.admin.keyring auth add 时报: Error EINVAL: entity client.radosgw.gateway exists but key does not match,需要执行:
ceph auth del client.radosgw.gateway
Reference: