Elastich search can not start in vps

Hello
I installed java and Elasticsearch in vps
my vps have 4g ram and 50g ssd

when i start Elasticsearch this error display

 elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2022-03-01 09:05:08 UTC; 21min ago
     Docs: https://www.elastic.co
 Main PID: 27813 (code=exited, status=1/FAILURE)

Mar 01 09:05:08 194-31-194-14.cprapid.com systemd[1]: Starting Elasticsearch...
Mar 01 09:05:08 194-31-194-14.cprapid.com systemd-entrypoint[27813]: could not find java in ES_JAVA_HOME at /usr/openv/java/jre/bin/bin/java
Mar 01 09:05:08 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Mar 01 09:05:08 194-31-194-14.cprapid.com systemd[1]: Failed to start Elasticsearch.
Mar 01 09:05:08 194-31-194-14.cprapid.com systemd[1]: Unit elasticsearch.service entered failed state.
Mar 01 09:05:08 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service failed.



when i type this journalctl -xe

show


Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
Mar 01 10:09:13 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN
Mar 01 10:09:22 194-31-194-14.cprapid.com polkitd[579]: Registered Authenticati
Mar 01 10:09:25 194-31-194-14.cprapid.com polkitd[579]: Operator of unix-proces
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd-entrypoint[31053]: could not
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service: ma
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Failed to start Elasticse
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Unit elasticsearch.servic
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service fai
Mar 01 10:09:25 194-31-194-14.cprapid.com polkitd[579]: Unregistered Authentica
Mar 01 10:09:34 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN
lines 2218-2240/2240 (END)
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
Mar 01 10:09:04 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:48:03:3d:08:55:31:31:43:14:08:00 SRC=175
Mar 01 10:09:05 194-31-194-14.cprapid.com polkitd[579]: Operator of unix-process:30975:6977549 successfully authenticated as unix-user:doki
Mar 01 10:09:07 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:48:03:3d:08:55:31:31:43:14:08:00 SRC=175
Mar 01 10:09:08 194-31-194-14.cprapid.com polkitd[579]: Operator of unix-process:30975:6977549 successfully authenticated as unix-user:doki
Mar 01 10:09:08 194-31-194-14.cprapid.com systemd[1]: Reloading.
Mar 01 10:09:08 194-31-194-14.cprapid.com polkitd[579]: Unregistered Authentication Agent for unix-process:30975:6977549 (system bus name :1.15
Mar 01 10:09:10 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:48:03:3d:08:55:31:31:43:14:08:00 SRC=185
Mar 01 10:09:13 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:48:03:3d:08:55:31:31:43:14:08:00 SRC=175
Mar 01 10:09:22 194-31-194-14.cprapid.com polkitd[579]: Registered Authentication Agent for unix-process:31038:6980552 (system bus name :1.1557
Mar 01 10:09:25 194-31-194-14.cprapid.com polkitd[579]: Operator of unix-process:31038:6980552 successfully authenticated as unix-user:doki
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd-entrypoint[31053]: could not find java in ES_JAVA_HOME at /usr/openv/java/jre/bin/bin/java
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Unit elasticsearch.service entered failed state.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service failed.
Mar 01 10:09:25 194-31-194-14.cprapid.com polkitd[579]: Unregistered Authentication Agent for unix-process:31038:6980552 (system bus name :1.15
Mar 01 10:09:34 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:48:03:3d:08:55:31:31:43:14:08:00 SRC=162
lines 2218-2240/2240 (END)
Mar 01 10:09:13 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:48:03:3d:08:55:31:31:43:14:08:00 SRC=175.9.53.101 DST=1
Mar 01 10:09:22 194-31-194-14.cprapid.com polkitd[579]: Registered Authentication Agent for unix-process:31038:6980552 (system bus name :1.1557 [/usr/bin/pktt
Mar 01 10:09:25 194-31-194-14.cprapid.com polkitd[579]: Operator of unix-process:31038:6980552 successfully authenticated as unix-user:doki to gain
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd-entrypoint[31053]: could not find java in ES_JAVA_HOME at /usr/openv/java/jre/bin/bin/java
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: Unit elasticsearch.service entered failed state.
Mar 01 10:09:25 194-31-194-14.cprapid.com systemd[1]: elasticsearch.service failed.
Mar 01 10:09:25 194-31-194-14.cprapid.com polkitd[579]: Unregistered Authentication Agent for unix-process:31038:6980552 (system bus name :1.1557, object path
Mar 01 10:09:34 194-31-194-14.cprapid.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:48:03:3d:08:55:31:31:43:14:08:00 SRC=162.142.125.143 DS
lines 2218-2240/2240 (END)

Welcome to our community! :smiley:

You probably need to check /var/log/elasticsearch/elasticsearch.log.

  ] [194-31-194-14.cprapid.com] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-10756209093653360415/jna5319666857825448676.tmp: /tmp/elasticsearch-10756209093653360415/jna5319666857825448676.tmp:$
        at jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?]
        at jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) ~[?:?]
        at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) ~[?:?]
        at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) ~[?:?]
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389) ~[?:?]
        at java.lang.Runtime.load0(Runtime.java:755) ~[?:?]
        at java.lang.System.load(System.java:1953) ~[?:?]
        at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1045) ~[jna-5.10.0.jar:5.10.0 (b0)]
        at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:1015) ~[jna-5.10.0.jar:5.10.0 (b0)]
        at com.sun.jna.Native.<clinit>(Native.java:221) ~[jna-5.10.0.jar:5.10.0 (b0)]
        at java.lang.Class.forName0(Native Method) ~[?:?]
        at java.lang.Class.forName(Class.java:375) ~[?:?]
        at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:34) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:102) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:358) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) [elasticsearch-cli-8.0.1.jar:8.0.1]
        at org.elasticsearch.cli.Command.main(Command.java:77) [elasticsearch-cli-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) [elasticsearch-8.0.1.jar:8.0.1]
