Job for elasticsearch.service failed because the control process exited with error code

I have newly installed the Elasticsearch-7.4.2-x86_64.rpm with rmp from the link

But when i start the service it gives the below error .
sudo systemctl start elasticsearch.service

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

In journalctl it giving the below error :slight_smile:

Aug 29 06:33:25 webs101rdns1.pcsservers.com systemd[1]: Starting Elasticsearch...
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: fatal error in thread [main], exiting
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:34)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.systemd.Libsystemd.(Libsystemd.java:33)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:126)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:137)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.node.Node.start(Node.java:868)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:317)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:402)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.cli.Command.main(Command.java:90)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd-entrypoint[2625]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd[1]: Failed to start Elasticsearch.
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd[1]: Unit elasticsearch.service entered failed state.
Aug 29 06:33:33 webs101rdns1.pcsservers.com systemd[1]: elasticsearch.service failed.

Welcome to our community! :smiley:

Please check the Elasticsearch logs for more information, you can use journalctl -u elasticsearch.service for that, or look at the log file in `/var/log/elasticsearch/.

Please also format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you :slight_smile:

Thank you for your response .

The issue was resolved and it was due to /tmp that was non exec .

I have make the /tmp exec and it start working.

2 Likes

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