Elastic Search 6.x Keeps Failing

Hiya

(New on forums like this so bare with me lol)

Anyways Just wondered if someone can help me, I've installed Elasticsearch 6.8.9 through the DEB package and have installed the Elasticsearch head through GitHub. I've done the following after doing research but for some reason ElasticSearch exits after it starts so it's not running properly. It was running fine on ElasticSearch 2.4 but since the head requires 5.x through GitHub, I've been struggling really bad to get it working. I tried to install it through

sudo apt-get install elasticsearch

And these apt-get install scripts as well:

sudo apt-get install openjdk-8-jdk openjdk-8-jre-headless

but wasn't working properly either. Any advice would be appreciated. Many thanks:

/etc/elasticsearch/jvm.options

# Reduce RAM heap size to 128MB (was 1GB)

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms128m
-Xmx128m

/etc/elasticsearch/elasticsearch.yml

# Set network.host to 0.0.0.0

network.host: 0.0.0.0

sudo nano /etc/environment

# Set JAVA_HOME to target Java8 instead of Java11
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-armhf/bin/java"

sudo update-alternatives --config java
(Selected option 2, pressed enter and no problem there)

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-armhf/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-armhf/bin/java      1111      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 2

source /etc/environment
echo $JAVA_HOME

/usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java

java -version

openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01)
OpenJDK Client VM (build 25.212-b01, mixed mode)

I've even done this command through the /usr/share/elasticsearch folder
wget -qO - https://artifacts.elastic.co/GPG-KEY- **elasticsearch** | sudo apt-key add -

But this is the ultimate result that I keep getting. I tried to look through the logs for any specific errors but can't filter it. Running a Raspberry Pi 3.

**●** elasticsearch.service - ElasticsearchLoaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
Active: **failed** (Result: exit-code) since Sat 2020-07-04 15:48:04 BST; 20h ago
Docs: http://www.elastic.co
Process: 1066 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet **(code=exited, status=1/FAILURE)**
Main PID: 1066 (code=exited, status=1/FAILURE)
Jul 04 15:47:03 raspberrypi systemd[1]: Started Elasticsearch.
Jul 04 15:47:03 raspberrypi elasticsearch[1066]: warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME
Jul 04 15:48:04 raspberrypi systemd[1]: **elasticsearch.service: Main process exited, code=exited, status=1/FAILURE**
Jul 04 15:48:04 raspberrypi systemd[1]: **elasticsearch.service: Failed with result 'exit-code'.****~**

I do not think I have ever seen Elasticsearch run with less than 256 MB or heap so am not surprised it is not starting.

Is that what it is do you think? Do you think I should run a dist-upgrade on my Raspberry Pi to see if this would make a difference? I don't think it will since I'm running Buster anyway or should I go back to ElasticSearch 2.4 as this was running perfectly fine?

I tried to edit the jvm.options file and have set 256MB to it instead and still not starting. If I set it any higher, the system will tell me that it hasn't got enough RAM allocation to Run ElasticSearch.

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