3 Replies Latest reply on Apr 25, 2008 2:44 PM by brian.stansberry

    login/client id that is already connected/cluster configurat

    maralcbr

      Hi,

      I searched a lot this forum, the spec and the net, but could not find a solution to my problem.

      I have two JBoss 4.2.2GA running in a cluster.

      I have an application that deploy a queue in jboss.xml like this:

      <message-driven>
       <ejb-name>ContatoConsumerBean</ejb-name>
       <configuration-name>Standard Message Driven Bean</configuration-name>
       <destination-jndi-name>queue/cadastro</destination-jndi-name>
      
       <mdb-user>CadastroUser</mdb-user>
       <mdb-passwd>CadastroUser</mdb-passwd>
       <mdb-subscription-id>CadastroUser</mdb-subscription-id>
      
      </message-driven>
      


      and then, I am receiving the following message just on the second node of the cluster partition:


      10:39:01,727 ERROR [JMSContainerInvoker] Reconnect failed: JMS provider failure detected for Contato
      ConsumerBean
      javax.jms.JMSSecurityException: The login id has an assigned client id 'CadastroUser', that is alrea
      dy connected to the
      server!
       at org.jboss.mq.sm.AbstractStateManager.checkUser(AbstractStateManager.java:180)
       at org.jboss.mq.server.JMSDestinationManager.checkUser(JMSDestinationManager.java:681)
       at org.jboss.mq.server.JMSServerInterceptorSupport.checkUser(JMSServerInterceptorSupport.jav
      a:161)
       at org.jboss.mq.server.TracingInterceptor.checkUser(TracingInterceptor.java:581)
       at org.jboss.mq.server.JMSServerInvoker.checkUser(JMSServerInvoker.java:167)
       at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java
      :222)
       at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:419)
       at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
       at java.lang.Thread.run(Thread.java:595)
      




      The jar with this jboss.xml is being deployed on the farm deploy dir. Should this jar be deployed on the deploy-hasingleton dir?

      Thanks in advance for any help.

      Marcelo

        • 1. Re: login/client id that is already connected/cluster config
          maralcbr

          Hi,

          I searched a lot this forum, the spec and the net, but could not find a solution to my problem.

          I have two JBoss 4.2.2GA running in a cluster.

          I have an application that deploy a queue in jboss.xml like this:

          <message-driven>
           <ejb-name>ContatoConsumerBean</ejb-name>
           <configuration-name>Standard Message Driven Bean</configuration-name>
           <destination-jndi-name>queue/cadastro</destination-jndi-name>
          
           <mdb-user>CadastroUser</mdb-user>
           <mdb-passwd>CadastroUser</mdb-passwd>
           <mdb-subscription-id>CadastroUser</mdb-subscription-id>
          
          </message-driven>
          



          and then, I am receiving the following message just on the second node of the cluster partition:

          10:39:01,727 ERROR [JMSContainerInvoker] Reconnect failed: JMS provider failure detected for Contato
          ConsumerBean
          javax.jms.JMSSecurityException: The login id has an assigned client id 'CadastroUser', that is alrea
          dy connected to the
          server!
           at org.jboss.mq.sm.AbstractStateManager.checkUser(AbstractStateManager.java:180)
           at org.jboss.mq.server.JMSDestinationManager.checkUser(JMSDestinationManager.java:681)
           at org.jboss.mq.server.JMSServerInterceptorSupport.checkUser(JMSServerInterceptorSupport.jav
          a:161)
           at org.jboss.mq.server.TracingInterceptor.checkUser(TracingInterceptor.java:581)
           at org.jboss.mq.server.JMSServerInvoker.checkUser(JMSServerInvoker.java:167)
           at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java
          :222)
           at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:419)
           at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
           at java.lang.Thread.run(Thread.java:595)



          The jar with this jboss.xml is being deployed on the farm deploy dir. Should this jar be deployed on the deploy-hasingleton dir?

          Thanks in advance for any help.

          Marcelo

          • 2. Re: login/client id that is already connected/cluster config
            maralcbr

            I have more information from my tests.

            If I shutdown the first server, the error stops happening on the second one.

            The conclusion I can get is that the MDBs from both servers are acessing the queue on the first loaded node - what is correct. As the JMS service is HA singleton.

            With this info, the error could be fixed by changing the <mdb-user> and/or <mdb-subscription-id> from the MDBs on the xmls of the second server.

            But - it does not sound nice to have to generate different jars/ears for each node of the cluster. The farm service for example would not be usable.

            Any ideias/comments?

            Thanks.

            Marcelo

            • 3. Re: login/client id that is already connected/cluster config
              brian.stansberry

              I'm not personally familiar with the details of this aspect of JBossMQ, but your analysis sounds correct.

              A workaround:

              <message-driven>
               <ejb-name>ContatoConsumerBean</ejb-name>
               <configuration-name>Standard Message Driven Bean</configuration-name>
               <destination-jndi-name>queue/cadastro</destination-jndi-name>
              
               <mdb-user>${ContatoConsumerBean.mdb.user:CadastroUser}</mdb-user>
               <mdb-passwd>CadastroUser</mdb-passwd>
               <mdb-subscription-id>CadastroUser</mdb-subscription-id>
              
              </message-driven>
              


              then start JBoss like this:

              ./run.sh -DContatoConsumerBean.mdb.user=$CADASTRO_USER_ID -c all

              Then on each server you'd use a different value for the $CADASTRO_USER_ID environment var.