CentOS 7 unable to start elastic search searcive

● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2021-07-15 10:57:58 UTC; 13min ago
     Docs: https://www.elastic.co
 Main PID: 14084 (code=exited, status=1/FAILURE)

Jul 15 10:57:57 13-228-192-54.cprapid.com systemd-entrypoint[14084]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
Jul 15 10:57:57 13-228-192-54.cprapid.com systemd-entrypoint[14084]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
Jul 15 10:57:57 13-228-192-54.cprapid.com systemd-entrypoint[14084]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
Jul 15 10:57:57 13-228-192-54.cprapid.com systemd-entrypoint[14084]: at org.elasticsearch.cli.Command.main(Command.java:79)
Jul 15 10:57:57 13-228-192-54.cprapid.com systemd-entrypoint[14084]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
Jul 15 10:57:57 13-228-192-54.cprapid.com systemd-entrypoint[14084]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
Jul 15 10:57:58 13-228-192-54.cprapid.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 15 10:57:58 13-228-192-54.cprapid.com systemd[1]: Failed to start Elasticsearch.
Jul 15 10:57:58 13-228-192-54.cprapid.com systemd[1]: Unit elasticsearch.service entered failed state.
Jul 15 10:57:58 13-228-192-54.cprapid.com systemd[1]: elasticsearch.service failed.

journalctl -xe

Jul 15 11:13:39 13-228-192-54.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.
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: fatal error in thread [main], exiting
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:23)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:22)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:115)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:126)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.node.Node.start(Node.java:955)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:311)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:406)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.cli.Command.main(Command.java:79)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd-entrypoint[15961]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
Jul 15 11:13:55 13-228-192-54.cprapid.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 15 11:13:55 13-228-192-54.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.

are there more logs you can share? Please do so.

Also, do you have a custom Java version installed? Which Elasticsearch version? Which Linux distribution is this? Please take your time to write a proper description instead of just pasting error messages.

Thank you!

@spinscale
thank you its working now it was my temp directory security setting. After assigning new temp Dir its working fine

1 Like

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