You might need to start two Nuxeo instances for various reasons, like testing stateful/stateless packaging, or running two different Nuxeo applications. To achieve it, you have 2 ways (both works with 2 or more jbosses).

Using virtual interfaces (for unix family of OS)

This way creates one virtual network interface per instance of JBoss. To create the virtual interface:

# On Linux
ifconfig eth0:1 10.0.0.1 netmask 255.255.255.0
ifconfig eth0:2 10.0.0.2 netmask 255.255.255.0

# On Mac OS X
ifconfig lo0 alias 10.0.0.1 netmask 255.0.0.0
ifconfig lo0 alias 10.0.0.2 netmask 255.0.0.0

Then you need to set up the DNS to allow the JBosses to find each other. The name used by Nuxeo are:

  • jboss1 is nxplatformserver
  • jboss2 is nxwebserver
one of them need to be used as jmsserver In /etc/hosts:
10.0.0.1 nxjmsserver nxplatformserver
10.0.0.2 nxwebserver

Then you bind JBoss to the virtual interface at start up.

./bin/run.sh -b 10.0.0.1
./bin/run.sh -b 10.0.0.2

With this setting, you can easily test network problem. to test a dropped connection: ifconfig eth0.1 down => not working

iptables -I INPUT -d nxplatformserver  -j DROP
reconnect
iptables -I INPUT -d nxplatformserver -j ACCEPT

Using jboss-service.xml

  • uncommment in /default/conf/jboss-service.xml the Service binding part :
<mbean code="org.jboss.services.binding.ServiceBindingManager"
     name="jboss.system:service=ServiceBindingManager">
     <attribute name="ServerName">ports-01</attribute>
     <attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
     <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
     </attribute>
   </mbean>

There is a reference to sample-bidings.xml. In that file, you can even find more ports configurations allowing you to run more Jboss at the same time (ports-02, ...)

  • change in nuxeo.properties the streaming and remoting server port from 62474 to (for instance) 63475:
# runtime remoting config

org.nuxeo.runtime.server.enabled=true
org.nuxeo.runtime.server.host=${org.nuxeo.ecm.instance.host}
org.nuxeo.runtime.server.locator=socket://0.0.0.0:62475/?datatype=nuxeo

# streaming config

org.nuxeo.runtime.streaming.isServer=true
org.nuxeo.runtime.streaming.serverLocator=socket://${org.nuxeo.ecm.instance.host}:62475/?datatype=nuxeo

  • if you use jbossctl script, change the PORT variable :
PORT=8180
and the JNPPORT variable :

JNPPORT=1199
Version 6.1 last modified by Thomas Roger on 17/06/2009 at 18:25

Comments 0

No comments for this document

Attachments 0

No attachments for this document

Creator: Alain Escaffre on 2008/11/14 01:26
© 2008-2010 Nuxeo
1.3.8295