![]() This happens to me whenever I try to restart Elasticsearch inside my Docker container. I think that Elasticsearch needs to have a second node available so that a new instance can start. To allow for more than one node (e.g., on your development machine), use the setting node.max_local_storage_nodes and set this to a positive integer larger than one. The docs say to set this to a number greater than one on your development machineīy default, Elasticsearch is configured to prevent more than one node from sharing the same data path. The solution is to set max_local_storage_nodes in your elasticsearch.yml node.max_local_storage_nodes: 2 If anyone is seeing this being caused by: Caused by: : failed to obtain node locks, tried ] with lock id maybe these locations are not writable or multiple nodes were started without increasing (was )? Maybe someone could elaborate on the apropriate rights to set for a mounted-folder in a docker-container? I just wanted to share the fact that it might not be a second process of elasticsearch running, but actually just missing access-rights to the mounted folder. I do not want to reproduce the command to set those very permissive access-rights on the mounted docker-folder, because it is most likely a very bad practice and a security-issue. After I set very permissive file-permissions to this folder and all sub-folders the container did start again. This folder could not be accessed anymore by elasticsearch for reasons I did not understand at all. ![]() var/docker_folders/common/experimental-upgrade:/usr/share/elasticsearch/data The data-folder used by elasticsearch was mounted from the host-system into the container (declared in the docker-compose.yml): volumes: In my case the root-cause of the error was missing file-permissions After I upgraded the elasticsearch docker-image from version 5.6.x to 6.3.y the container would not start anymore because of the aforementioned error ![]()
0 Comments
Leave a Reply. |