Tiny issues with the .deb package on Ubuntu 12.04 LTS

II would have to say , based on my look at the start up script, and tests,
that it does NOT use $JAVA_HOME that bash users see. You can look at the
code yourself. Please point out to me which line in the installed
/etc/init.d/elasticsearch bash script grabs $JAVA_HOME. Now, I KNOW that I
have it set, because I checked continously while trying to fix this
problem. Tomcat actually has the EXACT same problem (at least, the latest
tomcat7). Originally, I fixed it by going to /etc/default/tomcat7 and put a
duplicate of $JAVA_HOME value as I currenlty had in .bashrc file. I did the
same thing to /etc/default/easticsearch.

But I found and easier way. It might even set $JAVA_HOME setting in one
place as one would hope, but I'll have to check when I next reboot.
Put 'JAVA_HOME="/your/java/home" into /etc/environment. (You CANNOT use
variable expansion, i.e. JAVA_HOME="$SOME_OTHER_JAVA_HOME". Only a new
value ) Apparently, according to this http://askubuntu.com/a/150815/21268,
it work for all the services that get launched at any time after boot..
All the other places to set it only apply if an app is launched in a bash
shell.

HOW exactly in the startup script elasticsearch and tomcat7 are getting the
value of JAVA_HOME, I have no idea. It might be one of the sourced fiiles
early in the script. But even if it IS getting the value that way, I don't
see a test for JAVA_HOME that would make it skip testing all the locations
it tests.

On Tuesday, September 18, 2012 2:58:52 AM UTC-7, kimchy wrote:

Its actually using $JAVA_HOME by default in the bin/elasticsearch script.
The deb init.d script tries to find it automatically, based on a list of
common locations, and if its not found, it will use the regular $JAVA_HOME
one.

On Sep 16, 2012, at 5:42 PM, gearond <gea...@sbcglobal.net <javascript:>>
wrote:

I found the same problem using 19.7 ES on Ubuntu 10.10 ( I take my time
updating, and I don't like the Unity desktop )

Why is ES not just using $JAVA_HOME? Isn't that what it's for?

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Tiny-issues-with-the-deb-package-on-Ubuntu-12-04-LTS-tp3961419p4022755.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.