-
1. Re: Unable to stop Jboss
peterj Oct 8, 2010 11:48 AM (in response to proque_cu)You need to check the /etc/init.d/jboss script to see which version of Java you are using (does your script set JAVA_HOME, and to what?). I suspect that the script is now using a non-Sun JDK (some Linux updates will do things like that).
-
2. Re: Unable to stop Jboss
proque_cu Oct 8, 2010 11:57 AM (in response to peterj)Thanks for your comment:
/etc/init.d/jboss
#make sure java is in your path
JAVAPTH=${JAVAPTH:-"/usr/java/jdk1.6.0_18/bin"}And that's indeed the path. It was working well which is the weird part.
-
3. Re: Unable to stop Jboss
peterj Oct 8, 2010 1:13 PM (in response to proque_cu)Looking in jboss_init_*.sh I see this line:
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}
Looks like the JAVA_HOME and JAVAPTH are ignored, which means that you will get /usr/bin/java which is probably not the one you want. Whenever I see stuff like this in a script (and I see it wuite often) I always wonder what was going through the mind of the person who wrote it. (Sorry, this is a sore point with me.)
-
4. Re: Unable to stop Jboss
proque_cu Oct 8, 2010 1:24 PM (in response to peterj)Pardon for my ignorance but how can I work around this issue based on your statement
Any suggestions?
Thanks
-
5. Re: Unable to stop Jboss
peterj Oct 8, 2010 1:33 PM (in response to proque_cu)JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JAVAPTH/java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}
-
6. Re: Unable to stop Jboss
proque_cu Oct 8, 2010 2:02 PM (in response to peterj)This is what I'm getting.
[root@myserver java]# service jboss stop
JBOSS_CMD_START = cd /opt/jboss/bin; /opt/jboss/bin/run.sh -c default -b 0.0.0.0
-bash: /java: No such file or directoryI have Java under /usr/bin/latest "latest is a symbolic link" not sure if this information may be of much help
is the /java meaning that it's trying to search under "JAVAPTH=${JAVAPTH:-"/usr/java/jdk1.6.0_18/bin"} + java"?
Thanks,
-
7. Re: Unable to stop Jboss
peterj Oct 8, 2010 2:18 PM (in response to proque_cu)Yes. You should have JAVAPTH set to $JAVA_HOME/bin, so if JAVA_HOME=/usr/java/latest, then you should have JAVAPTH=/usr/java/latest/bin. Personally, I would add JAVA_HOME to /etc/init.d/jboss and use it to set JAVAPTH.
-
8. Re: Unable to stop Jboss
proque_cu Oct 8, 2010 2:22 PM (in response to peterj)from the jboss file:
#make sure java is in your path
JAVAPTH=${JAVAPTH:-"/usr/java/jdk1.6.0_18/bin"}JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JAVAPATH -classpath $JBOSSCP org.jboss.Shutdown --shutdown"} "suggested by you thanks "
[root@myserver bin]# service jboss stop
JBOSS_CMD_START = cd /opt/jboss/bin; /opt/jboss/bin/run.sh -c default -b 0.0.0.0
-bash: -classpath: command not found -
9. Re: Unable to stop Jboss
peterj Oct 8, 2010 5:40 PM (in response to proque_cu)>>suggested by you thanks
Not quite, you mistyped the line; go back and check what I posted.
-
10. Re: Unable to stop Jboss
proque_cu Oct 15, 2010 8:50 AM (in response to peterj)Hi Peter,
Sorry for the delay, was working on some other things as well "JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JAVAPTH/java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}" was the thing, thank you very much.
and my typo was JAVAPTH lol, with an A in pth, took me forever to find it.
Thanks again