Hi all
Seems like I've encountered a similar problem. I've tried to adapt the instructions to my environment but in the end there's never any reaction on port 80 or 8080.
Trying to start the daemon by hand results in the following line:
Code:
user@ubuntu904desktop:/opt/jboss$ sudo /etc/init.d/jboss start
JBOSS_CMD_START = cd /opt/jboss/bin; /opt/jboss/bin/run.sh -c default -b 0.0.0.0
I'm trying to install Jboss (and later on Jboss Seam) in a virtual machine running a current Ubuntu 9.04 with the java-6-sun-1.6.0.16 installed from the repository.
The archive has been unpacked to /opt and given a symbolic link for easier maintenance.
Code:
user@ubuntu904desktop:/opt$ ls -lach
total 16K
drwxr-xr-x 4 user user 4.0K 2009-09-27 03:50 .
drwxr-xr-x 21 root root 4.0K 2009-09-27 04:14 ..
lrwxrwxrwx 1 root root 14 2009-09-27 03:48 jboss -> jboss-5.1.0.GA
drwxr-xr-x 9 jboss jboss 4.0K 2009-09-27 05:50 jboss-5.1.0.GA
lrwxrwxrwx 1 root root 19 2009-09-27 03:48 jboss-seam -> jboss-seam-2.2.0.GA
drwxr-xr-x 11 jboss jboss 4.0K 2009-09-27 05:09 jboss-seam-2.2.0.GA
My only changes to the start script are the following lines:
Code:
JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss"}
JBOSS_USER=${JBOSS_USER:-"jboss"}
JAVAPTH=${JAVAPTH:-"/usr/bin"}
JBOSS_BIND_ADDR=${JBOSS_HOST:-"-b 0.0.0.0"}
Here's an excerpt from the current /etc/init.d/jboss file:
Code:
#define where jboss is - this is the directory containing directories log, bin, conf etc
JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss"}
#define the user under which jboss will run, or use 'RUNASIS' to run as the current user
JBOSS_USER=${JBOSS_USER:-"jboss"}
#make sure java is in your path
JAVAPTH=${JAVAPTH:-"/usr/bin"}
#configuration to use, usually one of 'minimal', 'default', 'all'
JBOSS_CONF=${JBOSS_CONF:-"default"}
#if JBOSS_HOST specified, use -b to bind jboss services to that address
JBOSS_BIND_ADDR=${JBOSS_HOST:-"-b 0.0.0.0"}
#define the classpath for the shutdown class
JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}
#define the script to use to start jboss
JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF $JBOSS_BIND_ADDR"}
if [ "$JBOSS_USER" = "RUNASIS" ]; then
SUBIT=""
else
SUBIT="su - $JBOSS_USER -c "
fi
if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then
# ensure the file exists
touch $JBOSS_CONSOLE
if [ ! -z "$SUBIT" ]; then
chown $JBOSS_USER $JBOSS_CONSOLE
fi
fi
if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then
echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"
echo "WARNING: ignoring it and using /dev/null"
JBOSS_CONSOLE="/dev/null"
fi
#define what will be done with the console log
#JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
JBOSS_CONSOLE=${JBOSS_CONSOLE:-"$JBOSS_HOME/log/console.log"}
JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JAVAPTH/java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}
if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then
export PATH=$PATH:$JAVAPTH
fi
if [ ! -d "$JBOSS_HOME" ]; then
echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
exit 1
fi
echo JBOSS_CMD_START = $JBOSS_CMD_START
case "$1" in
start)
cd $JBOSS_HOME/bin
if [ -z "$SUBIT" ]; then
eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
else
$SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
fi
;;
stop)
if [ -z "$SUBIT" ]; then
$JBOSS_CMD_STOP
else
$SUBIT "$JBOSS_CMD_STOP"
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 (start|stop|restart|help)"
esac
As you can imagine, any help in the right direction would be greatly appreciated.
Thanks in advance for your opinion.
-----------------------------------------------------------------------------
Addendum:
Managed to find the source of one of my problems but there's still a catch.
Out of curiosity I started it directly using the run.sh file and found out that some of the Java during the init was complaining about a port being in use.
A quick Google search turned up the following result: http://www.lamscommunity.org/dotlrn/...sage_id=508530
And the 5th entry in that thread contains the solution:
If you are using linux, see if another instance is running (ps -ef|grep java). If it is JBoss, stop it by running /path-to-jboss/bin/shutdown.sh -S Once you are sure that Jboss or tomcat is running, then restart JBoss and you start up properly.
Thanks,
Ernie
A quick lookup using ps -ef|grep java showed that VMware Server 2 (the one with that annoying web interface) and Apache were still running.
Told them to annoy someone else (read: stopped the services using sudo /etc.init.d/vmware stop and so on) and JBoss didn't complain anymore (or so I thought).
Starting it using the run.sh works just fine (JBoss AS page shows up on localhost:8080) but using the modified Red Hat script only results in some serious CPU load without any reply from port 8080.
-----------------------------------------------------------------------------
Addendum 2:
I'm not sure why but after making the following change the init script starts up the server and I get a sign of life from port 8080:
Code:
#define what will be done with the console log
#JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
JBOSS_CONSOLE=${JBOSS_CONSOLE:-"$JBOSS_HOME/log/console.log"}
I've also attached an example of the log output since there are still errors but at least it seems to react again.
Bookmarks