6 The Gateway Won't Start
7 =======================
9 If you cannot start the gateway (i.e., there is no existing ``pid``),
10 check to see if there is an existing ``.asok`` file from another
11 user. If an ``.asok`` file from another user exists and there is no
12 running ``pid``, remove the ``.asok`` file and try to start the
15 This may occur when you start the process as a ``root`` user and
16 the startup script is trying to start the process as a
17 ``www-data`` or ``apache`` user and an existing ``.asok`` is
18 preventing the script from starting the daemon.
20 The radosgw init script (/etc/init.d/radosgw) also has a verbose argument that
21 can provide some insight as to what could be the issue:
23 /etc/init.d/radosgw start -v
27 /etc/init.d radosgw start --verbose
32 Examining the access and error logs for the web server itself is
33 probably the first step in identifying what is going on. If there is
34 a 500 error, that usually indicates a problem communicating with the
35 ``radosgw`` daemon. Ensure the daemon is running, its socket path is
36 configured, and that the web server is looking for it in the proper
40 Crashed ``radosgw`` process
41 ===========================
43 If the ``radosgw`` process dies, you will normally see a 500 error
44 from the web server (apache, nginx, etc.). In that situation, simply
45 restarting radosgw will restore service.
47 To diagnose the cause of the crash, check the log in ``/var/log/ceph``
48 and/or the core file (if one was generated).
51 Blocked ``radosgw`` Requests
52 ============================
54 If some (or all) radosgw requests appear to be blocked, you can get
55 some insight into the internal state of the ``radosgw`` daemon via
56 its admin socket. By default, there will be a socket configured to
57 reside in ``/var/run/ceph``, and the daemon can be queried with::
59 ceph daemon /var/run/ceph/client.rgw help
61 help list available commands
62 objecter_requests show in-progress osd requests
63 perfcounters_dump dump perfcounters value
64 perfcounters_schema dump perfcounters schema
65 version get protocol version
67 Of particular interest::
69 ceph daemon /var/run/ceph/client.rgw objecter_requests
72 will dump information about current in-progress requests with the
73 RADOS cluster. This allows one to identify if any requests are blocked
74 by a non-responsive OSD. For example, one might see::
80 "last_sent": "2012-03-08 14:56:37.949872",
82 "object_id": "fatty_25647_object1857",
83 "object_locator": "@2",
85 "snap_context": "0=[]",
86 "mtime": "2012-03-08 14:56:37.949813",
92 "last_sent": "2012-03-08 14:56:37.970615",
94 "object_id": "fatty_25647_object1872",
95 "object_locator": "@2",
97 "snap_context": "0=[]",
98 "mtime": "2012-03-08 14:56:37.970555",
106 In this dump, two requests are in progress. The ``last_sent`` field is
107 the time the RADOS request was sent. If this is a while ago, it suggests
108 that the OSD is not responding. For example, for request 1858, you could
109 check the OSD status with::
111 ceph pg map 2.d2041a48
113 osdmap e9 pg 2.d2041a48 (2.0) -> up [1,0] acting [1,0]
115 This tells us to look at ``osd.1``, the primary copy for this PG::
117 ceph daemon osd.1 ops
120 { "description": "osd_op(client.4124.0:1858 fatty_25647_object1857 [write 0~4096] 2.d2041a48)",
121 "received_at": "1331247573.344650",
123 "flag_point": "waiting for sub ops",
124 "client_info": { "client": "client.4124",
128 The ``flag_point`` field indicates that the OSD is currently waiting
129 for replicas to respond, in this case ``osd.0``.
132 Java S3 API Troubleshooting
133 ===========================
136 Peer Not Authenticated
137 ----------------------
139 You may receive an error that looks like this::
141 [java] INFO: Unable to execute HTTP request: peer not authenticated
143 The Java SDK for S3 requires a valid certificate from a recognized certificate
144 authority, because it uses HTTPS by default. If you are just testing the Ceph
145 Object Storage services, you can resolve this problem in a few ways:
147 #. Prepend the IP address or hostname with ``http://``. For example, change this::
149 conn.setEndpoint("myserver");
153 conn.setEndpoint("http://myserver")
155 #. After setting your credentials, add a client configuration and set the
156 protocol to ``Protocol.HTTP``. ::
158 AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
160 ClientConfiguration clientConfig = new ClientConfiguration();
161 clientConfig.setProtocol(Protocol.HTTP);
163 AmazonS3 conn = new AmazonS3Client(credentials, clientConfig);
170 If you receive an 405 error, check to see if you have the S3 subdomain set up correctly.
171 You will need to have a wild card setting in your DNS record for subdomain functionality
174 Also, check to ensure that the default site is disabled. ::
176 [java] Exception in thread "main" Status Code: 405, AWS Service: Amazon S3, AWS Request ID: null, AWS Error Code: MethodNotAllowed, AWS Error Message: null, S3 Extended Request ID: null