-
1. Re: 2 instances/machine; redhat init script
areplogle Apr 4, 2007 5:11 PM (in response to alpheratz-jb)If you've setup multiple instances per machine and you know your rmi port per instance (I use bindings.xml to specify this) then you can do shutdown.sh -s jnp://localhost:
ie. shutdown.sh -s jnp://localhost:1099 && shutdown.sh -s jnp://localhost:1199 etc
Hope this helps.
Andrew -
2. Re: 2 instances/machine; redhat init script
jaraco Jun 16, 2008 5:29 PM (in response to alpheratz-jb)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 -
3. Re: 2 instances/machine; redhat init script
brian.stansberry Jun 17, 2008 4:14 PM (in response to alpheratz-jb)Can you open a JIRA for this?