# Elastic Search 6.x Keeps Failing

**URL:** <https://discuss.elastic.co/t/elastic-search-6-x-keeps-failing/239920>\
**Category:** Elasticsearch\
**Created:** [July 5, 2020, 11:58am UTC](https://discuss.elastic.co/t/elastic-search-6-x-keeps-failing/239920 "2020-07-05T11:58:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedoctordarren](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@thedoctordarren](https://discuss.elastic.co/u/thedoctordarren)\
**Post date:** [July 5, 2020, 11:58am UTC](https://discuss.elastic.co/t/elastic-search-6-x-keeps-failing/239920/1 "2020-07-05T11:58:35Z")

</div>

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:

```auto
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**

```auto
# 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**

```auto
# Set network.host to 0.0.0.0

network.host: 0.0.0.0

```

**sudo nano /etc/environment**

```auto
# 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)

```auto
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**

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

```

**java -version**

```auto
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.

```auto
**●** 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'.**** ~**

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 5, 2020, 12:10pm UTC](https://discuss.elastic.co/t/elastic-search-6-x-keeps-failing/239920/2 "2020-07-05T12:10:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thedoctordarren](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@thedoctordarren](https://discuss.elastic.co/u/thedoctordarren)\
**Post date:** [July 5, 2020, 12:14pm UTC](https://discuss.elastic.co/t/elastic-search-6-x-keeps-failing/239920/3 "2020-07-05T12:14:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 2, 2020, 12:17pm UTC](https://discuss.elastic.co/t/elastic-search-6-x-keeps-failing/239920/4 "2020-08-02T12:17:38Z")

</div>

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