2 Replies Latest reply on Feb 10, 2011 4:55 PM by Nick Passero

    JBoss 5.0.1 - JDK 1.5.0_22 - Client Failover Error

    Nick Passero Newbie

      JBoss 5.0.1 GA

      JDK 1.5.0 Update 22

       

      I have 2 Jboss servers setup in a cluster, Node A, Node B. I also have a client, Client A, that communicates with these two nodes, with a hardware load balancer for http traffic and the following for EJB communication: jnp://nodea:1099,nodeb:1099. If Client A is actively connected to Node A, and Node A fails, it is not flipping over to Node B until I restart Client A services. The stack is below.

       

      Is there a way to reload the config file that defines the jnp address?

       

      It seems like the hostname is getting cached in the JVM and will not go out and refresh this. I have played with some of the JDK settings (networkaddress.cache.ttl and networkaddress.cache.negative.ttl) but no luck there.

       

      Let me know if more information is needed.

       

      Thanks

      Nick

       

       

       

      Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://nodea:4446/?dataType=invocation&enableTcpNoDelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]

          at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport (MicroSocketClientInvoker.java:771)

          at org.jboss.remoting.MicroRemoteClientInvoker.invoke (MicroRemoteClientInvoker.java:160)

          at org.jboss.remoting.Client.invoke (Client.java:1708)

          at org.jboss.remoting.Client.invoke (Client.java:612)

          at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke (UnifiedInvokerProxy.java:184)

          at org.jboss.invocation.InvokerInterceptor.invokeInvoker (InvokerInterceptor.java:365)

          at org.jboss.invocation.InvokerInterceptor.invoke (InvokerInterceptor.java:197)

          at org.jboss.proxy.TransactionInterceptor.invoke (TransactionInterceptor.java:61)

          at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke (SecurityContextInterceptor.java:64)

          at org.jboss.proxy.SecurityInterceptor.invoke (SecurityInterceptor.java:68)

          at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke (StatelessSessionInterceptor.java:112)

          at org.jboss.proxy.ClientContainer.invoke (ClientContainer.java:101)

          at $Proxy107.getObjects (Unknown Source)

          at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl._getObjects (EJBSession.java:459)

          ... 73 more

      Caused by: java.net.ConnectException: Connection refused: connect

          at java.net.PlainSocketImpl.socketConnect (Native Method)

          at java.net.PlainSocketImpl.doConnect (PlainSocketImpl.java:333)

          at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:195)

          at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:182)

          at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:367)

          at java.net.Socket.connect (Socket.java:524)

          at org.jboss.remoting.util.SecurityUtility.connect (SecurityUtility.java:1037)

          at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket (SocketClientInvoker.java:203)

          at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection (MicroSocketClientInvoker.java:1084)

          at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport (MicroSocketClientInvoker.java:757)

          ... 86 more

        • 1. JBoss 5.0.1 - JDK 1.5.0_22 - Client Failover Error
          Wolf-Dieter Fink Master

          I suppose you try to connect from client via EJB to your cluster right?

          In this case the JBoss client api handle the failover on client side.

          Are you sure that both server run in a cluster (partition name and multicast addresses are shared), you might see in the logfile 'number of cluster members: 2'?

           

          A test might that you start only one and the other alone and check whether the client work in both cases.

          Also the Bean must be marked as 'clustered'.

          What EJB version do you use?

          • 2. Re: JBoss 5.0.1 - JDK 1.5.0_22 - Client Failover Error
            Nick Passero Newbie

            In this case the client is another JBoss server with the properties (JDK 1.5 and JBoss 5.0.1). The client is not setup in a cluster. I have modified the jndi.properties file that the client loads to the following:

             

            java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
            java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
            java.naming.provider.url=jnp://nodeA:1099,nodeB:1099
            
            

             

            The server is configured in a cluster and I have validated that they are talking with each other. I can see the new member join when the second server is brough up as well as see  a member die out when the server is turned off.

             

            I'm not verify familiar with JBoss, can you tell me which file the Bean marked as 'clustered' would be located? We are using EJB3.