8 Replies Latest reply on Dec 10, 2001 4:25 AM by c-ker...

    HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???

    inkubus

      Hi,

      i've got a silly problem:
      To test a little ejb application (there's only one statless and also one stateful session bean, no entity beans at all) I simulate about 100 Clients.
      I use Windows NT4.0 Server (SP6) for both client and server, JDK1.3.1, JBoss 2.4.3.
      Unfortunately after a few seconds the clients throws the following exceptions:

      java.rmi.ConnectException: Connection refused to host: xxx.my.server.xxx; nested exception is:
      java.net.ConnectException: Connection refused: connect
      java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.Socket.(Unknown Source)
      at java.net.Socket.(Unknown Source)
      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
      at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
      at sun.rmi.server.UnicastRef.invoke(Unknown Source)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown Source)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:357)
      at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123)
      at $Proxy5.getPreparedObject(Unknown Source)
      at dipl.ttmc.Client.run(Client.java:323)
      at dapt.util.a.a.run(Unknown Source)

      What's the problem???
      Please help me!!!

      Thanx a million times...

      Yours
      Inkubus

        • 1. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???
          c-ker...

          I'm having the same problem.

          I tried making my session façade stateless and afterwards statefull. The statefull-version worked faster, but gave the same exception when I tried to do 30 concurrent calls to the session façade (using threads).

          • 2. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???

            Hi,

            I'm not that familiar with how the JRMP proxies work, but you might try this.

            Get a browser up and goto http://127.0.0.1:8082

            In there you'll see service=Naming and service=WebServer or something similar.

            Both have the property backlog=50 by default.

            Try raising this to 100+

            If that works, you can change this forever in

            conf/default/jboss.jcml or
            conf/default/jboss-service.xml

            depending on which version JBoss you are running.

            Regards,
            Adrian

            • 3. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???
              c-ker...

              Thanks for your reply.

              I tried setting the backlog in the naming-service to 100 and afterwards to 500, with no effect.

              I'm running JBoss 2.4.1 and I even took over the whole standard stateless-session-bean configuration, replacing the min-and max-size of the instance-pool to resp. 100 and 500.

              But as even the statefull-version has the same problem, I guess it has nothing to do with the size of the instance-pool.

              I don't see why it works perfectly with 20 concurrent threads running the same test, and not with 30+ concurrent threads.

              Making such concurrent calls by the same client should be a situation which is common in Tomcat-JBoss-configurations.

              Or is it just too demanding to want to access my session-bean by 30 threads concurrently?

              • 4. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???

                hi C-Ker

                Are you using windows as well?

                I tried this on my Windows XP machine and got the same problem.
                Most I got to start was 52 out of 100

                I did get 98 out 100 by putting some sleeps in my client code.

                When I tried it on my linux box I got no errors, all my connections were successful. The backlog is still set at 50.

                Looks like a configuration problem in the Windows IP stack.

                I have no idea how to fix it?

                Note: This is a guess.

                Regards,
                Adrian

                • 5. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???

                  Hi, me again

                  It gets harder and harder to find stuff on the net every day :-(

                  I found this link about dynamic backlogging in Winsock

                  http://solutionbank.antivirus.com/solutions/solutionDetail.asp?solutionID=9842

                  I haven't tried it myself, so NO WARRANTY :-)

                  Make sure you understand the consequences of this before changing it.

                  Regards,
                  Adrian

                  • 6. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???
                    inkubus

                    Hi there ...

                    ... many thanks for your friendly help.
                    But unfortunately the problem still isn't solved ...
                    (like Homer Simpson would say) d'ooooooohhhhhh!!! ...

                    Have a nice day.

                    Yours
                    Inkubus

                    • 7. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???
                      c-ker...

                      Hi Adrian,
                      thanks for your reply.

                      I am using both Windows NT 4.0 and Windows 2000.

                      I have set the linux-test on my schedule for today ;)

                      I will post the results shortly.

                      C-ker aka Bart

                      • 8. Re: HELP!!! CONNECTION REFUSED!!! TOO MANY CLIENTS???
                        c-ker...

                        #define THIS_FORUM_RULEZ

                        Woehoew! I just ran my test on Redhat 7.1 on a 733Mhz with 100 concurrent clients and you had to see it going ;)!

                        No more exceptions!

                        I guess few people use Windows as a platform for JBoss for heavy-load-purposes ;)

                        Thanks a lot!
                        If I can help you some day: bart.dubois@skynet.be