Using a non-standard IP address and ports
Nuxeo 5 changes
The bind addresses and ports used by Nuxeo are found in the JBoss instance in the files server/default/deploy/nuxeo.ear/config/nuxeo.properties, server/default/deploy/nuxeo.ear/config/platform-config.xml and server/default/deploy/nuxeo.ear/datasources/core-events-ds.xml.
JBoss IP address
To bind JBoss to a different IP address than the default (which is to listen to all interfaces on Unix, by binding to 0.0.0.0), you have to start JBoss with an additional option: use the startup script with a -b 12.34.56.78 option and specify the proper IP to listen to. This has the effect of setting the jboss.bind.address property (adding a -Djboss.bind.address in JAVA_OPTS is not enough).
Note that defining this property is just a shortcut to facilitate configuration, it is referenced in the following configuration files which you can modify directly:
server/default/deploy/dynclassloader-service.xml server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml server/default/deploy/invokers-service.xml server/default/deploy/jbossweb-tomcat55.sar/server.xml server/default/deploy/jbossws.sar/META-INF/jboss-service.xml server/default/deploy/jms/uil2-service.xml server/default/deploy/naming.sar/META-INF/jboss-service.xml
JBoss port changes
The following patch to a JBoss instance is an example of what has to be changed to switch to ports 10000 higher than the standards. The files to modify are tied to EJB, RMI and Tomcat configuration:
--- server/default/deploy/dynclassloader-service.xml 2006-11-22 13:54:12.000000000 +0100
+++ server/default/deploy/dynclassloader-service.xml 2007-01-02 18:12:06.783484855 +0100
@@ -14,7 +14,7 @@
<mbean code="org.jboss.web.WebService"
name="jboss:service=WebService">
- <attribute name="Port">8083</attribute>
+ <attribute name="Port">18083</attribute>
<!-- Should resources and non-EJB classes be downloadable -->
<attribute name="DownloadServerClasses">false</attribute>
<attribute name="Host">${jboss.bind.address}</attribute>
--- server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml 2006-11-22 13:54:12.000000000 +0100
+++ server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml 2007-01-02 18:04:19.766342640 +0100
@@ -10,7 +10,7 @@
xmbean-dd="org/jboss/remoting/transport/Connector.xml"
name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
- <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
+ <attribute name="InvokerLocator">socket://${jboss.bind.address}:13873</attribute>
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
--- server/default/deploy/invokers-service.xml 2006-11-22 13:54:12.000000000 +0100
+++ server/default/deploy/invokers-service.xml 2007-01-02 18:05:35.894963549 +0100
@@ -6,7 +6,7 @@
<!-- RMI/JRMP invoker -->
<mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
name="jboss:service=invoker,type=jrmp">
- <attribute name="RMIObjectPort">4444</attribute>
+ <attribute name="RMIObjectPort">14444</attribute>
<attribute name="ServerAddress">${jboss.bind.address}</attribute>
<!--
<attribute name="RMIClientSocketFactory">custom</attribute>
@@ -30,7 +30,7 @@
<attribute name="ClientMaxPoolSize">300</attribute>
<attribute name="SocketTimeout">60000</attribute>
<attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
- <attribute name="ServerBindPort">4445</attribute>
+ <attribute name="ServerBindPort">14445</attribute>
<attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
<attribute name="ClientConnectPort">0</attribute>
<attribute name="ClientRetryCount">1</attribute>
--- server/default/deploy/jbossweb-tomcat55.sar/server.xml 2007-01-02 21:10:50.380557000 +0100
+++ server/default/deploy/jbossweb-tomcat55.sar/server.xml 2007-01-02 21:48:33.973637974 +0100
@@ -7,16 +7,16 @@
-->
<Service name="jboss.web" className="org.jboss.web.tomcat.tc5.StandardService">
- <!-- A HTTP/1.1 Connector on port 8080 -->
- <Connector maxSavePostSize="-1" port="8080" address="${jboss.bind.address}" maxThreads="250" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"/>
+ <!-- A HTTP/1.1 Connector on port 18080 -->
+ <Connector maxSavePostSize="-1" port="18080" address="${jboss.bind.address}" maxThreads="250" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" enableLookups="false" redirectPort="18443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"/>
<!-- Add this option to the connector to avoid problems with
.NET clients that don't implement HTTP/1.1 correctly
restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$"
-->
- <!-- A AJP 1.3 Connector on port 8009 -->
- <Connector port="8009" address="${jboss.bind.address}" emptySessionPath="true" enableLookups="false" redirectPort="8443" protocol="AJP/1.3"/>
+ <!-- A AJP 1.3 Connector on port 18009 -->
+ <Connector port="18009" address="${jboss.bind.address}" emptySessionPath="true" enableLookups="false" redirectPort="18443" protocol="AJP/1.3"/>
<!-- SSL/TLS Connector configuration using the admin devl guide keystore
<Connector port="8443" address="${jboss.bind.address}"
@@ -153,4 +153,4 @@
</Service>
-</Server>
\ No newline at end of file
+</Server>
--- server/default/deploy/jbossws.sar/META-INF/jboss-service.xml.orig 2007-04-16 14:02:20.000000000 +0200
+++ server/default/deploy/jbossws.sar/META-INF/jboss-service.xml 2007-04-16 14:09:37.000000000 +0200
@@ -20,8 +20,8 @@
If the content of <soap:address> is not a valid URL, JBoss will rewrite it using the attribute values given below.
-->
<attribute name="WebServiceHost">${jboss.bind.address}</attribute>
- <attribute name="WebServiceSecurePort">8443</attribute>
- <attribute name="WebServicePort">8080</attribute>
+ <attribute name="WebServiceSecurePort">18443</attribute>
+ <attribute name="WebServicePort">18080</attribute>
<attribute name="AlwaysModifySOAPAddress">true</attribute>
<attribute name="ServiceEndpointInvokerJSE">org.jboss.ws.server.ServiceEndpointInvokerJSE</attribute>
--- server/default/deploy/jms/uil2-service.xml 2006-11-22 13:54:12.000000000 +0100
+++ server/default/deploy/jms/uil2-service.xml 2007-01-02 18:13:37.875364645 +0100
@@ -19,7 +19,7 @@
<!-- The bind address -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<!-- The bind port -->
- <attribute name="ServerBindPort">8093</attribute>
+ <attribute name="ServerBindPort">18093</attribute>
<!-- The ping period in millis -->
<attribute name="PingPeriod">60000</attribute>
<!-- Whether tcp/ip does not wait for buffer fills -->
--- server/default/deploy/naming.sar/META-INF/jboss-service.xml 2006-11-22 13:54:12.000000000 +0100
+++ server/default/deploy/naming.sar/META-INF/jboss-service.xml 2007-01-02 18:04:56.332829485 +0100
@@ -13,13 +13,13 @@
<!-- The listening port for the bootstrap JNP service. Set this to -1
to run the NamingService without the JNP invoker listening port.
-->
- <attribute name="Port">1099</attribute>
+ <attribute name="Port">11099</attribute>
<!-- The bootstrap JNP server bind address. This also sets the default
RMI service bind address. Empty == all addresses
-->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<!-- The port of the RMI naming service, 0 == anonymous -->
- <attribute name="RmiPort">1098</attribute>
+ <attribute name="RmiPort">11098</attribute>
<!-- The RMI service bind address. Empty == all addresses
-->
<attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
