5 Replies Latest reply on Apr 10, 2005 12:57 PM by Andy Nguyen

    ServiceBindingManager multiple jboss same machine using

    tomerbd2 Newbie

      Hi

      I'm using jboss4.0.2RC1

      I have made 2 copies of the all configuration, one is called node1 and one is called node2.
      * I ran run -c node1 - everything is ok.
      * In node's 2 configuration i have updated jboss-service.xml and uncommented the ServiceBindingManager and its with ports-01
      * However when i run jboss -c node2 I receive these errors :

      13:33:45,640 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /0.
      0.0.0:1102, group=230.0.0.4, HA-JNDI address=192.168.0.1:1200
      13:33:45,671 ERROR [PooledInvokerHA] Starting failed jboss:service=invoker,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:272)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:222)
      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:144)
      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:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:911)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:416)
      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:144)
      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:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)


      and
      13:34:12,578 INFO [testTopic] Bound to JNDI name: topic/testTopic
      13:34:12,593 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      13:34:12,593 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic

      13:34:12,593 INFO [testQueue] Bound to JNDI name: queue/testQueue
      13:34:12,718 ERROR [OILServerILService] Starting failed jboss.mq:service=Invocat
      ionLayer,type=OIL
      java.net.BindException: Address already in use: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
      at java.net.ServerSocket.bind(ServerSocket.java:319)
      at java.net.ServerSocket.<init>(ServerSocket.java:185)
      at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketF
      actory.java:169)
      at org.jboss.mq.il.oil.OILServerILService.startService(OILServerILServic
      e.java:578)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:272)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:222)
      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:144)
      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:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:911)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:416)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      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:144)
      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:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


      anyone knows why?

        • 1. Re: ServiceBindingManager multiple jboss same machine using
          Andy Nguyen Newbie

          I would start with this:

          java.lang.Exception: Port 4446 is already in use


          If you want to run both nodes on the same machine, you need to change the port assignments for the second node. I would consult the wiki on what ports are being used and where they're configured: http://www.jboss.org/wiki/Wiki.jsp?page=UsingJBossBehindAFirewall

          • 2. Re: ServiceBindingManager multiple jboss same machine using
            dannyb23 Newbie

            In the clustering webinar there was an example of running two nodes on same machine and all they did there was updating the ServiceBindingManager and its with ports-01 , wasnt this supposed to be working??

            • 3. Re: ServiceBindingManager multiple jboss same machine using
              Andy Nguyen Newbie

              You're right. http://docs.jboss.org/jbossas/admindevel326/html/ch10.html#d0e21029.

              I've always just modified the configs for each service directly, but it looks like you can use the ServiceBindingManager to override individual service config values all from one central config.

              • 5. Re: ServiceBindingManager multiple jboss same machine using
                Andy Nguyen Newbie

                Looks like someone forgot to update docs/examples/binding-manager/sample-bindings.xml with entries for the PooledInvokerHA (new in 4.0?)

                Anyways, it's easy fix to add the required entry for ports-01. Here is a diff that adds the binding entry for the pooledha invoker in all service binding configurations:

                *** docs/examples/binding-manager/sample-bindings.xml.dist Sun Apr 10 12:38:17 2005
                --- docs/examples/binding-manager/sample-bindings.xml Sun Apr 10 12:41:16 2005
                ***************
                *** 92,97 ****
                --- 92,104 ----
                 <binding port="4444"/>
                 </service-config>
                
                + <service-config name="jboss:service=invoker,type=pooledha"
                + delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
                + >
                + <delegate-config portName="ServerBindPort"/>
                + <binding port="4446"/>
                + </service-config>
                +
                
                 <!-- ********************* iiop-service.xml ****************** -->
                
                ***************
                *** 309,314 ****
                --- 316,328 ----
                 <binding port="4544"/>
                 </service-config>
                
                + <service-config name="jboss:service=invoker,type=pooledha"
                + delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
                + >
                + <delegate-config portName="ServerBindPort"/>
                + <binding port="4546"/>
                + </service-config>
                +
                
                 <!-- ********************* iiop-service.xml ****************** -->
                
                ***************
                *** 530,535 ****
                --- 544,556 ----
                 <binding port="4644"/>
                 </service-config>
                
                + <service-config name="jboss:service=invoker,type=pooledha"
                + delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
                + >
                + <delegate-config portName="ServerBindPort"/>
                + <binding port="4646"/>
                + </service-config>
                +
                
                 <!-- ********************* iiop-service.xml ****************** -->
                
                ***************
                *** 748,753 ****
                --- 769,781 ----
                 >
                 <delegate-config portName="RMIObjectPort"/>
                 <binding port="4744"/>
                + </service-config>
                +
                + <service-config name="jboss:service=invoker,type=pooledha"
                + delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
                + >
                + <delegate-config portName="ServerBindPort"/>
                + <binding port="4746"/>
                 </service-config>