[root@localhost logs]# tail -n50 elasticsearch.log
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.13.jar:5.6.13]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/opt/seafile/pro-data/search/data/elasticsearch]] with lock id [0]; may
be 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:265) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.node.Node.(Node.java:245) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:233) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.13.jar:5.6.13]
… 6 more
[2021-08-04T02:28:35,937][INFO ][o.e.n.Node ] initializing …
[2021-08-04T02:28:35,966][ERROR][o.e.b.Bootstrap ] Exception
java.lang.IllegalStateException: failed to obtain node locks, tried [[/opt/seafile/pro-data/search/data/elasticsearch]] with lock id [0]; maybe these lo
cations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])? at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:265) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.node.Node.(Node.java:245) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:233) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.6.13.jar:5.6.13]
[2021-08-04T02:28:35,972][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/opt/seafile/pro-data/search/data/el
asticsearch]] 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:136) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.13.jar:5.6.13]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/opt/seafile/pro-data/search/data/elasticsearch]] with lock id [0]; may
be 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:265) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.node.Node.(Node.java:245) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:233) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.13.jar:5.6.13]
日志有这个目录/opt/seafile/pro-data/search/data/elasticsearch] 实际上是没有的
版本是8.0.17
上面日志可能贴错了,我发现系统还有一个es 下面是日志
[root@localhost multi-user.target.wants]# tail -n 50 /var/log/elasticsearch/elasticsearch.log
[2024-12-08T23:28:52,392][INFO ][o.e.c.r.a.AllocationService] [lvuACBZ] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[repo_head][2], [repo_head][1]] …]).
[2024-12-08T23:37:06,055][INFO ][o.e.n.Node ] initializing …
[2024-12-08T23:37:06,130][INFO ][o.e.e.NodeEnvironment ] [lvuACBZ] using [1] data paths, mounts [[/ (/dev/mapper/cl-root)]], net usable_space [31.9gb], net total_space [49.9gb], spins? [no], types [xfs]
[2024-12-08T23:37:06,131][INFO ][o.e.e.NodeEnvironment ] [lvuACBZ] heap size [1.9gb], compressed ordinary object pointers [true]
[2024-12-08T23:37:06,149][INFO ][o.e.n.Node ] node name [lvuACBZ] derived from node ID [lvuACBZvS7m9lnClpusbKQ]; set [node.name] to override
[2024-12-08T23:37:06,149][INFO ][o.e.n.Node ] version[5.6.16], pid[6807], build[3a740d1/2019-03-13T15:33:36.565Z], OS[Linux/4.18.0-193.el8.x86_64/amd64], JVM[Red Hat, Inc./OpenJDK 64-Bit Server VM/1.8.0_302/25.302-b08]
[2024-12-08T23:37:06,149][INFO ][o.e.n.Node ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headl
ess=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/share/elasticsearch][2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [aggs-matrix-stats]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [ingest-common]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-expression]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-groovy]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-mustache]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-painless]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [parent-join]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [percolator]
[2024-12-08T23:37:06,825][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [reindex]
[2024-12-08T23:37:06,826][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [transport-netty3]
[2024-12-08T23:37:06,826][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [transport-netty4]
[2024-12-08T23:37:06,826][INFO ][o.e.p.PluginsService ] [lvuACBZ] no plugins loaded
[2024-12-08T23:37:08,071][INFO ][o.e.d.DiscoveryModule ] [lvuACBZ] using discovery type [zen]
[2024-12-08T23:37:08,512][INFO ][o.e.n.Node ] initialized
[2024-12-08T23:37:08,512][INFO ][o.e.n.Node ] [lvuACBZ] starting …
[2024-12-08T23:37:08,679][INFO ][o.e.t.TransportService ] [lvuACBZ] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2024-12-08T23:37:56,129][INFO ][o.e.n.Node ] initializing …
[2024-12-08T23:37:56,362][INFO ][o.e.e.NodeEnvironment ] [lvuACBZ] using [1] data paths, mounts [[/ (/dev/mapper/cl-root)]], net usable_space [31.9gb], net total_space [49.9gb], spins? [no], types [xfs]
[2024-12-08T23:37:56,362][INFO ][o.e.e.NodeEnvironment ] [lvuACBZ] heap size [1.9gb], compressed ordinary object pointers [true]
[2024-12-08T23:37:56,421][INFO ][o.e.n.Node ] node name [lvuACBZ] derived from node ID [lvuACBZvS7m9lnClpusbKQ]; set [node.name] to override
[2024-12-08T23:37:56,422][INFO ][o.e.n.Node ] version[5.6.16], pid[6923], build[3a740d1/2019-03-13T15:33:36.565Z], OS[Linux/4.18.0-193.el8.x86_64/amd64], JVM[Red Hat, Inc./OpenJDK 64-Bit Server VM/1.8.0_302/25.302-b08]
[2024-12-08T23:37:56,422][INFO ][o.e.n.Node ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headl
ess=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/share/elasticsearch][2024-12-08T23:37:58,507][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [aggs-matrix-stats]
[2024-12-08T23:37:58,507][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [ingest-common]
[2024-12-08T23:37:58,508][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-expression]
[2024-12-08T23:37:58,508][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-groovy]
[2024-12-08T23:37:58,508][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-mustache]
[2024-12-08T23:37:58,508][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [lang-painless]
[2024-12-08T23:37:58,508][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [parent-join]
[2024-12-08T23:37:58,509][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [percolator]
[2024-12-08T23:37:58,509][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [reindex]
[2024-12-08T23:37:58,509][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [transport-netty3]
[2024-12-08T23:37:58,509][INFO ][o.e.p.PluginsService ] [lvuACBZ] loaded module [transport-netty4]
[2024-12-08T23:37:58,510][INFO ][o.e.p.PluginsService ] [lvuACBZ] no plugins loaded
[2024-12-08T23:38:00,964][INFO ][o.e.d.DiscoveryModule ] [lvuACBZ] using discovery type [zen]
[2024-12-08T23:38:02,325][INFO ][o.e.n.Node ] initialized
[2024-12-08T23:38:02,325][INFO ][o.e.n.Node ] [lvuACBZ] starting …
[2024-12-08T23:38:02,865][INFO ][o.e.t.TransportService ] [lvuACBZ] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2024-12-08T23:38:06,030][INFO ][o.e.c.s.ClusterService ] [lvuACBZ] new_master {lvuACBZ}{lvuACBZvS7m9lnClpusbKQ}{xGeIbOP0Q3Sz15_XtFo9PA}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2024-12-08T23:38:06,082][INFO ][o.e.h.n.Netty4HttpServerTransport] [lvuACBZ] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}
[2024-12-08T23:38:06,082][INFO ][o.e.n.Node ] [lvuACBZ] started
[2024-12-08T23:38:06,473][INFO ][o.e.g.GatewayService ] [lvuACBZ] recovered [2] indices into cluster_state
[2024-12-08T23:38:06,881][INFO ][o.e.c.r.a.AllocationService] [lvuACBZ] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[repo_head][1]] …]).
[root@localhost etc]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2024-12-08 23:47:57 CST; 18s ago
Docs: http://www.elastic.co
Process: 7313 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 7315 (java)
Tasks: 85 (limit: 101204)
Memory: 1.2G
CGroup: /system.slice/elasticsearch.service
└─7315 /bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=tr>