3 Replies Latest reply on Aug 23, 2006 1:20 PM by brian.stansberry

    JBOSS 4.0.4 GA clustering problem

    neiliusmaximus

      I've installed JBOSS 4.0.4 GA using the "ejb3 clustered" option. The server runs on two machines, and the cluster seems to be created successfully (membership changes are visible in the server output).

      I'm trying to deploy a simple stateless session bean to the cluster. It runs locally. The class is annotated with the "@Cluster" tag. When I deploy it I only see the deployment on the local machine. Nothing happens on the other member of the cluster. Should I see it being deployed there also?

      I also have created a test client which calls a method on the session bean. I expected this to fallover to the other member of the cluster when the server is stopped on the local machine, but instead I get an exception (see below).

      One thing I've noticed is that there is no "farm" folder in this version. I'm deploying the session bean to the standard deploy folder. Should I be creating this folder or configuring something within JBOSS?

      Could the fallover problem be related to the RetryInterceptor. I've read somthing about this and my configuration is the default SingleRetryInterceptor. Could the problem be related to this?

      Thanks,
      Neil


      Exception in thread "main" java.lang.RuntimeException: cluster invocation failed, last exception was:
      at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:129)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:100)
      at $Proxy0.sayHello(Unknown Source)
      at ie.fbn.ejb.test.TestForum.main(TestForum.java:40)
      Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection.
      at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:267)
      at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
      at org.jboss.remoting.Client.invoke(Client.java:525)
      at org.jboss.remoting.Client.invoke(Client.java:488)
      at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:74)
      ... 10 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:366)
      at java.net.Socket.connect(Socket.java:507)
      at java.net.Socket.connect(Socket.java:457)
      at java.net.Socket.(Socket.java:365)
      at java.net.Socket.(Socket.java:178)
      at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:535)
      at org.jboss.remoting.transport.socket.SocketClientInvoker.getConnection(SocketClientInvoker.java:471)
      at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:263)
      ... 16 more

        • 1. Re: JBOSS 4.0.4 GA clustering problem
          brian.stansberry

          You need to deploy your EJB on all nodes to get clustering behavior; @Clustered doesn't do that for you.

          If there isn't one already, please raise a JIRA issue, JBoss Application Server project, Installer component re: the missing farm service from the "ejb3 clustered" option.

          To manually add farming, if you can get ahold of a standard "all" config, you can copy the deploy/deploy.last and farm folders into your config.

          • 2. Re: JBOSS 4.0.4 GA clustering problem
            neiliusmaximus

            This works perfectly. I'm not sure how to check if a JIRA issue on this exists, or how to add it as an issue if it doesn't.
            Thanks for the help,
            Neil

            • 3. Re: JBOSS 4.0.4 GA clustering problem
              brian.stansberry

              Glad it worked :).

              Created http://jira.jboss.com/jira/browse/JBAS-3557 .

              In general you search for issues by going to jira.jboss.com and using the search box or clicking on Find Issues in the top menu. Like everywhere search is a bit of an art, so just make a good-faith-effor but don't stress too much; worst that can happen is you file a duplicate issue, which is no big deal.

              To create, there is a Create New Issue link at the top, which leads to a pretty self-explanatory form.