Port “Offset” on WSO2 Carbon

When working with WSO2 Carbon Platform products you should (and will) come across instances where you might need to start more than one product or an instance of the same product. If we take an example you try and start 2 instance of WSO2 ESB (Enterprise Service Bus). ESB can be downloaded from here. So unzip the distribution go to “[CARBON_HOME]/bin” and run ./wso2server.sh. The server will start running and will deploy its services and initial databases. so once that is done we will start the next ESB Server and you will should get this error.

WARN - PassThroughHttpSSLListener System may be unstable: HTTPS ListeningIOReactor encountered a checked exception : Address already in use
java.net.BindException: Address already in use

and

ERROR - JMXServerManager Could not create the RMI local registry
java.rmi.server.ExportException: Port already in use: 9999; nested exception is: 
java.net.BindException: Address already in use

and

ERROR – JMXServerManager Could not initialize RMI server java.rmi.server.ExportException: Port already in use: 11111; nested exception is: java.net.BindException: Address already in use

This is due to the servers both starting on default ports. So, to prevent this from happening we do the following;

  1. Go to WSO2 ESB server 2 (the server where you got this exceptions) and find “[CARBON_HOME]/repository/conf/carbon.xml”
  2. Find <Offset>0</Offset> where default will be set to “0”
  3. Change the value from 0 to 10 (or any number you would prefer)
  4. try restarting the server.

The server should start without any issue. The <Offset>0</Offset> parameter will shift all the default ports by the Offset value specified. If you set 10 as the Offset value all the default server ports will increment by 10.


4 Replies to “Port “Offset” on WSO2 Carbon”

  1. Michaelvah

    I’m really impressed together with your writing skills as neatly as with the layout to your
    blog. Is this a paid topic or did you customize it yourself?? Anyway stay up the excellent high quality writing, it is uncommon to look a great blog like this one today!.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.