./shutdown.sh -S -s X.X.X.200:1099
Thanks for the suggestion however I attempted that already 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
-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.
If you got a "Failed to authenticate" error, then you connected successfully to the server through the port. It looks like you locked down the jmx invoker, so you will have to also provide the userid and password on the command line:
./shutdown.sh -S -s XX.XX.XX.200:1099 -u userid -p password
Thanks it makes sense however I'm new to JBoss...is there a properties file that holds the default userid and passwords for the default server...kinda similar to tomcat? Thanks
What version of JBossAS are you using? Also, are you using JBossAS or JBossEAP? EAP is available only from the support site if you purchase a subscription.
Anyway, JBossAS does not have the jmx invoker locked down. If it is locked down, you or someone else must have locked it down. In that case I would not know the exact file (if any) to look at.
If you have JBossEAP, jmx invoker is locked down out-of-the-box, but there are no user ids set up out-of-the-box so there is no way to log in. The default configuration for JBossEAP uses the jmx-console-users.properties files in the server/xxx/conf/props directory to store the user id an password.
Thanks again...I'm using: jboss-eap-4.3
I looked there:
-bash-3.00$ cat jmx-console-users.properties
# A sample users.properties file for use with the UsersRolesLoginModule
-bash-3.00$ ./shutdown.sh -S -s X.X.X.200 -u admin -p admin
Exception in thread "main" java.lang.SecurityException: Failed to authenticate principal=admin, securityDomain=jmx-console
Look back at my post, this line:
If you have JBossEAP, jmx invoker is locked down out-of-the-box, but there are no user ids set up out-of-the-box so there is no way to log in.
You have verified this statement.
I did the following:
I disabling Authentication for JMX Invoker by commenting out the security interceptor passthrough:
Located the mbean section with the class org.jboss.jmx.connector.invoker.InvokerAdaptorService. In that section comment out the line that relates to authenticated users:
<!-- Uncomment to require authenticated users -->
<!-- Interceptor that deals with non-serializable results -->
Started back up the JBOSS default instance on a IP address aliases...gave it sometime to start up then did the following:
./shutdown.sh -S -s X.X.X.200
tailing the later I received a "shutdown complete" Halting VM.
So it seemed to work...Being new here to JBoss what if any are the ramifications? Is this the recommended way to go?
Um, why didn't you simply uncomment the "admin=admin" line in the properties file? And change the password, while you were at it. Or add another line with a different user/password?
Turning off the jmx invoker security means that anyone can run the shutdown command, or use jmx console to mess around with the app server. Not recommended in a production environment.
I"m going to use this in a dev env not production. Thanks for all your help!!!