Elasticsearch run error

Hi,

i tried install and run Elasticsearch but service is still failed.
I try to run this on Ubuntu 20.04 LTS from apk, dpkg and archive.

i found Elasticsearch: Job for elasticsearch.service failed - Stack Overflow but all this sugestion still not give the chance to run service

● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Wed 2022-04-13 18:52:39 CEST; 11s ago
       Docs: https://www.elastic.co
    Process: 5940 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=killed, signal=>
   Main PID: 5940 (code=killed, signal=KILL)

Apr 13 18:52:31 ubuntu systemd[1]: Starting Elasticsearch...
Apr 13 18:52:39 ubuntu systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL
Apr 13 18:52:39 ubuntu systemd[1]: elasticsearch.service: Failed with result 'signal'.
Apr 13 18:52:39 ubuntu systemd[1]: Failed to start Elasticsearch.
Apr 13 18:52:39 ubuntu kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.>
Apr 13 18:52:39 ubuntu kernel: Out of memory: Killed process 5940 (java) total-vm:2979024kB, anon-rss:617468kB, file-rss:0kB, shmem-rss:0>
Apr 13 18:52:39 ubuntu kernel: oom_reaper: reaped process 5940 (java), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Apr 13 18:52:39 ubuntu systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL

i dont have any idea about this. can someone help with this?

What is the RAM GB on the VM?

What version of Elasticsearch?

Looks like you are out of memory, that's what they are says.

on first moment 1GB, now i changed to 4GB but still that same

I made change as wrote

As a JVM application, the Elasticsearch main server process only utilizes memory devoted to the JVM. The required memory may depend on the JVM used (32- or 64-bit). The memory used by JVM usually consists of:

  • heap space (configured via -Xms and -Xmx )
  • metaspace (limited by the amount of available native memory)
  • internal JVM (usually tens of Mb)
  • OS-dependent memory features like memory-mapped files .

Elasticsearch mostly depends on the heap memory , and this setting manually by passing the -Xms and -Xmx (heap space) option to the JVM running the Elasticsearch server.

but this not helped

this VM is only for testing environment not for big project, can I run ES on this machine?

What version of Elasticsearch are you running?

Did you set / change the heap space (configured via -Xms and -Xmx )?

What else other apps is running on this VM?

Yes, you should be available to run Elasticsearch on a 4GB But it depends on what else is running. Are you running kabana and logstash and everything else on this VM?

ES 8.1.2

I changed the heap space (configured via -Xms and -Xmx ) with few different configuration - didn't work

depends on what else is running - i have Nifi on this VM and instaled Kibana

but if I install on different machine not help me, becouse everyting is running on phisical machine with 8GB :frowning:

Yes you should be able to run on 4GB Machine but normal Elasticsearch is very greedy for RAM. it will try to take 50% of the RAM for heap.

Try this...

Shutdown Elasticsearch, Kibana and Nifi.

Set jvm.options

-Xms1g
-Xmx1g

Then start Elasticsearch and see if you get the same error.

I reinstaled all services, changed alocation of RAM.
when i first run this machine everithing was fine. when i run NiFi, ES changed status to failed

i think the conflict is with NiFi

but now i can't restart ES

[2022-04-14T21:49:33,191][INFO ][o.e.n.Node               ] [ubuntu] stopping ...
[2022-04-14T21:49:33,260][INFO ][o.e.x.w.WatcherService   ] [ubuntu] stopping watch service, reason [shutdown initiated]
[2022-04-14T21:49:33,269][INFO ][o.e.x.w.WatcherLifeCycleService] [ubuntu] watcher has stopped and shutdown
[2022-04-14T21:49:33,322][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [ubuntu] [controller/3614] [Main.cc@176] ML controller exiting
[2022-04-14T21:49:33,348][INFO ][o.e.x.m.p.NativeController] [ubuntu] Native controller process has stopped - no new native processes can be started
[2022-04-14T21:49:42,201][INFO ][o.e.l.LicenseService     ] [ubuntu] license [3742f98b-918c-407c-acb8-5cbfe3caa5a0] mode [basic] - valid
[2022-04-14T21:49:42,227][INFO ][o.e.x.s.a.Realms         ] [ubuntu] license mode is [basic], currently licensed security realms are [reserved/reserved,file/default_file,native/default_native]
[2022-04-14T21:49:42,414][INFO ][o.e.g.GatewayService     ] [ubuntu] recovered [9] indices into cluster_state
[2022-04-14T21:49:43,325][INFO ][o.e.n.Node               ] [ubuntu] stopped
[2022-04-14T21:49:43,333][INFO ][o.e.n.Node               ] [ubuntu] closing ...
[2022-04-14T21:49:43,572][INFO ][o.e.n.Node               ] [ubuntu] closed

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