hi Yassine,
I have fixed the obvious file and directory permissions errors above, but now I am getting another error, see below for more info:
bash-4.4$ ./elasticsearch
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2020-09-02T19:45:14,029][WARN ][o.e.c.l.LogConfigurator ] [ElasticEDT] Some logging configurations have %marker but don't have %node_name. We will automatically add %node_name to the pattern to ease the migration for users who customize log4j2.properties but will stop this behavior in 7.0. You should manually replace %node_name
with [%node_name]%marker
in these locations:
/etc/elasticsearch/test/log4j2.properties
[2020-09-02T19:45:14,270][INFO ][o.e.n.Node ] [ElasticEDT] version[7.8.1], pid[27288], build[default/rpm/b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89/2020-07-21T16:40:44.668009Z], OS[Linux/4.18.0-147.5.1.el8_1.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.8/11.0.8+10-LTS]
[2020-09-02T19:45:14,271][INFO ][o.e.n.Node ] [ElasticEDT] JVM home [/usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64]
[2020-09-02T19:45:14,272][INFO ][o.e.n.Node ] [ElasticEDT] 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-17844278366693308801, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/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=rpm, -Des.bundled_jdk=true]
[2020-09-02T19:45:16,175][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [aggs-matrix-stats]
[2020-09-02T19:45:16,176][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [analysis-common]
[2020-09-02T19:45:16,176][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [constant-keyword]
[2020-09-02T19:45:16,177][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [flattened]
... and so on ...
[transform]
[2020-09-02T19:45:16,182][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [transport-netty4]
[2020-09-02T19:45:16,182][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [vectors]
[2020-09-02T19:45:16,183][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-analytics]
[2020-09-02T19:45:16,183][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-async-search]
[2020-09-02T19:45:16,183][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-autoscaling]
[2020-09-02T19:45:16,183][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-ccr]
[2020-09-02T19:45:16,184][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-core]
[2020-09-02T19:45:16,184][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-deprecation]
[2020-09-02T19:45:16,184][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-enrich]
[2020-09-02T19:45:16,184][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-eql]
[2020-09-02T19:45:16,184][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-graph]
[2020-09-02T19:45:16,185][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-identity-provider]
[2020-09-02T19:45:16,185][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-ilm]
[2020-09-02T19:45:16,185][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-logstash]
[2020-09-02T19:45:16,185][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-ml]
[2020-09-02T19:45:16,186][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-monitoring]
[2020-09-02T19:45:16,186][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-ql]
[2020-09-02T19:45:16,186][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-rollup]
[2020-09-02T19:45:16,186][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-security]
[2020-09-02T19:45:16,187][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-sql]
[2020-09-02T19:45:16,187][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-voting-only-node]
[2020-09-02T19:45:16,187][INFO ][o.e.p.PluginsService ] [ElasticEDT] loaded module [x-pack-watcher]
[2020-09-02T19:45:16,187][INFO ][o.e.p.PluginsService ] [ElasticEDT] no plugins loaded
[2020-09-02T19:45:16,234][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [ElasticEDT] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/var/lib/elasticsearch]] 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.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.8.1.jar:7.8.1]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/var/lib/elasticsearch]] 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.(NodeEnvironment.java:301) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.node.Node.(Node.java:335) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.node.Node.(Node.java:266) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.8.1.jar:7.8.1]
... 6 more
Caused by: java.io.IOException: failed to obtain lock on /var/lib/elasticsearch/nodes/0
at org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:223) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:271) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.node.Node.(Node.java:335) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.node.Node.(Node.java:266) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.8.1.jar:7.8.1]
... 6 more
Caused by: java.nio.file.AccessDeniedException: /var/lib/elasticsearch/nodes/0/node.lock
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182) ~[?:?]
at java.nio.channels.FileChannel.open(FileChannel.java:292) ~[?:?]
at java.nio.channels.FileChannel.open(FileChannel.java:345) ~[?:?]
at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:125) ~[lucene-core-8.5.1.jar:8.5.1 edb9fc409398f2c3446883f9f80595c884d245d0 - ivera - 2020-04-08 08:55:42]
at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41) ~[lucene-core-8.5.1.jar:8.5.1 edb9fc409398f2c3446883f9f80595c884d245d0 - ivera - 2020-04-08 08:55:42]
at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45) ~[lucene-core-8.5.1.jar:8.5.1 edb9fc409398f2c3446883f9f80595c884d245d0 - ivera - 2020-04-08 08:55:42]
at org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:216) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:271) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.node.Node.(Node.java:335) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.node.Node.(Node.java:266) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.8.1.jar:7.8.1]
... 6 more
uncaught exception in thread [main]
java.lang.IllegalStateException: failed to obtain node locks, tried [[/var/lib/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
Likely root cause: java.nio.file.AccessDeniedException: /var/lib/elasticsearch/nodes/0/node.lock
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)
at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:125)
at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
at org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:216)
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:271)
at org.elasticsearch.node.Node.(Node.java:335)
at org.elasticsearch.node.Node.(Node.java:266)
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:227)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
For complete error details, refer to the log at /var/log/elasticsearch/elasticsearch.log
bash-4.4$