Elasticsearch crashes before it starts

I'm trying to install Elasticsearch 6.5 on my DreamHost VPS running Ubuntu 14.04 (the "old" version of Elasticsearch is because I'm interested in installing a MediaWiki extension that requires it).

I downloaded and extracted the Elasticsearch 6.5 tarball, which according to the JVM support matrix, requires OpenJDK 11. My VPS was running an old Java version, so I downloaded OpenJDK 11 and set the following to both my .bash_profile and .bashrc:

export JDK_HOME=/path/to/jdk
export JAVA_HOME=/path/to/jdk
export PATH=/path/to/jdk/bin:$PATH

Now when I run java -version from my SSH console, I get version 11. So far so good. But when I run ./bin/elasticsearch as per the install instructions, I get the following two lines and then my console crashes:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1

I can find no logs anywhere or any clue as to why it crashes. I suspect that maybe Elasticsearch is trying to write files somewhere my VPS is forbidding, because before I figured out what versions I needed, I tried installing Elasticsearch 7 (which comes bundled with OpenJDK and is not supported on Ubuntu 14.04) and got the same warnings and crash.

Anyone has a clue on what may be going on or how to find out?? Any help is appreciated, thanks!

1 Like

Please share the entire command you are running and its output, including things like your shell prompt :slight_smile:

Thanks for the quick answer. I have shared both the command I'm running:

./bin/elasticsearch

And the output before the crash:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1

I'm afraid there isn't anything else. I've been looking for logs inside and outside the elasticsearch directory, but haven't find any.

Hi, did you checked this?


It's almost the same issue.
It seems that you're facing (possibly) read permissions. Can you modify your elastic config file to point data path to some path where the file permissions are right to your elastic user/daemon?

Hi, thanks for the help! I tried setting:

path.data: /path/to/elasticsearch/data
path.logs: /path/to/elasticsearch/logs

in config/elasticsearch.yml (with /path/to being my real path, of course) and then reboot the server and run:

./bin/elasticsearch

but I get the same old error with no output or logs. :frowning: I tried setting the directory permissions to 777 with:

chmod 777 -R /path/to/elastichsearch

but no luck, same result. How can I know my elastic user/daemon?

The issue you linked seems similar from the title, but in their case at least they got some output to work with. In my case, Elasticsearch (and my console) crashes before it even prints "Initializing..." !

Is there some "hidden" verbose or debug mode for Elasticsearch?

Once again, thanks.

Hi!
Can you paste the "ls -l" output from your data & logs paths?
That in order to check the ownership of directories.
Also, according the command "./bin/elasticsearch" I'm assuming you're using a tarball distribution. It's that correct?
In my particular case, I'm using that distribution, and I've created an exclusive unix user form elastic stack, so, I've granted explicit privileges for that user, because it's the one running the processes.

1 Like

Hola Gastón, thanks for your continued help!

Yes, I'm using the tarball distribution.

The output of ls -l for my data and logs paths is:

drwxrwxrwx  2 wikimix pg9073652     10 May  9 11:22 data
drwxrwxrwx  2 wikimix pg9073652     27 May  9 11:34 logs

I've done some more reading but I found no (updated) documentation on how to know what user is running my Elasticsearch processes, or how to set it. Do you know?

Thanks again,

1 Like

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