Closed Antirecord closed 2 years ago
what's your Ceph version?
what's your Ceph version?
ceph version ceph version 16.2.5 (0883bdea7337b95e4b611c768c0279868462204a) pacific (stable)
help me please
I cannot reproduce the issue in all active Ceph versions. Anyway, I believe the problem is due to the server returning nothing here, so the lib has no choice but returns a null to you.
I recommend you to check endpoint
is correct or not. You can check it manually by curl, e.g.,
I cannot reproduce the issue in all active Ceph versions. Anyway, I believe the problem is due to the server returning nothing here, so the lib has no choice but returns a null to you.
I recommend you to check
endpoint
is correct or not. You can check it manually by curl, e.g.,
tcp dump of my request
PUT /user?uid=testuserzelimkhan&display-name=testuserzelimkhan HTTP/1.1 Authorization: AWS {hidden-access-key}:{hidden} Date: Tue, 16 Aug 2022 10:06:27 GMT Content-Length: 0 Host: [hidden]:8080 Connection: Keep-Alive Accept-Encoding: gzip User-Agent: okhttp/3.14.9
HTTP/1.1 200 OK x-amz-request-id: [hidden] Content-Length: 0 Date: Tue, 16 Aug 2022 10:06:28 GMT Connection: Keep-Alive
request admin/info :
{"Code":"MethodNotAllowed","RequestId":"tx0000000000000000000f9-0062fb9461-242df-default","HostId":"242df-default-default"}
Should the endpoint for creating buckets on the aws s3 java client match the endpoint on the rados gw java client?
Nope. Default endpoints should be something like:
Try RgwAdminBuilder().endpoint("http://YOUR IP:PORT/admin")
Nope. Default endpoints should be something like:
- Ceph radosgw endpoint (S3 API): "http://127.0.0.1:8080/"
- Ceph radosgw admin endpoint (You should use this one here): "http://127.0.0.1:8080/admin"
Try
RgwAdminBuilder().endpoint("http://YOUR IP:PORT/admin")
I didn't know that /admin should be added to the endpoint
Issue solved, thanks a lot.
Good afternoon, I'm trying to create a user through the client: RgwAdmin rgwAdmin = new RgwAdminBuilder() .accessKey(accessKey) .secretKey(secretKey) .endpoint(endpoint) .build(); rgwAdmin.createUser("testuser");
As a result, this method returns null, I looked inside this method:
public User createUser(String userId, Map<String, String> options) { HttpUrl.Builder urlBuilder = HttpUrl.parse(this.endpoint).newBuilder().addPathSegment("user").addQueryParameter("uid", userId).addQueryParameter("display-name", userId); appendParameters(options, urlBuilder); Request request = (new Request.Builder()).put(emptyBody).url(urlBuilder.build()).build(); String resp = this.safeCall(request); return (User)gson.fromJson(resp, User.class);
Inside this method, the response (resp) field returns an empty string, what could be the reason for this, please tell me?