-
1. Re: How to start Multiple servers (instances) in JBoss
schrouf May 18, 2005 2:17 AM (in response to gmbabu77)Use the binding-manager-service.
Regards
Ulf -
2. Re: How to start Multiple servers (instances) in JBoss
astrien May 18, 2005 10:35 AM (in response to gmbabu77)You know, sometimes a one-line answer is less helpfull than no answer at all.
Mohan - I'm working on the same problem you are. First, read this:
http://jboss.com/index.html?module=bb&op=viewtopic&t=63969
Now, in my case, each Jboss instance is serving a domain that has it's own ip address, and therefore I can use the configuration options to set the "--host=$JBOSS_HOST" option for each instance. This allows for the RMI, JNDI, UIL2, and other ports that a JBoss server config can use to bind to that IP or Host name instead of all vying for the same IP address, which is what I think is happening to you.
As far as I'm concerned the binding-manager-service is a programmer's solution to multiple instances, which is to say it's over-complicated and just not very helpful to 90% of the people using JBoss. For just throwing up a second server, it should have been much simpler.
If you're going to run multiple instances of JBoss on the same IP and you don't want to have to take the time to learn the binding-manager-service, then you need to change the ports the services use for each instance. I'm working on the script referenced in the post linked above to make all this multiple instance stuff easier. I'm just getting around to taking care of ports for shared host instances, but until I do, you'll have to go into the Tomcat SAR server.xml, the jboss-service.xml, and any other assorted xml configuration files for what services you are deploying and change the ports there for each instance so no ports conflict with any others.
I hope this helps, and as I said, I'm still working on simplifying all of this. I'll check back here if you have any other questions... -
3. Re: How to start Multiple servers (instances) in JBoss
darranl May 18, 2005 10:55 AM (in response to gmbabu77)JBoss is distributed with a configuration file for the binding service that already contains four different valid configurations that work with the default server instance.
The only steps required are: -
1 - Clone the default server
2 - Edit the conf/jboss-service.xml
a - Uncomment the binding service
b - Specify the name of the binding configuration to use
3 - Start the new server -
4. Re: How to start Multiple servers (instances) in JBoss
tomerbd2 Jun 27, 2005 12:06 PM (in response to gmbabu77)using jboss-4.0.2
cloned the all configuration and my new configuration jboss-service.xml has this
<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>
And i receive this exception
-------------------------------------------------------
GMS: address is WS-A50-TBD:1771 (additional data: 16 bytes)
-------------------------------------------------------
19:02:17,827 INFO [DefaultPartition] Number of cluster members: 1
19:02:17,827 INFO [DefaultPartition] New cluster view for partition DefaultPart
ition (id: 0, delta: 0) : [10.10.1.226:1199]
19:02:17,827 INFO [DefaultPartition] Other members: 0
19:02:17,827 INFO [DefaultPartition] Fetching state (will wait for 30000 millis
econds):
19:02:17,843 INFO [DefaultPartition] I am (null) received membershipChanged eve
nt:
19:02:17,843 INFO [DefaultPartition] Dead members: 0 ([])
19:02:17,843 INFO [DefaultPartition] New Members : 0 ([])
19:02:17,843 INFO [DefaultPartition] All Members : 1 ([10.10.1.226:1199])
19:02:17,905 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1200, bac
klog=50, bindAddress=/0.0.0.0
19:02:17,921 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /0.
0.0.0:1102, group=230.0.0.4, HA-JNDI address=10.10.1.226:1200
19:02:17,952 WARN [ServiceController] Problem starting service jboss:service=in
voker,type=pooledha
java.lang.Exception: Port 4446 is already in use
at org.jboss.invocation.pooled.server.PooledInvoker.startService(PooledI
nvoker.java:179)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:267)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:217)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:950)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:436)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:973)
Wasnt this supposed to be working? -
5. Re: How to start Multiple servers (instances) in JBoss
darranl Jun 27, 2005 12:28 PM (in response to gmbabu77)There was a service missed from the service-binding.xml for the all configuration.
http://jira.jboss.com/jira/browse/JBAS-1788
http://jira.jboss.com/jira/browse/JBAS-1819
You need to add: -<service-config name="jboss:service=invoker,type=pooledha" delegateClass="org.jboss.services.binding.AttributeMappingDelegate" > <delegate-config portName="ServerBindPort"/> <binding port="4546"/> </service-config>
To the ports-01 section. -
6. Re: How to start Multiple servers (instances) in JBoss
tomerbd2 Jun 27, 2005 1:15 PM (in response to gmbabu77)I applied the patch found in jira, and successfully loaded two nodes on my local machine with no ports collisions however the two nodes (that share the cluster) are not talking to each other... :/ (deploying an ear to the farm directory does not deploy to the other farm directory and other issues as well that works fine while i worked with different machines...)
Anyone knows why?