-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"$JAVA_HOME is not set" when running kiji-rest in init.d #5
Comments
Hi David, Thanks for your note. In the kiji-rest script, I borrwed a few lines from bigtop: attempt to find java (stolen from bigtop)if [ -z "$JAVA_HOME" ]; then if [ -z "$JAVA_HOME" ]; then Can you let me know which of those conditions isn't firing or if there are new conditions that I should be taking into account? I guess I could also check for bigtop and if all else fails use the borrowed stuff. Also you may want to compare the kiji-rest and kiji-rest.initd on master against what you have in case there have been some patches. I know I've fixed a few errors here and there. Thanks! |
Initially, what I noticed is that if I did The files of what I'm using (kiji-rest-1.4.0) look identical (at least in this case). Since Hadoop is a prerequisite for Kiji, it seems reasonable to use the bigtop stuff since it is already there. |
Sure but shouldn't this part still try and determine something? By chance are you running Java 7? I may update this check to look for Java 7 stuff instead of 6. While you're right that Hadoop is a pre-req for Kiji, the initial design of the deployment of KijiREST was that you need not deploy it on a box that has the hadoop binaries (hence why the package is the way it is). That being said, having the script at least run the bigtop stuff if it's present doesn't hurt so we'd be more than happy to accept a patch on that OR to save you some time, simply file a JIRA on http://jira.kiji.org and I'll put it in pretty quickly since I'm iterating on some other KijiREST changes now anyways. Thanks! |
I'd like to contribute a PR for this. Can I just fork this and submit here? Or is there something that needs to be done in JIRA? |
These instructions may be a bit dated but basically:
I'm asking for details on the rest of the flow since there used to be a contributor form but I don't recall the specifics. Do steps 1-3 and I'll follow up after that shortly! |
OK, cool. I'll do that, but I just put up #6 as a preview |
Sounds good thanks! Also can you look at my previous question regarding the detection of JAVA_HOME (I understand the situation when your vars are cleared but curious why the auto-detection via the existing mechanism doesn't work for you). |
for candidate in \
/usr/lib/jvm/java-6-sun \
/usr/lib/jvm/java-1.6.0-sun-1.6.0./jre/ \
/usr/lib/jvm/java-1.6.0-sun-1.6.0. \
/usr/lib/jvm/j2sdk1.6-oracle \
/usr/lib/jvm/j2sdk1.6-oracle/jre \
/usr/lib/j2sdk1.6-sun \
/usr/java/jdk1.6* \
/usr/java/jre1.6* \
/Library/Java/Home \
/usr/java/default \
/usr/lib/jvm/default-java \
/usr/lib/jvm/java-openjdk \
/usr/lib/jvm/jre-openjdk \
/usr/lib/jvm/java-1.6.0-openjdk-1.6.* \
/usr/lib/jvm/jre-1.6.0-openjdk* ; do
if [ -e "$candidate/bin/java" ]; then
export JAVA_HOME="${candidate}"
echo $JAVA_HOME
break
fi
done yields |
I'm trying to submit a review at https://review.kiji.org/r/new/ but I get an error when submitting the patch: "The file 'kiji-rest/src/main/scripts/kiji-rest.initd' (rd946a7f) could not be found in the repository" which seems weird (I created the patch from my forked git repo). :( |
Grumble :-( Given the nature of this patch, I can merge it in manually can you paste the diff in the comment? Sorry for the trouble! Also did you file a JIRA issue on jira.kiji.org? Lastly, I'm curious to reproduce, looks like you're using vagrant, is there a VagrantFile you can share with me so I can test this too? |
Sadly, I can't share the vagrantfile because it has company info in it. I put the patch here. I did file a bug in the jira. |
Thanks! This should go in shortly. Cheers On Thu, Aug 14, 2014 at 3:52 PM, David Weiser [email protected]
|
Good, thanks!:) |
I'm trying to run the kiji-rest.initd script, but I'm getting the above error.
I've got the
/opt/wibi
directory set up correctly:and the init.d file is in /etc/init.d:
vagrant@granary:/usr/local/kiji/kiji-rest-1.4.0$ ls /etc/init.d | grep kiji kiji-rest
But when I do
sudo service kiji-rest status
, I get "$JAVA_HOME is not set".To get around this, I added the following to
kiji-rest.initd
(at the beginning of the file):it seems that other Hadoop subsystems use this approach to setting
$JAVA_HOME,
but kiji-rest isn't.Have I made a gaff? Should I make a PR for this?
The text was updated successfully, but these errors were encountered: