You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a repository type based on local stack s3 failed. Postman works, but code calls are not working.
Error message: The bucket does not exist. In fact, my bucket exists,
I also tested uploading an image file.
I'm not sure what else I need to configure.
At the same time, Postman can successfully create a repository, and at this point, it should not actually request local stack S3,
But when I call the code, I will report an error, no sack bucket. At the same time,
I validated based on this repository, obtained the repository, and created a snapshot operation,
It will prompt me that I do not have this bucket.
I confirm that the request has been made to local stack s3,
The log information for local stack s3 is provided at the end of the following figure.
Is there a compatibility relationship between the version of Elastic Search and the version of S3,
I will provide detailed code and Docker Compose.yml file to reproduce the content
Invalid NEST response built from a unsuccessful (500) low level call on PUT: /_snapshot/unit-test-s3-reponamea7fa5e24-9843-4ce7-ba15-89489c86e98a
# Audit trail of this API call:
- [1] BadResponse: Node: http://localhost:9200/ Took: 00:00:00.0914049
# OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 500 from: PUT /_snapshot/unit-test-s3-reponamea7fa5e24-9843-4ce7-ba15-89489c86e98a. ServerError: Type: repository_verification_exception Reason: "[unit-test-s3-reponamea7fa5e24-9843-4ce7-ba15-89489c86e98a] path is not accessible on master node" CausedBy: "Type: i_o_exception Reason: "Unable to upload object [tests-EfaP_MESRUy_X28dSyF4Lg/master.dat] using a single upload" CausedBy: "Type: amazon_s3_exception Reason: "The specified bucket does not exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request ID: 5f9b4920-13a0-4917-9441-5c4c87b4a238; S3 Extended Request ID: null)"""
# Request:
<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
# Response:
<Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
1.2 If you want to mount config.yml to your local computer, Windows may consider config.yml as a folder and prompt you to map a folder to a file. You can use the Docker cp command to copy it to the host and then mount it. At this point, it will prompt you that the file ==jvm.options== is necessary, so remember to keep jvm.options on the host and only mount the config.yml configuration file, which will result in errors.
summary:After starting the ES container normally, you need to do these operations
#1 Enter the ES container bash
docker exec -it elasticsearchdemo sh
#2 install s3 plugin
bin/elasticsearch-plugin install repository-s3
#3 add s3 access_key 、 secret_key //The value here corresponds to the value of the local stack s3 docker.compose.yml file
bin/elasticsearch-keystore add s3.client.default.access_key
bin/elasticsearch-keystore add s3.client.default.secret_key
# If you need to remove s3 access_key, secret_key, please use the following command# bin/elasticsearch-keystore remove s3.client.default.access_key# bin/elasticsearch-keystore remove s3.client.default.secret_key
2.local stack s3 docker compose.yml file:
ES_ENDPOINT_STRATEGY=port (This parameter is very important)
I hope the code can also create a successful repository. Also, is there a version coupling relationship between ES and local stack s3? If you know the solution, please let me know the detailed configuration of ES and local stack s3 and how to solve it. Thank you very much
actual behavior
Create failed, S3 does not have this bucket
The text was updated successfully, but these errors were encountered:
Creating a local stack s3 repository failed. use Postman works, but code calls are not working.
NEST/Elasticsearch.Net version:
Elasticsearch version:
elasticsearch:7.17.7
localstack/localstack:latest
.NET runtime version:
Operating system version:
Ubuntu 20,ide: Rider
Description of the problem including expected versus actual behavior:
7.17 API docs:https://www.elastic.co/guide/en/elasticsearch/plugins/7.17/repository-s3.html
8.13 API docs:https://www.elastic.co/guide/en/elasticsearch/reference/8.13/repository-s3.html
Creating a repository type based on local stack s3 failed. Postman works, but code calls are not working.
Error message: The bucket does not exist. In fact, my bucket exists,
I also tested uploading an image file.
I'm not sure what else I need to configure.
At the same time, Postman can successfully create a repository, and at this point, it should not actually request local stack S3,
But when I call the code, I will report an error, no sack bucket. At the same time,
I validated based on this repository, obtained the repository, and created a snapshot operation,
It will prompt me that I do not have this bucket.
I confirm that the request has been made to local stack s3,
The log information for local stack s3 is provided at the end of the following figure.
Is there a compatibility relationship between the version of Elastic Search and the version of S3,
I will provide detailed code and Docker Compose.yml file to reproduce the content
postman test
create repository
verify local stack s3 repository
get local stack s3 repository
test create snapshot in local stack s3 repository
local stack s3 container logs
Steps to reproduce:
because my requirement is to use both fs and s3 as repositories,
So at the beginning, I didn't write the two services in a docker compose. yml file
1.Set up ES environment
1.1 docker compose.yml file
1.2 If you want to mount config.yml to your local computer, Windows may consider config.yml as a folder and prompt you to map a folder to a file. You can use the Docker cp command to copy it to the host and then mount it. At this point, it will prompt you that the file ==jvm.options== is necessary, so remember to keep jvm.options on the host and only mount the config.yml configuration file, which will result in errors.
ES config.yml file
path.repo is designed to use fs as the repository, and you may not need it
summary:After starting the ES container normally, you need to do these operations
2.local stack s3 docker compose.yml file:
ES_ENDPOINT_STRATEGY=port (This parameter is very important)
Official address:https://docs.localstack.cloud/user-guide/aws/es/#endpoints,
Please select host for the network, or merge the above two docket compose.yml files into one and use the same network
The default localhost:4566 is the endpoint of S3:
http://localhost:4566/
3.test code
S3 test code:
You need to install the following nuget package
ES test code
Expected behavior
I hope the code can also create a successful repository. Also, is there a version coupling relationship between ES and local stack s3? If you know the solution, please let me know the detailed configuration of ES and local stack s3 and how to solve it. Thank you very much
actual behavior
Create failed, S3 does not have this bucket
The text was updated successfully, but these errors were encountered: