There may be a requirement to install multiple ESB instances on same server / computer. specially when you do the debug. this article is describe how you can achieve this.
as we discussed in other article wso2 ESB and all other products run on top of the carbon platform. therefore you can follow this instruction to multiple ESB as well as to use other product (such as API manger , G-Reg etc) with ESB on same computer. when you start multiple WSO2 product on same server this configuration required to do as other wise there can be port conflicts and second product may fail to start.
as we disucssed on above article all configurations which are related to carbon platform should be done in carbon.xml
to demonstrate this i am using two copy of wso2 esb 4.9.0 version.
there are two directories call esb1 and esb2. here i am going to remain esb1 configuration un changed.
move to esb2 directory and extract the zip file.
cd esb2 unzip wso2esb-4.9.0.zip
now navigate to conf directory of extracted ESB
cd wso2esb-4.9.0/repository/conf/ ls -la
now open carbon.xml in your favourite text editor. keep mind this should be a plain text editor. vi or vim in linux/unix or mac. notepad or notepad++ on windows.
navigate to offset attribute
<!-- Ports offset. This entry will set the value of the ports defined below to the define value + Offset. e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445 --> <Offset>0</Offset>
change this as
<!-- Ports offset. This entry will set the value of the ports defined below to the define value + Offset. e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445 --> <Offset>1</Offset>
Thats it !!!! this will offset all ports such as management console , http and https transport each and every port offset by one. if you need other instance to run you can make this offset 2 of that instance.
now go back to esb1 directory and start the ESB
and go to esb2 directory and start second esb
you can see port offset my one. now you can access both management console using above given ip address (or localhost) and port.