Hello
I am running Elasticsearch 7.10 with a localstack s3 instance. The issue is when i try to register a repository. If i do this
curl -X PUT "localhost:9200/_snapshot/repo1?pretty" -H 'Content-Type: application/json' -d'
{
"type": "s3",
"settings": {
"bucket": "elasticbucket",
"endpoint": "http://localhost:4566"
}
}'
I returns
type" : "repository_verification_exception",
"reason" : "[repo1] path is not accessible on master node"
And the bucket is there.
aws --endpoint-url=http://localhost:4566 s3 ls
2021-02-09 14:57:31 elasticbucket
The only thing i set in the elastic container is this
bin/elasticsearch-keystore add s3.client.default.access_key
bin/elasticsearch-keystore add s3.client.default.secret_key
I also set the network mode to host for both containers
I had this issue last week but after I shut my machine down and tried again it magically worked. I don't know why. Today I had to recreate the local stack and elastic containers and I am getting this issue again.
I am quite new to all of this so I am not familiar with the tools to trouble shoot. I read some posts on here related to this and I believe this is NOT related to IAM because I never had set that when it was working
Last thing. The s3 plugin is included the Dockerfile I created.
This is the dockerfile
FROM docker.elastic.co/elasticsearch/elasticsearch:7.10.2
COPY --chown=elasticsearch:elasticsearch elasticsearch.yml /usr/share/elasticsearch/config/
RUN bin/elasticsearch-plugin install --batch repository-s3
When I build it I get this warning
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.SocketPermission * connect,resolve
* java.util.PropertyPermission es.allow_insecure_settings read,write
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
This is what my elasticseach.yml file looks like
cluster.name: "docker-cluster"
network.host: 0.0.0.0
path.repo: ["/usr/share/elasticsearch/data"]
s3.client.default.endpoint: localhost:4566
s3.client.default.protocol: http
and this is my run command
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --mount type=bind,source=$(pwd),target=/usr/share/elasticsearch/data elastic01
I can list the bucket while inside the elastic container
[root@ubu0850 bin]# aws --endpoint-url=http://localhost:4566 s3 ls
2021-02-09 21:12:04 elasticbucket
[root@ubu0850 bin]# exit
Any Help is greatly appreciated