Oelmounkad
Oelmounkad

Reputation: 113

Elasticsearch won't start in ubuntu 18.04.4 LTS

So i tried to start elasticsearch with this command:

systemctl start elasticsearch.service

and i got this error :

Job for elasticsearch.service failed because a fatal signal was delivered to the control process.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

this is "journalctl -xe" output :

mai 10 10:18:49 ouss kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/elasticsearch.service,task=java,pid=24534,uid=122
mai 10 10:18:49 ouss kernel: Out of memory: Killed process 24534 (java) total-vm:1564676kB, anon-rss:550924kB, file-rss:0kB, shmem-rss:0kB
mai 10 10:18:49 ouss kernel: oom_reaper: reaped process 24534 (java), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
mai 10 10:18:40 ouss systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL
mai 10 10:18:49 ouss /usr/lib/gdm3/gdm-x-session[1336]: (EE) client bug: timer event4 debounce: offset negative (-1094ms)
mai 10 10:18:49 ouss /usr/lib/gdm3/gdm-x-session[1336]: (EE) client bug: timer event4 debounce short: offset negative (-1249ms)
mai 10 10:18:49 ouss /usr/lib/gdm3/gdm-x-session[1336]: (II) event6  - VirtualBox mouse integration: SYN_DROPPED event - some input events have been lost.
mai 10 10:18:40 ouss systemd[1]: elasticsearch.service: Failed with result 'signal'.
mai 10 10:18:40 ouss systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit elasticsearch.service has failed.
-- 
-- The result is RESULT.

My java version :

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Upvotes: 2

Views: 9154

Answers (1)

Amit
Amit

Reputation: 32386

The issue was resolved by using the tarball installation by following the official https://www.elastic.co/guide/en/elasticsearch/reference/current/targz.html installation instructions.

Please make sure the user which you are using to run the elasticsearch process has write access to the filesystem where the elasticsearch process is writing. Please see the comments in the question section for more info and error related to this.

Please use https://askubuntu.com/questions/6723/change-folder-permissions-and-ownership for instructions on how to assign the ownership in ubuntu.

Upvotes: 2

Related Questions