Problem installation Elasticsearch - fatal exception while booting Elasticsearch java.lang.IllegalStateException: failed to obtain node locks

Hi

I am doing a new installation of elasticsearch, I have done it several times but I have changed to a server with nvme (I don't know if it is the problem) and I have not been able to do it, I am doing it through ssh, I execute the command ./bin/elasticsearch and I get this error

fatal exception while booting Elasticsearch java.lang.IllegalStateException: failed to obtain node locks, tried [/home/wwwfirep/public_html/elasticsearch-8.10.2/data]; maybe these locations are not writable or multiple nodes were started on the same data path?

This is log of the installation

[wwwfirep@170-249-111-114 elasticsearch-8.10.2]$ ./bin/elasticsearch          
Failed to load native library:jansi-2.4.0-87195a45729ba3f7-libjansi.so. The native library file at /tmp/elasticsearch-11456051047912946496/jansi-2.4.0-87195a45729ba3f7-libjansi.so is not executable, make sure that the directory is mounted on a partition without the noexec flag, or set the jansi.tmpdir system property to point to a proper location.  osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-11456051047912946496/jansi-2.4.0-87195a45729ba3f7-libjansi.so: /tmp/elasticsearch-11456051047912946496/jansi-2.4.0-87195a45729ba3f7-libjansi.so: failed to map segment from shared object
[2023-10-06T14:57:57,540][INFO ][o.a.l.u.VectorUtilPanamaProvider] [170-249-111-114.cprapid.com] Java vector incubator API enabled; uses preferredBitSize=256
[2023-10-06T14:57:57,783][INFO ][o.e.n.Node               ] [170-249-111-114.cprapid.com] version[8.10.2], pid[3706], build[tar/6d20dd8ce62365be9b1aca96427de4622e970e9e/2023-09-19T08:16:24.564900370Z], OS[Linux/4.18.0-348.23.1.el8_5.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/20.0.2/20.0.2+9-78]
[2023-10-06T14:57:57,783][INFO ][o.e.n.Node               ] [170-249-111-114.cprapid.com] JVM home [/home/wwwfirep/public_html/elasticsearch-8.10.2/jdk], using bundled JDK [true]
[2023-10-06T14:57:57,783][INFO ][o.e.n.Node               ] [170-249-111-114.cprapid.com] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=org.elasticsearch.preallocate, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-11456051047912946496, --add-modules=jdk.incubator.vector, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,level,pid,tags:filecount=32,filesize=64m, -Xms15939m, -Xmx15939m, -XX:MaxDirectMemorySize=8359247872, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=25, -Des.distribution.type=tar, --module-path=/home/wwwfirep/public_html/elasticsearch-8.10.2/lib, --add-modules=jdk.net, --add-modules=org.elasticsearch.preallocate, -Djdk.module.main=org.elasticsearch.server]
[2023-10-06T14:57:59,296][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [repository-url]
[2023-10-06T14:57:59,296][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [rest-root]
[2023-10-06T14:57:59,296][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-core]
[2023-10-06T14:57:59,297][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-redact]
[2023-10-06T14:57:59,297][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [ingest-user-agent]
[2023-10-06T14:57:59,297][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-async-search]
[2023-10-06T14:57:59,297][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-monitoring]
[2023-10-06T14:57:59,297][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [repository-s3]
[2023-10-06T14:57:59,297][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-analytics]
[2023-10-06T14:57:59,297][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-ent-search]
[2023-10-06T14:57:59,298][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-autoscaling]
[2023-10-06T14:57:59,298][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [lang-painless]
[2023-10-06T14:57:59,298][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-ml]
[2023-10-06T14:57:59,298][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [lang-mustache]
[2023-10-06T14:57:59,298][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [legacy-geo]
[2023-10-06T14:57:59,298][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-ql]
[2023-10-06T14:57:59,298][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [rank-rrf]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [analysis-common]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [transport-netty4]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [aggregations]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [ingest-common]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [frozen-indices]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-identity-provider]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-text-structure]
[2023-10-06T14:57:59,299][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-shutdown]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [snapshot-repo-test-kit]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [ml-package-loader]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [kibana]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [constant-keyword]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-logstash]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-ccr]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-graph]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [parent-join]
[2023-10-06T14:57:59,300][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-enrich]
[2023-10-06T14:57:59,301][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [repositories-metering-api]
[2023-10-06T14:57:59,301][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [transform]
[2023-10-06T14:57:59,301][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [repository-azure]
[2023-10-06T14:57:59,301][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [repository-gcs]
[2023-10-06T14:57:59,301][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [spatial]
[2023-10-06T14:57:59,301][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [apm]
[2023-10-06T14:57:59,301][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [mapper-extras]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [mapper-version]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-rollup]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [percolator]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [data-streams]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-stack]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [rank-eval]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [reindex]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-security]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [blob-cache]
[2023-10-06T14:57:59,302][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [searchable-snapshots]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-slm]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [snapshot-based-recoveries]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-watcher]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [old-lucene-versions]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-ilm]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-voting-only-node]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-deprecation]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-fleet]
[2023-10-06T14:57:59,303][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-aggregate-metric]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-downsample]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-profiling]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [ingest-geoip]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-write-load-forecaster]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [search-business-rules]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [ingest-attachment]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [wildcard]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [unsigned-long]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-sql]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [runtime-fields-common]
[2023-10-06T14:57:59,304][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-async]
[2023-10-06T14:57:59,305][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [vector-tile]
[2023-10-06T14:57:59,305][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [lang-expression]
[2023-10-06T14:57:59,305][INFO ][o.e.p.PluginsService     ] [170-249-111-114.cprapid.com] loaded module [x-pack-eql]
[2023-10-06T14:58:00,484][ERROR][o.e.b.Elasticsearch      ] [170-249-111-114.cprapid.com] fatal exception while booting Elasticsearch java.lang.IllegalStateException: failed to obtain node locks, tried [/home/wwwfirep/public_html/elasticsearch-8.10.2/data]; maybe these locations are not writable or multiple nodes were started on the same data path?
	at org.elasticsearch.server@8.10.2/org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:292)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.node.Node.<init>(Node.java:490)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.node.Node.<init>(Node.java:338)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:234)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:234)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:72)
Caused by: java.io.IOException: failed to obtain lock on /home/wwwfirep/public_html/elasticsearch-8.10.2/data
	at org.elasticsearch.server@8.10.2/org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:237)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:205)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:284)
	... 5 more
Caused by: java.io.IOException: Mount point not found
	at java.base/sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105)
	at java.base/sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:69)
	at java.base/sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39)
	at java.base/sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:422)
	at java.base/java.nio.file.Files.getFileStore(Files.java:1495)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.env.Environment.getFileStore(Environment.java:324)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.env.NodeEnvironment$DataPath.<init>(NodeEnvironment.java:112)
	at org.elasticsearch.server@8.10.2/org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:231)
	... 7 more

Regards

reinstall the OS and install Elasticsearch with RPM and everything works fine now :smile:

After elasticsearch install, need check permissions of
/data and config[/etc/elasticsearch] directories
need set owner as 'elasticsearch' user if its different

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