Help with stopping elasticsearch in a docker container

I’m launched Graylog, MongoDB, and Elasticsearch docker containers. My goal is to move my Graylog instance from a manually installed Graylog instance from an Ubuntu VM, to another Ubtunu VM using these Docker containers. Used the 4.0 docker install steps from Graylog docs: Docker — Graylog 4.0.0 documentation

I have a snapshot of my elasticsearch data sent to the /backup directory within my elasticstack container. I’ve added path.repo: /backup to my elasticsearch.yml file, and then restarted the container.

When I run:
curl -X PUT -H “content-type:application/json” ‘localhost:9200/_snapshot/snapshot’ -d ‘{“type”:“fs”,“settings”:{“location”:"/backup",“compress”:true}}’

I get:
{“error”:{“root_cause”:[{“type”:“exception”,“reason”:“failed to create blob container”}],“type”:“repository_verification_exception”,“reason”:"[snapshot] path is not accessible on master node",“caused_by”:{“type”:“exception”,“reason”:“failed to create blob container”,“caused_by”:{“type”:“access_denied_exception”,“reason”:"/backup/tests-zZCKO31iRYSYni03DdEwgA"}}},“status”:500}

I believe this is because elassticsearch is running. If so, I need to stop the elasticsearch service. But how do I do that from within the container?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.