The root cause of this problem is: ElasticSearch is not allowed to run from the root owner. There is another possibility for this problem: "The Java path is set for the root user, not only for all other users." The solution to this problem:
Step 1: Change the ownership of the elasticSearch directory from root to another user at the command. $ sudo chown -R current_User: Group_Name elasticsearch-5.5.0
Setp 2: Check Java installed in the classpath for the current user [not just root]. If the command: $ java -version or echo $ The JAVA_HOME command gives an empty result. This means that we must install Java in the classpath [system env varible] for the current user, and then perform step 3. otherwise, start the elasticsearch service.
Step 3: edit / etc / profile and add two lines according to your system. export JAVA_HOME = "Location of Java dir"
export PATH = $ JAVA_HOME / bin: $ PATH Running $ source source / etc / profile
After that, the flexibleSearch service starts. It worked great for me.
source share