I am trying to execute following command to install the elasticsearch: sudo dpkg -i elasticsearch-6.5.4.deb
BUT IT SHOWS AN ERROR!!!
It says that I have no java installed or even have no JAVA_HOME environment variable!
But I have installed a Java 11, and also have a JAVA_HOME set! Please see below:
So why is this happening??? What could be the reason of this STRANGE error???
I followed the instructions provided here Section: Download and install Debian package Manually.
JAVA_HOME is set for the user "harut" which you can see in my previous screenshots. So I am trying to install elasticsearch for the same user ("harut") where the java is installed.
I think that you need to set the JAVA_HOME variable for the root user since you are using sudo to install the package.
The install script tries to run the java application to install elasticsearch and it could not find java because it is running under root and don't have a JAVA_HOME variable set.
Set the variable for the root user or change to root and export the variable before you run dpkg.
I guess you read only last reply on this thread... If you would read the whole discussion you might notice that this issue is too Urgent, that there are other people already in this thread and I even don't have 2 - 3 days to wait as my company loses money I suggest to read this.
It is even strange when you see that there are some people that already replied to this thread with their suggestions that I am greatly appreciated. And that my replies on this thread are not to myself, but to others to inform them that the issue still exists.
I see that you are the moderator, so feel free then to remove this thread at all, as I have no wish to continue to find any support here...
When you install from package, Elasticsearch runs as the ‘elasticsearch’ user by default, so it is for this user Jave must be configured and accessible. Also make sure the user can access and run the installation.
This forum is manned by volunteers, out of which some work for Elastic and some do not. If you do require support with SLA, Elastic does offer that through commercial subscriptions.
It sounds like it's a fresh new installation as far as I understand this thread.
Could you explain why this is urgent?
I do appreciate a lot as well the support this community is providing. This is great and sane.
I just think that it's useless to ping again 1h later your last answer to get people look again at your message.
Some people are not in your time zone and might be sleeping. Some others are just having good time with friends and family, others are just on holidays...
That's why I'm asking you to be patient. If you need private support with SLA we do sell platinum support and I'll be happy to connect you with the sales team.
Hi/Parev Harut,
this is the exact same problem I had but on Windows 10. This seems to be a quite common issue as Google returns MANY similar search entries, not only on this forum but on many others as well.
I hope the ES team addresses this issue and updates the step-by-step guide.
The issue is caused by 3rd party libraries yet to be updated to e compatible with the latest Java.
Although the official ES page states that the pipeline works with the latest stable Java jdk, that is not true.
These are the steps I took which worked for me:
Installed jdk1.8.0_191
Made a script that creates a user env variable named JAVA_HOME and point it to the installed jdk folder (the top most level). Pay attention, the env variable needs to point at the whole folder, NOT the bin folder or java.exe.
The next line in my script was calling ES as normal.
I had to do step 2 since I didn't have admin rights on my corporate laptop, and user env variables are checked and set by an admin script, so every time I turned the laptop on the JAVA_HOME user env variable had to be set again. The script automated it.
That'S it! Things have been running smoothly since then.
Thanks for your response. Yes, I agree, the problem is on ES side definitely. Actually, I followed the steps written in their official documentation. There is even nothing mentioned (at least I couldn't found) related "elasticsearch" user that should be used while installing ES that is mentioned in one of the comments above written by @Christian_Dahlqvist.
And yes, the first idea I had was related to the latest Java version (jdk 11.0.1) that was installed on my machine and maybe ES has some issues related to it. So I tried to use JDK 1.8, but again the same error happened even for that version...
As a workaround, I deployed the docker image for ES to be able to continue my development process until this issue will be solved
Anyway, thank you, and thanks to everybody who tried to support me on this.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.