Elasticsearch service getting failed on Ubuntu 20.4

Elasticsearch can be IO intensive and requires that the storage provides the same durability guarantees as locally attached storage. There have been issues reported with different types of networked storage that do not offer sufficient guarantees, which can lead to stability issues and data loss.

Other applications running on this type of VM may not have nearly as strict requirements on the storage as Elasticsearch, so that they are running fine does not necessarily mean anything.

As it looks like you are having issues with the storage and do not have any insight into how it is set up there is little we can do to help. You may need to contact the provider for further details or try with a different provider.

Are we cent percent confident that this issue is only because of Storage and IO that the service is getting failed within 3 seconds?

If you could share the full log it would be easier to tell.

I would create a brand new VM and do a fresh install there and capture the logs.

it will be very helpful if i can let me know from where and how can i extract full logs.

That depends on how you install it.

Link for the logs:

That is not logs following a fresh install, is it?

It seems JNA is not available, which I assume could be a problem.

even after fresh install we have to install, uninstall and reinstall Elasticsearch 2-3 times. Not much help was available related to JNA.

There has been a lot of improvements in later releases, so I would recommend upgrading to at least the 7.17.x release. It might provide more information (I have not used 7.1 in years...).

brother the thing is that before this fresh installation we tried with latest version as well but 7.17 was not even able to kick off, but with this older version we are able to have it started but its crashing with in 3 seconds.

Please do a clean install of 7.17 and provide all the logs. Make sure no old data is left on the host.

we will carry the task and will revert accordingly.

Getting Stuck over here:

root@server:~# sudo systemctl start elasticsearch
Job for elasticsearch.service failed because the control process exited with error code.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
root@server:~# sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-10-31 17:39:55 PKT; 20s ago
       Docs: https://www.elastic.co
    Process: 12396 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
   Main PID: 12396 (code=exited, status=1/FAILURE)

Oct 31 17:39:28 server.xyz.com.pk systemd[1]: Starting Elasticsearch...
Oct 31 17:39:38 server.xyz.com.pk systemd-entrypoint[12396]: Failed to load native library:jansi-2.4.0-b5be9d296cd296bc-libjansi.so. The native libr>
Oct 31 17:39:38 server.xyz.com.pk systemd-entrypoint[12396]: java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-13969947046360078302/jansi-2.4.0-b5b>
Oct 31 17:39:54 server.xyz.com.pk systemd-entrypoint[12396]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/e>
Oct 31 17:39:55 server.xyz.com.pk systemd-entrypoint[12396]: ERROR: Elasticsearch exited unexpectedly
Oct 31 17:39:55 server.xyz.com.pk systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Oct 31 17:39:55 server.xyz.com.pk systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Oct 31 17:39:55 server.xyz.com.pk systemd[1]: Failed to start Elasticsearch.
lines 1-15/15 (END)

manually tried creating /run/elasticsearch/elasticsearch.pid and assigned the necessary permissions but the folder and file is getting deleted.

Link for the logs:

It seems the isue is still with loading the JNA library.

[2022-10-31T14:50:18,559][WARN ][o.e.c.f.FileSystemNatives] [server.xyz.com.pk] unable to load JNA native support library, FileSystemNatives methods will be disabled.
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native

This seems to be the same issue as seen on 7.0 so you may need to look into fixing this. Have not come across this myself so will not be able to help.

any help that can be offered from someone else please?

Have you googled the error?

I did and quickly found the following post (among many) that could be useful and offers suggestions:

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