[jboss-user] [Clustering/JBoss] - Re: 2 instances/machine; redhat init script
jaraco
do-not-reply at jboss.com
Mon Jun 16 17:29:32 EDT 2008
I ran into this problem also, but I'm only running one instance. I want to run it behind Apache, and I have other Tomcat instances running on the machine, so using the recommendation from http://wiki.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOneMachine, I set up my instance to run on an internal IP address. Unfortunately, as you encountered, the scripts don't handle status or stop when the instance IP is specified.
I fixed the issue with 'stop' by including the -s parameter to the Shutdown call.
In particular, I added two lines during the setup phase of jboss_init_redhat.sh:
#if JBOSS_HOST specified, use -b to bind jboss services to that address
JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b $JBOSS_HOST"}
#if JBOSS_HOST is specified, the stop command also requires a server parameter
JBOSS_STOP_SERVER=${JBOSS_HOST:+"-s $JBOSS_HOST"}
#define the classpath for the shutdown class
JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}
and then I included ${JBOSS_STOP_SERVER} in the JBOSS_CMD_STOP following --shutdown:
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown ${JBOSS_STOP_SERVER}"}
This works. Apparently, if the RMI port is never specified, it need not be included in the shutdown URI.
I suggest this be added to the released scripts, as it does not affect users who do not specify JBOSS_HOST and it only behaves better if the user does specify JBOSS_HOST.
Regards,
Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158514#4158514
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158514
More information about the jboss-user
mailing list