Could not find or load main class org.elasticsearch.tools.launchers.JavaVersionChecker

The message here is clear:

org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root

This is because you are executing the startup script as root. Let us not do that to avoid this problem.

Next, would you please move your Elasticsearch installation off of / and put it in /home/elastic/? If this still causes trouble, would you execute:

$ bash -x /home/elastic/elasticsearch-6.2.1/bin/elasticsearch

and we will start debugging from there.

1 Like