Elasticsearch cannot start a service "Mount point not found"

Hello, I'm not able to start Elasticsearch on my PC. Same error pops up with docker, or installing it standalone on my Manjaro Linux.

  [2021-04-17T16:16:21,296][ERROR][o.e.b.Bootstrap          ] [kuba-ms7b87] Exception
java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:302) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) [elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) [elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) [elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) [elasticsearch-cli-7.10.1.jar:7.10.1]
        at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) [elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.10.1.jar:7.10.1]
Caused by: java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data/nodes/0
        at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:224) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
        ... 12 more
Caused by: java.io.IOException: Mount point not found
        at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105) ~[?:?]
        at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:69) ~[?:?]
        at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49) ~[?:?]
        at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51) ~[?:?]
        at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:373) ~[?:?]
        at java.nio.file.Files.getFileStore(Files.java:1488) ~[?:?]
        at org.elasticsearch.env.Environment.getFileStore(Environment.java:328) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:113) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:218) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
        ... 12 more
[2021-04-17T16:16:21,301][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [kuba-ms7b87] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_no>
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.10.1.jar:7.10.1]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.10.1.jar:7.10.1]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:302) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.1.jar:7.10.1]
        ... 6 more
Caused by: java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data/nodes/0
        at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:224) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.1.jar:7.10.1]
        ... 6 more
Caused by: java.io.IOException: Mount point not found
at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105) ~[?:?]
        at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:69) ~[?:?]
        at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49) ~[?:?]
        at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51) ~[?:?]
        at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:373) ~[?:?]
        at java.nio.file.Files.getFileStore(Files.java:1488) ~[?:?]
        at org.elasticsearch.env.Environment.getFileStore(Environment.java:328) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:113) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:218) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.1.jar:7.10.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.1.jar:7.10.1]
        ... 6 more

Welcome!

It sounds like that elasticsearch is already running.
Could it be?

Does /usr/share/elasticsearch/data exist?

This error occurs when I try to start it.
Yes, the directory exists(along with /usr/share/elasticsearch/data/nodes/0/node.lock) and is owned by elasticsearch user

Did you check if elasticsearch is already running?

Yes It has failed to start

[kuba@kuba-ms7b87 igrit]$ systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sat 2021-04-17 16:16:21 CEST; 1h 35min ago
       Docs: http://www.elastic.co
    Process: 82709 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade (code=exited, status=0/SUCCESS)
    Process: 82768 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid (code=exited, status=1/FAILURE)
   Main PID: 82768 (code=exited, status=1/FAILURE)

kwi 17 16:16:21 kuba-ms7b87 elasticsearch[82768]:         at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
kwi 17 16:16:21 kuba-ms7b87 elasticsearch[82768]:         at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
kwi 17 16:16:21 kuba-ms7b87 elasticsearch[82768]:         at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
kwi 17 16:16:21 kuba-ms7b87 elasticsearch[82768]:         at org.elasticsearch.cli.Command.main(Command.java:90)
kwi 17 16:16:21 kuba-ms7b87 elasticsearch[82768]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
kwi 17 16:16:21 kuba-ms7b87 elasticsearch[82768]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
kwi 17 16:16:21 kuba-ms7b87 elasticsearch[82768]: For complete error details, refer to the log at /usr/share/elasticsearch/logs/elasticsearch.log
kwi 17 16:16:21 kuba-ms7b87 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
kwi 17 16:16:21 kuba-ms7b87 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
kwi 17 16:16:21 kuba-ms7b87 systemd[1]: Failed to start Elasticsearch.

Could you share the full elasticsearch logs?

I'll post it in two posts, because forum doesn't allow me to paste so much characters.

part 1)

