-
1. Re: Loading Jboss as service on Linux 7.1
rgjawanda Mar 10, 2002 8:23 PM (in response to roadster)Do you have your environment set for the 'root' user?
ie:
JAVA_HOME most likely isn't set.
I would add a wraper around the run.sh
call it start_jboss.sh
Set JAVA_HOME
set all ENV's
Maybe something like this: Then enter run.sh
export CATALINA_HOME=/usr/local/JBoss-2.4.4_Tomcat-4.0.1/catalina
export TOMCAT_HOME=/usr/local/JBoss-2.4.4_Tomcat-4.0.1/catalina
export SERVLETAPI_HOME=/usr/local/JBoss-2.4.4_Tomcat-4.0.1/catalina/common/lib
export JBOSS_DIST=/usr/local/JBoss-2.4.4_Tomcat-4.0.1/jboss
PATH=$PATH:$HOME/bin:/usr/local/j2sdk1.4.0/bin:/usr/local/j2sdk1.4.0/bin:/usr/lo
cal/jakarta-ant-1.4.1/bin:/usr/local/jakarta-ant-1.4.1:/usr/local/zip
export JAVA_HOME=/usr/local/j2sdk1.4.0
export J2EE_HOME=/usr/local/j2sdkee1.3.1
export CLASSPATH=/usr/local/jakarta-ant-1.4.1/lib/ant.jar:/usr/local/jakarta-ant
-1.4.1/lib/crimson.jar:/usr/local/jakarta-ant-1.4.1/lib/jaxp.jar:/usr/local/jaka
rta-ant-1.4.1/lib/jakarta-ant-1.4.1-optional.jar:$JAVA_HOME/lib/tools.jar:$SERVL
ETAPI_HOME/servlet.jar
./run.sh -
2. Re: Loading Jboss as service on Linux 7.1
furick1 Apr 23, 2002 5:25 AM (in response to roadster)Init scripts run for /etc/init.d/ . In your classpath you reference a jar bia ../../ . That relative referencing implies that you are currently in $JBOSS_HOME not /etc/init.d . You have to fix the relative references in that file and elsewhere. I think the defaults config file has relative refrencing as well.
I had this same problem occur and can use the init script to start but stopping isn't working. Have to do kill -9 to stop it. There is something wrong with how the daemon is being started and it isn't releasing tty. -
3. Re: Loading Jboss as service on Linux 7.1
furick1 Apr 23, 2002 5:26 AM (in response to roadster)sorry I meant $JBOSS_HOME/bin
-
4. Re: Loading Jboss as service on Linux 7.1
jwkaltz Apr 24, 2002 6:51 AM (in response to roadster)> I had this same problem occur and can use the init
> script to start but stopping isn't working. Have to
> do kill -9 to stop it. There is something
> wrong with how the daemon is being started and it
> isn't releasing tty.
If you look at the bin/run.sh in JBoss 2.4.4 you will notice JBoss is not a daemon, but a Java program running in the foreground.
If you want to be able to stop it from another script, you should
1. run java in the background, i.e. add an ampersand to the end of the last line in run.sh
2. Save the PID jboss was started as. You can do this e.g. by adding this line after the "java ..." stuff:
echo $! > <some-path>/jboss.pid
where you replace <some-path> by some path where you can write to
3. Create a stop.sh script for jboss with this content :
PID_FILE=<some-path>/jboss.pid
kill `cat $PID_FILE`
rm -rf $PID_FILE
4. Call this script from your /etc/init.d shutdown stuff.
(if you ask me, the jboss distribution should already have all that stuff)
Note:
You should never do a "kill -9" on your web services !! You won't get a clean shutdown, maybe resources such as db connections won't be released, and so on !! -
5. Re: Loading Jboss as service on Linux 7.1
skrabler Aug 2, 2002 3:37 PM (in response to roadster)The last post is simlar to what I did. Here's the files.
-
6. Re: Loading Jboss as service on Linux 7.1
mathpets Sep 24, 2002 7:38 AM (in response to roadster)I have a very stupid question but I really need someone's help.
I have put the jbossstart script in the /etc/init.d directory. I have changed the script to run run_with_catalina.sh instead. I have also created a soft link in the file /etc/r3.d/S99jboss to /etc/init.d/jboss.
When I run the script by typing at the promot '/etc/init.d/jboss start', it starts up fine. However, I still cannot start JBoss when the Linux starts.
Am I missing some steps? Any help will be deeply appreciated. Thank you so much!