Switching wso2 carbon server to maintenance mode
When wso2 carbon server (WSO2 WSAS, ESB, Registry and BPS) is running in production environments, it may be required to perform some essential upgrades without shutting down the server.
[WSO2 Carbon is the base platform for all WSO2 Java products. wso2 carbon server refers to any of WSAS, ESB, Registry or BPS server]
WSO2 Carbon based products are equipped with JMX based monitoring and management facilities, through which you can switch to maintenance mode.
Step 1
In order to enable JMX management, you must uncomment the JMX port element in CARBON_HOME/conf/carbon.xml
<Ports> <!-- The JMX Port --> <JMX>9999</JMX> </Ports>
CARBON_HOME is the directory where you extracted wso2wsas-3.0, wso2esb-2.0, wso2-registry-2.0 or wso2-bps-1.0 binary distributions.
Step 2
Start your WSO2 carbon server (WSAS, ESB, Registry or BPS).
You will notice that the JMX service URL will be printed in the startup console as follows.
Step 3
You can use JConsole as the client for JMX monitoring and management. Start command prompt (or shell in linux), type Jconsole and hit enter. JConsole:Connect to Agent window will be popped up.
Enter JMX url (service:jmx:rmi:///jndi/rmi://YourHost:9999/server)
Enter admin as user name and password. Note that, any user with admin privileges can log in to JMX.
Click on Connect.
Select MBeans-->org.wso2.carbon-->ServerAdmin-->Operations
You will see the following server admin operations.
Step 4
Suppose you have a web service which is in the process of responding to a client. Now, you may want to do some upgrades in the server without shutting it down.
Click on startMaintenance() button in the jconsole.
Now server is being running on maintenance mode. It does not accepts service requests in this mode. Your client application may get "org.apache.axis2.AxisFault: Connection refused" error.
After server upgrade is done, click on endMaintenance() button. Server will be switching back to normal mode. You will notice that the message transmission of your client will be resumed.
[WSO2 Carbon is the base platform for all WSO2 Java products. wso2 carbon server refers to any of WSAS, ESB, Registry or BPS server]
WSO2 Carbon based products are equipped with JMX based monitoring and management facilities, through which you can switch to maintenance mode.
Step 1
In order to enable JMX management, you must uncomment the JMX port element in CARBON_HOME/conf/carbon.xml
<Ports> <!-- The JMX Port --> <JMX>9999</JMX> </Ports>
CARBON_HOME is the directory where you extracted wso2wsas-3.0, wso2esb-2.0, wso2-registry-2.0 or wso2-bps-1.0 binary distributions.
Step 2
Start your WSO2 carbon server (WSAS, ESB, Registry or BPS).
You will notice that the JMX service URL will be printed in the startup console as follows.
Step 3
You can use JConsole as the client for JMX monitoring and management. Start command prompt (or shell in linux), type Jconsole and hit enter. JConsole:Connect to Agent window will be popped up.
Enter JMX url (service:jmx:rmi:///jndi/rmi://YourHost:9999/server)
Enter admin as user name and password. Note that, any user with admin privileges can log in to JMX.
Click on Connect.
Select MBeans-->org.wso2.carbon-->ServerAdmin-->Operations
You will see the following server admin operations.
Step 4
Suppose you have a web service which is in the process of responding to a client. Now, you may want to do some upgrades in the server without shutting it down.
Click on startMaintenance() button in the jconsole.
Now server is being running on maintenance mode. It does not accepts service requests in this mode. Your client application may get "org.apache.axis2.AxisFault: Connection refused" error.
After server upgrade is done, click on endMaintenance() button. Server will be switching back to normal mode. You will notice that the message transmission of your client will be resumed.
Comments