4 Replies Latest reply on Dec 10, 2007 11:50 AM by peterj

    Problem in creating multiple instance of Jboss running on sa

    bijaya4u

      Hi all

      Please tell me steps to create multiple instance of Jboss with diffrent port number.
      Actually i want multiple instance of Jboss with different port number running on same machine.

      I tried with this steps, but it does not work for me.

      In conf/jboss-service.xml i added

      <mbean code="org.jboss.services.binding.ServiceBindingManager"
       name="jboss.system:service=ServiceBindingManager">
       <attribute name="ServerName">ports-01</attribute>
       <attribute name="StoreURL">D:/dev/jboss-4.0.2/docs/examples/binding-manager/sample-indings.xml</attribute>
       <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
       </attribute>
       </mbean>
      
       <mbean code="org.jboss.services.binding.ServiceBindingManager"
       name="jboss.system:service=ServiceBindingManager">
       <attribute name="ServerName">ports-02</attribute>
       <attribute name="StoreURL">D:/dev/jboss-4.0.2/docs/examples/binding-manager/sample-bindings.xml</attribute>
       <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
       </attribute>
       </mbean>
      

      But i am getting an exception when i am trying to run jboss server
      16:49:04,656 INFO [ServiceBindingManager] Using StoreURL: file:/D:/dev/jboss-4.0.2/docs/examples/binding-manager/sample-binding
      16:49:04,750 ERROR [MainDeployer] could not create deployment: file:/D:/dev/jboss-4.0.2/server/default/conf/jboss-service.xml
      org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.system:service=ServiceBindingMana
       at org.jboss.system.ServiceCreator.install(ServiceCreator.java:70)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:153)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
       at org.jboss.system.ServiceController.install(ServiceController.java:202)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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:249)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy4.install(Unknown Source)
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:220)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       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 $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
       at org.jboss.Main.boot(Main.java:195)
       at org.jboss.Main$1.run(Main.java:463)
       at java.lang.Thread.run(Thread.java:595)
      Failed to boot JBoss:
      org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.system:service=ServiceBindingMana
       at org.jboss.system.ServiceCreator.install(ServiceCreator.java:70)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:153)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
       at org.jboss.system.ServiceController.install(ServiceController.java:202)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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:249)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy4.install(Unknown Source)
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:220)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       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 $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
       at org.jboss.Main.boot(Main.java:195)
       at org.jboss.Main$1.run(Main.java:463)
       at java.lang.Thread.run(Thread.java:595)
      16:49:05,125 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
      Shutting down
      16:49:05,156 INFO [Server] Shutdown complete
      Shutdown complete
      Halting VM
      Press any key to continue . .
      


      Please help me on this.
      Thanks in advance

        • 1. Re: Problem in creating multiple instance of Jboss running o
          alvaro.arenas

          Maybe is easier to create a new nework interface and start the new jboss instance binding to the new ip address. That way you don't need to change the ports.

          Just an idea. I haven't done this myself, but I guess that is easier to mantain

          Alvaro

          • 2. Re: Problem in creating multiple instance of Jboss running o
            peterj

            The first step in running multiple instances of the app server is making two copies of the configuration you want to run. For example, copy 'default' as 'other'.

            Then to use the binding manager, put your first ServiceBindingManager entry in the server/default/conf/jboss-service.xml file, and place the second one in the server/other/conf/jboss-service.xml.

            Or, as Alvaro pointed out, you could run each instance binding to a different IP address.

            But either way you need to different configurations - you cannot run the same configuration twice.

            • 3. Re: Problem in creating multiple instance of Jboss running o
              bijaya4u

              Thanks Peter
              I tried with ur first option

              Then to use the binding manager, put your first ServiceBindingManager entry in the server/default/conf/jboss-service.xml file, and place the second one in the server/other/conf/jboss-service.xml.


              But when i tried to run 2nd instance with using another console..
              It gives me an error like this....

              Warning: classic VM not supported; client VM will be used
              ERROR: transport error 202: bind failed: Address already in use ["transport.c",L41]
              ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debugInit.c",L497]
              JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initializedFATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113)
              Press any key to continue . . .
              
              


              So it means i need to have another IP address to run another Jboss instance.

              Please reply me ASAP

              • 4. Re: Problem in creating multiple instance of Jboss running o
                peterj

                What operating system are you running on and which JDK are you using? Version numbers, please.