Ubuntu install - elasticsearch missing config files. Will exit after starting

I have a new Ubuntu system(16.08 Xenial LTS). I installed elastic search(apt-get install elasticsearch), but I am having issues.

It seems the Elastic search daemon starts, but then exists with 'active (exited)', and no longer listens on the port.

When I start it and check the status I see where it shows active but yet exited:

two@develop ...gitlab/echo-music-player/setup (master) 
% sudo /etc/init.d/elasticsearch status
* elasticsearch.service - LSB: Starts elasticsearch
   Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled)
   Active: active (exited) since Fri 2018-07-06 21:30:39 CDT; 28min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10966 ExecStop=/etc/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)
  Process: 11075 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

Jul 06 21:30:39 develop systemd[1]: Starting LSB: Starts elasticsearch...
Jul 06 21:30:39 develop systemd[1]: Started LSB: Starts elasticsearch.

I noticed in the /etc/elasticsearch directory I do not have all the config files:

root@develop:/etc/elasticsearch# lr
total 36K
drwxr-xr-x   2 root root 4.0K Jul  6 21:16 .
drwxr-xr-x 119 root root  12K Jul  6 21:16 ..
-rw-r--r--   1 root root  14K Oct 15  2015 elasticsearch.yml
-rw-r--r--   1 root root 2.1K Oct 15  2015 logging.yml
root@develop:/etc/elasticsearch# 

Here is the Java that is on my system:

root@develop:/etc/elasticsearch#  update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Nothing to configure.

Any ideas what is wrong? Why are most of the Java configs missing in the /etc/elasticsearch directory?

What config files are missing that you are expecting?

Have you looked at /var/log/elasticsearch?

There are no log files in /var/log/elasticsearch.

I have another cloud server with elasticsearch and here are the files it has:

root@instance-1:/etc/elasticsearch# lr
total 48K
drwxr-s---   2 root elasticsearch 4.0K Jun 26 19:21 .
drwxr-xr-x 117 root root           12K Jul  7 14:00 ..
-rw-r--r--   1 root elasticsearch   76 Jun 26 19:21 .elasticsearch.keystore.initial_md5sum
-rw-rw----   1 root elasticsearch  207 Jun 26 19:21 elasticsearch.keystore
-rw-rw----   1 root elasticsearch 2.9K Jun 11 18:44 elasticsearch.yml
-rw-rw----   1 root elasticsearch 2.9K Jun 24 16:27 jvm.options
-rw-rw----   1 root elasticsearch 6.3K Jun 11 18:44 log4j2.properties
-rw-rw----   1 root elasticsearch  473 Jun 11 18:44 role_mapping.yml
-rw-rw----   1 root elasticsearch  197 Jun 11 18:44 roles.yml
-rw-rw----   1 root elasticsearch    0 Jun 11 18:44 users
-rw-rw----   1 root elasticsearch    0 Jun 11 18:44 users_roles
root@instance-1:/etc/elasticsearch# 

One of the important files it is missing is the jvm.options file.

Any ideas what went wrong with the new installation?

We'd need to see the install output to comment on that.
Are you using our repos? Can you run a purge and then install again?

I used the guide here https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html, specifically sudo apt-get update && sudo apt-get install elasticsearch.

Sure, I went ahead and purged sudo apt-get --purge autoremove elasticsearch. Then I resintalled. The output is at http://dpaste.com/3SPH0XK

After the new install, same issue persists. Also, same output with sysVinit status. No logs and still missing the other config files.

    Preparing to unpack .../elasticsearch_1.7.3+dfsg-3_all.deb ...

It looks like it's installing a super old version, you may want to check your repos :slight_smile:

that was it, thanks!

1 Like

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