Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Shutting down diff JBOSS IP aliases Instances on one Machine

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic