在 docker swarm 集群上部署 elasticsearch ,每次更新部署时,对应的 service 总是启动失败,错误日志如下:
java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data/es-cluster]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
请问如何解决?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
是 docker compose 配置文件中下面的部署配置引起的。
start-first 是先启动新容器,再关闭旧容器,在启动 es 新容器时,由于旧容器还在运行,node.lock 文件没有被释放,新容器获取不到 node.lock ,所以出现上面的错误。
去掉上面的配置,恢复为默认值 stop-first ,问题就解决了。