Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ElasticSearch on Raspberry Pi exited

I'm trying to run ElasticSearch on Raspbian on my Raspberry Pi 3. After simply running sudo apt install elasticsearch it installed A LOT of things, and then I tried sudo service elasticsearch status, which gives the following result:

$ sudo service elasticsearch status
● elasticsearch.service - LSB: Starts elasticsearch
   Loaded: loaded (/etc/init.d/elasticsearch)
   Active: active (exited) since Thu 2017-02-16 23:28:52 UTC; 1s ago
  Process: 6022 ExecStop=/etc/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)
  Process: 6063 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

I don't really get what this active (exited) means. I tried getting the ElasticSearch version, but that also failed:

$ curl -XGET 'http://localhost:9200'
curl: (7) Failed to connect to localhost port 9200: Connection refused

Does anybody know what is wrong and how I can proceed from here?

like image 640
kramer65 Avatar asked Feb 16 '17 23:02

kramer65


1 Answers

Ok, in the end I managed to get it running. I had to install java 8

sudo apt-get purge openjdk-7-jdk
sudo apt-get install openjdk-8-jdk

and set the memory maximum lower by opening /etc/elasticsearch/jvm.options and replacing

-Xms2G
-Xmx2G

with

-Xms256M
-Xmx256M

Restarting ES (sudo service elasticsearch start) solved it for me.

I hope this helps someone else as well. Regardless, I wish you a beautiful day!

like image 123
kramer65 Avatar answered Nov 03 '22 23:11

kramer65