[kuba@kuba-ms7b87 ~]$ cat /var/log/elasticsearch/elasticsearch.log
[2021-04-18T11:49:41,058][INFO ][o.e.n.Node               ] [kuba-ms7b87] version[7.10.1], pid[4145], build[default/tar/unknown/2020-12-28T19:46:41.395429Z], OS[Linux/4.19.175-1-MANJARO/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.10/11.0.10+9]
[2021-04-18T11:49:41,068][INFO ][o.e.n.Node               ] [kuba-ms7b87] JVM home [/usr/lib/jvm/java-11-openjdk]
[2021-04-18T11:49:41,072][INFO ][o.e.n.Node               ] [kuba-ms7b87] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/tmp/elasticsearch-4049170612504613422, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=false]
[2021-04-18T11:49:42,791][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [aggs-matrix-stats]
[2021-04-18T11:49:42,791][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [analysis-common]
[2021-04-18T11:49:42,791][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [constant-keyword]
[2021-04-18T11:49:42,792][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [flattened]
[2021-04-18T11:49:42,792][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [frozen-indices]
[2021-04-18T11:49:42,792][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [ingest-common]
[2021-04-18T11:49:42,792][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [ingest-geoip]
[2021-04-18T11:49:42,792][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [ingest-user-agent]
[2021-04-18T11:49:42,793][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [kibana]
[2021-04-18T11:49:42,793][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [lang-expression]
[2021-04-18T11:49:42,793][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [lang-mustache]
[2021-04-18T11:49:42,793][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [lang-painless]
[2021-04-18T11:49:42,794][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [mapper-extras]
[2021-04-18T11:49:42,794][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [mapper-version]
[2021-04-18T11:49:42,794][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [parent-join]
[2021-04-18T11:49:42,794][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [percolator]
[2021-04-18T11:49:42,795][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [rank-eval]
[2021-04-18T11:49:42,795][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [reindex]
[2021-04-18T11:49:42,795][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [repositories-metering-api]
[2021-04-18T11:49:42,795][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [repository-url]
[2021-04-18T11:49:42,795][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [search-business-rules]
[2021-04-18T11:49:42,795][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [searchable-snapshots]
[2021-04-18T11:49:42,796][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [spatial]
[2021-04-18T11:49:42,796][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [systemd]
[2021-04-18T11:49:42,796][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [transform]
[2021-04-18T11:49:42,796][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [transport-netty4]
[2021-04-18T11:49:42,796][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [unsigned-long]
[2021-04-18T11:49:42,797][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [vectors]
[2021-04-18T11:49:42,797][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [wildcard]
[2021-04-18T11:49:42,797][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-analytics]
[2021-04-18T11:49:42,797][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-async]
[2021-04-18T11:49:42,797][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-async-search]
[2021-04-18T11:49:42,797][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-autoscaling]
[2021-04-18T11:49:42,798][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-ccr]
[2021-04-18T11:49:42,798][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-core]
[2021-04-18T11:49:42,798][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-data-streams]
[2021-04-18T11:49:42,798][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-deprecation]
[2021-04-18T11:49:42,798][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-enrich]
[2021-04-18T11:49:42,798][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-eql]
[2021-04-18T11:49:42,799][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-graph]
[2021-04-18T11:49:42,799][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-identity-provider]
[2021-04-18T11:49:42,799][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-ilm]
[2021-04-18T11:49:42,799][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-logstash]
[2021-04-18T11:49:42,799][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-ml]
[2021-04-18T11:49:42,800][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-monitoring]
[2021-04-18T11:49:42,800][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-ql]
[2021-04-18T11:49:42,800][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-rollup]
[2021-04-18T11:49:42,800][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-security]
[2021-04-18T11:49:42,800][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-sql]
[2021-04-18T11:49:42,800][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-stack]
[2021-04-18T11:49:42,801][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-voting-only-node]
[2021-04-18T11:49:42,801][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] loaded module [x-pack-watcher]
[2021-04-18T11:49:42,801][INFO ][o.e.p.PluginsService     ] [kuba-ms7b87] no plugins loaded
[2021-04-18T11:49:42,839][ERROR][o.e.b.Bootstrap          ] [kuba-ms7b87] Exception
java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:302) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) [elasticsearch-cli-7.10.1.jar:7.10.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.10.1.jar:7.10.1]
Caused by: java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data/nodes/0
	at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:224) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
	... 12 more
Caused by: java.io.IOException: Mount point not found
	at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105) ~[?:?]
	at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:69) ~[?:?]
	at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49) ~[?:?]
	at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51) ~[?:?]
	at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39) ~[?:?]
	at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:373) ~[?:?]
	at java.nio.file.Files.getFileStore(Files.java:1488) ~[?:?]
	at org.elasticsearch.env.Environment.getFileStore(Environment.java:328) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:113) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:218) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
	... 12 more
[2021-04-18T11:49:42,846][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [kuba-ms7b87] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.10.1.jar:7.10.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.10.1.jar:7.10.1]

part 2)

Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:302) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.1.jar:7.10.1]
	... 6 more
Caused by: java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data/nodes/0
	at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:224) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.1.jar:7.10.1]
	... 6 more
Caused by: java.io.IOException: Mount point not found
	at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105) ~[?:?]
	at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:69) ~[?:?]
	at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49) ~[?:?]
	at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51) ~[?:?]
	at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39) ~[?:?]
	at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:373) ~[?:?]
	at java.nio.file.Files.getFileStore(Files.java:1488) ~[?:?]
	at org.elasticsearch.env.Environment.getFileStore(Environment.java:328) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:113) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:218) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:272) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.1.jar:7.10.1]
	... 6 more

Any ideas? I've been fighting like 4 days with it and I have no clue what to do next.

I'm very surprised by this.

Could you share your docker script and the docker logs for elasticsearch instance?

Those logs are from my Manjaro Linux, not from docker. For now I would like to run it without the docker.

But you told that you can reproduce the issue with Docker. Unless you are using the same data dir, I don't see how this could happen.

So I'd like to understand first what you did with the Docker part and why you said:

Same error pops up with docker

After I failed to run it on my Linux, i configured a docker to run ES, but didn't make any progress with it.

Docker logs after I run docker-compose up

es_1          | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release
es_1          | {"type": "server", "timestamp": "2021-04-19T17:16:19,550Z", "level": "ERROR", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "docker-cluster", "node.name": "42c67ff680c1", "message": "uncaught exception in thread [main]", 
es_1          | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?",
es_1          | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?",
es_1          | "at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:301) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.node.Node.<init>(Node.java:277) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.node.Node.<init>(Node.java:257) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "... 6 more",
es_1          | "Caused by: java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data/nodes/0",
es_1          | "at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:223) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:271) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.node.Node.<init>(Node.java:277) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.node.Node.<init>(Node.java:257) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "... 6 more",
es_1          | "Caused by: java.io.IOException: Mount point not found",
es_1          | "at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105) ~[?:?]",
es_1          | "at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:67) ~[?:?]",
es_1          | "at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49) ~[?:?]",
es_1          | "at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51) ~[?:?]",
es_1          | "at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39) ~[?:?]",
es_1          | "at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:373) ~[?:?]",
es_1          | "at java.nio.file.Files.getFileStore(Files.java:1491) ~[?:?]",
es_1          | "at org.elasticsearch.env.Environment.getFileStore(Environment.java:327) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:112) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:217) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:271) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.node.Node.<init>(Node.java:277) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.node.Node.<init>(Node.java:257) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.6.2.jar:7.6.2]",
es_1          | "... 6 more"] }
es_1          | uncaught exception in thread [main]
es_1          | java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
es_1          | Likely root cause: java.io.IOException: Mount point not found
es_1          | 	at java.base/sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105)
es_1          | 	at java.base/sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:67)
es_1          | 	at java.base/sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49)
es_1          | 	at java.base/sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51)
es_1          | 	at java.base/sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39)
es_1          | 	at java.base/sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:373)
es_1          | 	at java.base/java.nio.file.Files.getFileStore(Files.java:1491)
es_1          | 	at org.elasticsearch.env.Environment.getFileStore(Environment.java:327)
es_1          | 	at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:112)
es_1          | 	at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:217)
es_1          | 	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:271)
es_1          | 	at org.elasticsearch.node.Node.<init>(Node.java:277)
es_1          | 	at org.elasticsearch.node.Node.<init>(Node.java:257)
es_1          | 	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221)
es_1          | 	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221)
es_1          | 	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349)
es_1          | 	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
es_1          | 	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
es_1          | 	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
es_1          | 	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
es_1          | 	at org.elasticsearch.cli.Command.main(Command.java:90)
es_1          | 	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
es_1          | 	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
es_1          | For complete error details, refer to the log at /usr/share/elasticsearch/logs/docker-cluster.log
docker_es_1 exited with code 1

