Skip to content

Shutdown jboss

October 22, 2009
tags:

[Original : November 2007]

[rubik:/tmp/jboss-3.2.3/bin] % ./shutdown.sh -s jnp://myremotemachineOrIP:1099Shutdown message has been posted to the server.Server shutdown may take a while – check logfiles for completion

Stopping JBoss when running multiple JBoss instances using the Service Binding Manager

./shutdown.sh -s jnp://myserver:31099 -S

You will again use the lower-case -s flag but you will need to look in your bindings file to find the port of each Naming service.

<service-bindings>
<server name=”ports-default”> <
service-config name=”jboss:service=Naming” delegateClass=”org.jboss.services.binding.AttributeMappingDelegate” >
<delegate-config portName=”Port” hostName=”BindAddress”>
<attribute name=”RmiPort”>1098
</attribute> </delegate-config>
<binding port=”1099″ host=”${jboss.bind.address}”/>
</service-config>

UPDATE – 22-Oct-2009

-> Default behavior is to shutdown (S)
Other operations:
-S, –shutdown Shutdown the server
-e, –exit= Force the VM to exit with a status code
-H, --halt=
Force the VM to halt with a status code
And default port for shutdown used is jnp 1099. You can test this by experimenting with jnp port in jboss-service.xml

Another point is that usage of username , password for authentication for shutdown. (u,p)
If you have enabled the interceptor in jmx-invoker-service.xml file in deploy folder.

<!-- Uncomment to require authenticated users -->
                  <interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
                     securityDomain="java:/jaas/jmx-console"/>

Then it will refer to the security Domain jmx-console from the login-config.xml in the conf folder to check if user credentials.If user is not valid then it will throw the following Exception:

jboss-4.2.3.GA\bin>shutdown.bat -S
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)

In login-config.xml you can define your own login class that will check if the user has valid roles and credentials for doing the op.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: