1
votes

On fresh install Ubuntu 16.04 I use next steps to install ElasticSearch 5.0.1 or 5.0.2 and ES failed to start. Does anyone know how can I run ES 5.x on Ubuntu 16.04 or 14.04?

  1. su
  2. add-apt-repository ppa:webupd8team/java
  3. apt-get update
  4. apt-get upgrade
  5. apt-get install oracle-java8-installer
  6. java -version
  7. wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
  8. apt-get install apt-transport-https
  9. echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list

  10. apt-get update && sudo apt-get install elasticsearch

  11. service elasticsearch status

Elasticsearch 5.x failed to start on Ubuntu 16.04. Does anyone know how can I run ES 5.x on Ubuntu 16.04 or 14.04?

I also try with the new version of Elasticsearch 5.1.1 with this few steps

  1. su
  2. apt-get purge elasticsearch
  3. apt-get update
  4. apt-get upgrade
  5. apt-get install elasticsearch

-- new version elasticsearch 5.1.1 is installed

  1. now if I check status I get this

service elasticsearch status

● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)

Active: inactive (dead)

 Docs: http : / / www.elastic.co

Dec 09 22:49:49 elastic systemd[1]: Stopped Elasticsearch.

5
also having continuous problems: connections keeps falling with ES 5.1 on ubuntu 16.04. ES 2 < on ubuntu 14.04 was working very fine. thinking to downgrade.user305883
Thanks for the comment. The point is how to solve the problem presented here. I agree with you that the version 2.x & 1.x works fine on Ubuntu 14th & 16th.user1762634
Could you post a clearer and complete formatted output of status? Have you checked java does not failed for out of memory? check dmesg . If ES get killed (you will have signal as a "reason" in your ES status) , check how much heap is allocated. In 5.x. ES you can edit /etc/elasticsearch/jvm.option file an modify #-Xms2g #-Xmx2guser305883
I do not follow you (@user305883). This is what I get when I run free -m total used free shared buff/cache available Mem: 974 80 294 5 600 707 Swap: 1021 0 1021user1762634
I was sceptical and thought I would not be able to find the answer to this question but your (@user305883) advice turned out to be a good. Thanks for help. I changed /etc/elasticsearch/jvm.option -Xms2g and -Xmx2g to #-Xms2g and #-Xmx2g and after service elasticsearch start ES run well on Ubuntu 16.04. This was right answer. Thanks again.user1762634

5 Answers

1
votes

I was sceptical and thought I would not be able to find the answer to this question but your (@user305883) advice turned out to be a good. Thanks for help.

I changed /etc/elasticsearch/jvm.option -Xms2g and -Xmx2g to #-Xms2g and #-Xmx2g and on ubuntu terminal after I run this command

service elasticsearch start

ES start well on Ubuntu 16.04.

This was right answer. Thanks again to @user305883.

1
votes

For me, the solution that worked was to set Open JDK 8 as the default Java version. I was using java-9-oracle as the default version and despite uninstall/reinstall and altering the JVM options, ES 5.x couldn't be started. At the same time, ES 2.3 had no issues with Java 9.

You may change the default java version in Ubuntu by using sudo update-alternatives --config java command

1
votes

Have you tried uncommenting out START_DAEMON=true in /etc/default/elasticsearch?

0
votes

FWIW, I met the same issue after Ubuntu update. My Ubuntu Ubuntu 16.04.3 LTS, xenial

I had linux-image-extra-4.13.0-26.

After update I got linux-image-extra-4.13.0-31.

And for some reason that update is broken.

I reverted kernel to previous linux-image-extra-4.13.0-26 and Elastic started to work well again. Here is more about that https://discuss.elastic.co/t/elasticsearch-dead-recently-without-modify-anything/116839/2

I restarted Ubuntu.

During restart, clicked Esc. Entered Grub.

In Grub, selected Advanced options and selected previous kernel version.

-1
votes

I had the same issue on FreeBSD 10.x and 11.x - it helped the same solution - memory - the problem was that Elasticsearch 5.x did not provide any error message, no error log...