docker-compose.yml

version: "3.2"
services:
  php-fpm:
    container_name: 'airsoftspareparts-php'
    build:
      context: './php/'
    volumes:
      - ../airsoftspareparts:/var/www/app/
      - ./logs:/var/log
  
  nginx:
    container_name: 'airsoftspareparts-nginx'
    build: './nginx/'
    depends_on:
      - php-fpm
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ../airsoftspareparts:/var/www/app/
      - ./nginx/nginx.conf:/etc/nginx/nginx.conf
      - ./nginx/sites/:/etc/nginx/sites-available
      - ./logs:/var/log
  mariadb:
    container_name: 'airsoftspareparts-mariadb'
    build:
      context: ./mariadb
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=1
      - MYSQL_ROOT_PASSWORD=root
    volumes:
      - ../airsoftspareparts:/var/www/app/
      - ./mariadb/conf.d:/etc/mysql/conf.d
      - ./mariadb/local/data:/var/lib/mysql/data
      - ./logs:/var/log
    ports:
      - "3306:3306"
  phpmyadmin:
    container_name: 'airsoftspareparts-pma'
    image: phpmyadmin/phpmyadmin
    ports:
      - 8080:80
    environment:
      - PMA_HOST=mariadb
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_USER_container_name=root
  ngrok:
    container_name: 'airsoftspareparts-ngrok'
    image: shkoliar/ngrok:latest
    ports:
      - 4551:4551
    links:
      - nginx
    environment:
      - DOMAIN=nginx
      - PORT=80
    volumes:
      - ../airsoftspareparts:/var/www/app/
  es:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
    environment:
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
      - "discovery.type=single-node"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
     - "9200:9200"
     - "9300:9300"
    volumes:
     - ./elasticsearch_data:/usr/share/elasticsearch/data
  redis:
    container_name: 'airsoftspareparts-redis'
    build:
      context: ./redis
networks:
  default:
    driver: bridge

Could you change

./elasticsearch_data:/usr/share/elasticsearch/data

To a new and empty local dir?

I just tried, the same error occurs.
I even tried to delete volume configuration from .yml, so it will be stored locally in docker container, still the same...

Now I changed version to 6.2.4 and it works...

Hello,

I'm having the same issue when I want to start Elastic with Ansible service module on AWS:

    - name: Start elastic
      service: name=elasticsearch state=started enabled=yes use=service
      register: elasticsearch_start
      failed_when: "elasticsearch_start.failed|default(false) and not ansible_check_mode"
      changed_when: "elasticsearch_start.changed|default(false) or (elasticsearch_start.failed|default(false) and ansible_check_mode)"
      tags: elastic

Manually executing "service elasticsearch start" is working.
Using Elastic 7.12.1
Ansible 2.10.9

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