aspose file tools*
The moose likes JBoss/WildFly and the fly likes Shutting down diff JBOSS IP aliases Instances on one Machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Shutting down diff JBOSS IP aliases Instances on one Machine" Watch "Shutting down diff JBOSS IP aliases Instances on one Machine" New topic
Author

Shutting down diff JBOSS IP aliases Instances on one Machine

Diego Bowen
Ranch Hand

Joined: Aug 19, 2003
Posts: 50
I have multiple instances of JBoss running on a single machine via IP aliases. For a background on this please refer to:

http://wiki.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOneMachine

Although not mentioned as one of the possible solutions in the above article, using IP aliases seemed to work. The problem is how do I stop a certain JBOSS instance? For example I have three IP aliases:
X.X.X.200, X.X.X.201 and X.X.X.202
each running a running a different server configuration on the same machine.

$JBOSS_HOME/bin/run.sh -c server1 -b X.X.X.200
$JBOSS_HOME/bin/run.sh -c server1 -b X.X.X.201
$JBOSS_HOME/bin/run.sh -c server1 -b X.X.X.201

All three are running per a "ps -ef | grep jboss". On the JBoss site there is info for shutting down different instances if the different instances are using different ports with the "shutdown" command however I couldnt find anything for my situation. In addition to that, the shutdown commands options seem not to support any references to a particular IP address. Please help. Thanks
Diego Bowen
Ranch Hand

Joined: Aug 19, 2003
Posts: 50
I might add that I did try doing a ./shutdown.sh -S -s X.X.X.200:1099

with the following results:

-bash-3.00$ ./shutdown.sh -S -s XX.XX.XX.200:1099
Exception in thread "main" java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:97)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)


-bash-3.00$ ps -ef | grep jboss

webadmin 28793 28768 0 Jul16 ? 00:00:58 /usr/local/java/bin/java -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/usr/local/jboss/jboss-as/lib/endorsed -classpath /usr/local/jboss/jboss-as/bin/run.jar:/usr/local/java/lib/tools.jar org.jboss.Main -c project1 -b X.X.XX.200

Where "project1" is just a copy of $JBOSS_HOME/server/default.

Thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

I know that we got this solved in another forum, but for those ranch hands who are looking for the answer to this particular question, here goes.

Diego is running JBossEAP 4.3. This version is available only from the JBoss support site. EAP has the jmx invoker locked down by default. To make it even more secure, there is no username/password defined. Thus you cannot shut the server down this way.

So the first step is to modify the server/xxx/conf/props/jmx-console-users.properties file to add one or more user/password entries. Then, after restarting the app server, you can stop it by running:

./shutdown.sh -S -s hostname:1099 -u user -p password


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Shutting down diff JBOSS IP aliases Instances on one Machine
 
Similar Threads
Need help to create a two instance of jboss server
Running JBoss-5.1.0.GA as a service on Red Hat?
How to get "jboss server binding address" from servlet
Jboss clustering
Configuring multiple users on 1 JBOSS servers