Comments (5)
this issue is duplicate to #5 .
from elasticsearch.
I am having a similar issue:
$ docker run elasticsearch:1.4.5 elasticsearch
[2015-10-30 06:01:06,939][INFO ][node ] [Molten Man] version[1.4.5], pid[1], build[2aaf797/2015-04-27T08:06:06Z]
[2015-10-30 06:01:06,940][INFO ][node ] [Molten Man] initializing ...
[2015-10-30 06:01:06,947][INFO ][plugins ] [Molten Man] loaded [], sites []
{1.4.5}: Initialization Failed ...
- ElasticsearchIllegalStateException[Failed to obtain node lock, is the following location writable?: [/usr/share/elasticsearch/data/elasticsearch]]
IOException[failed to obtain lock on /usr/share/elasticsearch/data/elasticsearch/nodes/49]
IOException[Cannot create directory: /usr/share/elasticsearch/data/elasticsearch/nodes/49]
naverui-MacBook-Pro-6:elasticsearch-docker naver$ docker run --rm elasticsearch:1.4.5 id elasticsearch
uid=105(elasticsearch) gid=108(elasticsearch) groups=108(elasticsearch)
Using Docker Toolbox with the default
VirtualBox machine. Can't start even with default configurations despite not using the volume mounts.
If it's duplicate of #5, then what is the solution? The README says to run docker run -d elasticsearch
which doesn't work out of the box.
from elasticsearch.
This is a recursive duplication error right now (not the elasticsearch error but the issue citation)
We can't find a good solution anywhere
from elasticsearch.
Here's my workaround for OSX using Docker Toolbox: Change the UID of the elasticsearch
container user to match the docker
UID of the VirtualBox machine and then use a quick script to sure up the permissions in the container to use the new UID. You could build your own image to implement this or you could use the following scripts and docker command to use the default elasticsearch image:
fix-perm-osx.sh
OLD_ES_UID=$(id -u elasticsearch)
echo "OLD elasticsearch UID: ${OLD_ES_UID}"
usermod -u ${OSX_DOCKER_UID} elasticsearch
echo "NEW elasticsearch UID: $(id -u elasticsearch)"
find / -uid ${OLD_ES_UID} -exec chown elasticsearch {} \; 2>/dev/null
exec /docker-entrypoint.sh "$@"
Then execute the container and you should be able to successfully mount the data directory:
docker run -d -e "OSX_DOCKER_UID=$(docker-machine ssh default id -u)" -v "$PWD/fix-perm-osx.sh":/fix-perm-osx.sh -v "$PWD/data":/usr/share/elasticsearch/data elasticsearch /fix-perm-osx.sh elasticsearch
from elasticsearch.
@david-mohr great, that works for me. One little adaption: I had to single-quote the 'id -u'
as below.
docker run -d -e "OSX_DOCKER_UID=$(docker-machine ssh default 'id -u') -v "$PWD/fix-perm-osx.sh":/fix-perm-osx.sh -v "$PWD/data":/usr/share/elasticsearch/data elasticsearch /fix-perm-osx.sh elasticsearch"
from elasticsearch.
Related Issues (20)
- docker-compose error HOT 1
- ware house configuration issue HOT 1
- Unable to access 'path.scripts' HOT 1
- Please consider un-deprecating this image HOT 2
- Cannot edit any file inside the container. vi editor is not working HOT 1
- High CPU usage HOT 1
- DEPRECATED or not? HOT 3
- Any plan on 6.x alpine image release? HOT 3
- ES fails to connect to master node after IP address changed HOT 1
- Update to 7.9.2 HOT 2
- Elasticsearch on Docker Hub outdated HOT 1
- Apple M1 support HOT 1
- Security vulnerabilities with Aquasec HOT 2
- can not run by 7.14.1 HOT 3
- ll
- elasticsearch 6 on arm64v8 HOT 1
- elasticsearch never work continuously HOT 1
- Supporting Cosign Sigstore signing workflow HOT 2
- Broken update process HOT 6
- ARM missing on 8.11.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch.