Do you have your environment set for the 'root' user?
JAVA_HOME most likely isn't set.
I would add a wraper around the run.sh
call it start_jboss.sh
set all ENV's
Maybe something like this: Then enter run.sh
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.
sorry I meant $JBOSS_HOME/bin
> 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 :
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)
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 !!
The last post is simlar to what I did. Here's the files.
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!