I was able to run two Carbon instances on the same machine simply by
changing these files. For non-ESB products, simply changing the ports in
these files works now. Thanks HasiniG for fixing this. In ESB, we need to
change the axis2.xml as well.
I think we can further improve this by providing users the ability to
override the HTTP/S ports in mgt-transports.xml or axis2.xml from carbon.xml
Ports configuration section.
The config in carbon.xml will look like this:
<!--
Ports used by this server
-->
<Ports>
*<!-- Transport ports -->*
* <Transports>*
* <HTTP>9763</HTTPS>*
* <HTTPS>9443</HTTPS>*
* <Transports>*
<!-- The JMX Ports -->
<JMX>
<!--The port RMI registry is exposed-->
<!--<RMIRegistryPort>9999</RMIRegistryPort>-->
<!--The port RMI server should be exposed-->
<!--<RMIServerPort>11111</RMIServerPort>-->
</JMX>
<!-- Embedded LDAP server specific ports -->
<EmbeddedLDAP>
<!-- Port which embedded LDAP server runs -->
<LDAPServerPort>10390</LDAPServerPort>
<!-- Port which KDC (Kerberos Key Distribution Center) server
runs -->
<KDCServerPort>8001</KDCServerPort>
</EmbeddedLDAP>
</Ports>
The mgt-transports.xml file port config will look like this:
<transport name="*http*"
class="org.wso2.carbon.server.transports.http.HttpTransport">
<!--
The Tomcat connector protocol to be used. Valid values are;
1. HTTP_11
2. HTTP_11_NIO
3. HTTP_11_APR
-->
<parameter name="protocol">HTTP_11_NIO</parameter>
<parameter name="port">*${Ports.Transports.HTTP}*</parameter>
<transport name="*https*"
class="org.wso2.carbon.server.transports.http.HttpTransport">
<!--
The Tomcat connector protocol to be used. Valid values are;
1. HTTPS_11
2. HTTPS_11_NIO
3. HTTPS_11_APR
-->
<parameter name="protocol">HTTPS_11_NIO</parameter>
<parameter name="port">*${Ports.Transports.HTTPS}*</parameter>
This way, we have a single place to override ports. Advanced users can still
change these files if they know what they are doing. HasiniG, will you be
able to find some cycles to fix this for mgt-transports.xml? Only one class
needs to be changed I think. Supun, can we have the same model for ESB?
Others who have defined ports elsewhere also need to fix their stuff.
Nuwan, I'm still seeing the commented out Apache HTTPD ports in the wrong
place in the carbon.xml file
--
*Afkham Azeez*
Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
*
*
*Member; Apache Software Foundation;
**http://www.apache.org/*<http://www.apache.org/>
*
email: **[email protected]* <[email protected]>* cell: +94 77 3320919
blog: **http://blog.afkham.org* <http://blog.afkham.org>*
twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev