Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details

Hi i am new here. I have been trying to install Elastic search on a second server without success. I cant figure out what is wrong
Error Message:

Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

journalctl -xe:

Jul 22 17:01:50  systemd-entrypoint[16904]: fatal error in thread [main], exiting
Jul 22 17:01:50  systemd-entrypoint[16904]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:23)
Jul 22 17:01:50  systemd-entrypoint[16904]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:22)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:115)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:126)
Jul 22 17:01:50  systemd-entrypoint[16904]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.node.Node.start(Node.java:955)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:311)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:406)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.cli.Command.main(Command.java:79)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
Jul 22 17:01:50  systemd-entrypoint[16904]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
Jul 22 17:01:50  systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 22 17:01:50  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.
Jul 22 17:01:50  systemd[1]: Unit elasticsearch.service entered failed state.
Jul 22 17:01:50  systemd[1]: elasticsearch.service failed.
Jul 22 17:01:50  polkitd[628]: Unregistered Authentication Agent for unix-process:16898:9481604 (system bus name :1.9420, object path /org/freedesktop/Polic

I solved the problem
changed in /etc/elasticsearch/jvm.options

#-Djava.io.tmpdir=${ES_TMPDIR}
-Djava.io.tmpdir=/var/log/elasticsearch

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