[2022-03-01T22:10:45,928][WARN ][o.e.b.Natives            ] [194-31-194-14.cprapid.com] cannot check if running as root because JNA is not available
[2022-03-01T22:10:45,928][WARN ][o.e.b.Natives            ] [194-31-194-14.cprapid.com] cannot install system call filter because JNA is not available
[2022-03-01T22:10:45,929][WARN ][o.e.b.Natives            ] [194-31-194-14.cprapid.com] cannot register console handler because JNA is not available
[2022-03-01T22:10:45,933][WARN ][o.e.b.Natives            ] [194-31-194-14.cprapid.com] cannot getrlimit RLIMIT_NPROC because JNA is not available
[2022-03-01T22:10:45,933][WARN ][o.e.b.Natives            ] [194-31-194-14.cprapid.com] cannot getrlimit RLIMIT_AS because JNA is not available
[2022-03-01T22:10:45,933][WARN ][o.e.b.Natives            ] [194-31-194-14.cprapid.com] cannot getrlimit RLIMIT_FSIZE because JNA is not available
[2022-03-01T22:10:45,938][WARN ][o.e.c.f.FileSystemNatives] [194-31-194-14.cprapid.com] unable to load JNA native support library, FileSystemNatives methods will be d$
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
        at java.lang.Class.forName0(Native Method) ~[?:?]
        at java.lang.Class.forName(Class.java:375) ~[?:?]
        at org.elasticsearch.common.filesystem.FileSystemNatives.loadJnaProvider(FileSystemNatives.java:37) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.common.filesystem.FileSystemNatives.<clinit>(FileSystemNatives.java:31) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:158) [elasticsearch-8.0.1.jar:8.0.1]```

Looks like your system is not configured as per these docs.

1 Like

New error in log file

[2022-03-01T23:35:27,538][ERROR][o.e.b.Bootstrap          ] [194-31-194-14.cprapid.com] Exception
org.elasticsearch.ElasticsearchSecurityException: invalid configuration for xpack.security.transport.ssl - [xpack.security.transport.ssl.enabled] is not set, but the f$
        at org.elasticsearch.xpack.core.ssl.SSLService.validateServerConfiguration(SSLService.java:652) ~[?:?]
        at org.elasticsearch.xpack.core.ssl.SSLService.loadSslConfigurations(SSLService.java:612) ~[?:?]
        at org.elasticsearch.xpack.core.ssl.SSLService.<init>(SSLService.java:156) ~[?:?]
        at org.elasticsearch.xpack.core.XPackPlugin.createSSLService(XPackPlugin.java:471) ~[?:?]
        at org.elasticsearch.xpack.core.XPackPlugin.createComponents(XPackPlugin.java:312) ~[?:?]
        at org.elasticsearch.node.Node.lambda$new$16(Node.java:663) ~[elasticsearch-8.0.1.jar:8.0.1]
        at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) ~[?:?]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
        at org.elasticsearch.node.Node.<init>(Node.java:677) ~[elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.node.Node.<init>(Node.java:277) ~[elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:234) ~[elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234) ~[elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:358) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) [elasticsearch-8.0.1.jar:8.0.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) [elasticsearch-cli-8.0.1.jar:8.0.1]
        at org.elasticsearch.cli.Command.main(Command.java:77) [elasticsearch-cli-8.0.1.jar:8.0.1]


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