8 Replies Latest reply on May 30, 2003 11:53 AM by Sacha Labourey

    SFSB clustering problem

    Aitor Newbie

      I have developped a clustered SFSB. It's a simple SFSB that has a int and a method to add one to the int. I have deployed in the clustered environment, with the clustered tag, but it seems that it doesn't works. I make the create in the bean, but then one server crashes, and then I call the count method, but I obtain the following error:
      java.rmi.ConnectException: Connection refused to host:

        • 1. Re: SFSB clustering problem
          Sacha Labourey Master

          please provide all stacktraces. Cheers,


          • 3. Re: SFSB clustering problem
            Aitor Newbie

            [java] Searching nom....
            [java] Searched.
            [java] Creating...
            [java] Created... 0
            [java] 0
            [java] Created... 1
            [java] 0
            [java] Created... 2
            [java] 0
            [java] Appel de le methode count() sur les beans..
            [java] java.rmi.ConnectException: Connection refused to host:; nested exception is:
            [java] java.net.ConnectException: Connection refused
            [java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
            [java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
            [java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
            [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
            [java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
            [java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
            [java] Exception: Connection refused to host:; nested exception is:
            [java] java.net.ConnectException: Connection refused
            [java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:87)
            [java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
            [java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
            [java] at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:104)
            [java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
            [java] at $Proxy2.count(Unknown Source)
            [java] at CountClient.main(Unknown Source)
            [java] Caused by: java.net.ConnectException: Connection refused
            [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
            [java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
            [java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
            [java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
            [java] at java.net.Socket.connect(Socket.java:426)
            [java] at java.net.Socket.connect(Socket.java:376)
            [java] at java.net.Socket.(Socket.java:291)
            [java] at java.net.Socket.(Socket.java:119)
            [java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
            [java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
            [java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
            [java] ... 12 more

            • 4. Re: SFSB clustering problem
              Pavel Bereza Newbie

              You can try to bypass this problem.
              When creating InitialContext() you should specify Context.PROVIDER_URL = "localhost:1100".
              It is permit you to do lookups through the HA JNDI, and ConnectException should dissapear.

              • 5. Re: SFSB clustering problem
                Aitor Newbie

                I have tried, but I have the same problem, because, if I specifies no url provider, The search is made by the HA JNDI and not JNDI.

                • 6. Re: SFSB clustering problem
                  Sacha Labourey Master

                  OK, please show your jboss.xml: I am sure it is wrong as the proxy used by the client is NOT clustered. If you take a look at the stacktrace, it includes JRMPInvokerProxy but not its HA variant.



                  • 7. Re: SFSB clustering problem
                    Aitor Newbie

                    That my jboss.xml:

                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">


                    <configuration-name>Standard Stateful SessionBean</configuration-name>



                    • 8. Re: SFSB clustering problem
                      Sacha Labourey Master

                      it seems ok, make sure you lookup the correct jNDI name as your stacktrace is clearly wrong and does not use the good interceptors on the client. Or provide your client, and EJB JAR so I can try.