3 Replies Latest reply on May 10, 2005 10:27 AM by schrouf

    Problem deploying MDB when running server on different ports

      Hi all!

      I have an MDB that I am deploying. When the server starts up in the default fasion every thing works as expected. In other words I do not recieve an error on deploy. My mdb deploys fine. I then restart my server using the service-binding.xml file to change the ports. The start string is this

      run -c 2ndinstance -Djboss.server.ports=ports-01

      The server starts up normally and is running on the new ports. However when my mdb deploys I get:

      java.rmi.ServerException: Could not bind home; nested exception is:
      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]


      Once again I only recieve this error when I start the server up on different ports. My queue seems to be fine when I view it through JMX console.

      Any ideas??

        • 1. Re: Problem deploying MDB when running server on different p
          schrouf

          First of all have a look into to boot.log file an check propper port address substitution especially for all JMS related service MBeans referenced in the sample-bindings.xml file

          e.g.

          ....
          ....
           <!-- ********************* jbossmq-service.xml **************** -->
          
           <service-config name="jboss.mq:service=InvocationLayer,type=UIL2"
           delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
           >
           <delegate-config portName="ServerBindPort"/>
           <binding port="8393"/>
           </service-config>
          
          
           <!-- ********************* hajndi-jms-ds.xml **************** -->
          
           <service-config name="jboss.mq:service=JMSProviderLoader,name=HAJNDIJMSProvider"
           delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
           >
           <delegate-config>
           <!-- use HAJNDI naming service -->
           <attribute name="Properties">
           java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
           java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
           java.naming.provider.url=localhost:1400
           </attribute>
           </delegate-config>
           <binding/>
           </service-config>
          
          ...
          ....
          
          Regards
          Ulf
          


          • 2. Re: Problem deploying MDB when running server on different p

            Thanks for the reply Ulf. It does seem to be a port problem. However the problem is not showing it self until deploy. Checking the logs I found a communication exception

            javax.naming.CommunicationException: Failed to connect to server localhost:1099.

            This is confusing because I have uncommented the following section in the jms-ds.xml file.


            java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
            java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
            java.naming.provider.url=localhost:1199


            Looking at the JMX-Console the org.jboss.mq.il.uil2.UILServerILService is pointing to the correct port.

            Cameron

            • 3. Re: Problem deploying MDB when running server on different p
              schrouf

              Hm, are you using a clustered (e.g. all) or unclustered (e.g. default) jboss server configuration ?

              The unclustered jms-ds.xml defines a JMSProviderLoader with name JMSProvider

               <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
               name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
              Check your sample-bindings
              


              while the clustered hajndi-jms-ds.xml defines a JMSProviderLoader with name HAJNDIJMSProvider (at least in my configuration :-)

               <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
               name="jboss.mq:service=JMSProviderLoader,name=HAJNDIJMSProvider">
              


              Now check your sample-bindings.xml file if there is an <service config > port binding override entry that exactly matches your configured JMSProviderLoader name (e.g. for my clustered configuration there is an entry for HAJNDIJMSProvider) !

              sample-bindings.xml
              ....
              ....

               <!-- ********************* hajndi-jms-ds.xml **************** -->
              
               <service-config name="jboss.mq:service=JMSProviderLoader,name=HAJNDIJMSProvider"
               delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
               >
               <delegate-config>
               <!-- use HAJNDI naming service -->
               <attribute name="Properties">
               java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
               java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
               java.naming.provider.url=localhost:1400
               </attribute>
               </delegate-config>
               <binding/>
               </service-config>
              
              

              ...
              ....


              Maybe this will do the job ?!?

              Regards
              Ulf