10 Replies Latest reply on Mar 21, 2002 5:24 AM by adrian.brock

    Connection refused? Need help.

    stealth00

      Hi group, I am having the problem when a lot client requests come in at the same time, say 50 clients, only the first 20 or so get repsonse and all others got 'connection refused' exception. I am not sure where to specify the waiting queue time out. In my case, it's much better to let the client wait a little longer but finally get a response than let them hava a 'connection response' error. Is there a configuration file that I can modify the max time each incoming request should wait? Thank you very much!

        • 1. Re: Connection refused? Need help.

          You are using windows?

          It could be one of these:

          1) You are stress testing and making lots of connections
          from the same ip address. Windows refuses after about
          20 attempts. It thinks you are doing a denial of
          service attack.

          2) From different ip addresses you don't have the
          license for 50 connections. e.g. You are using
          Windows XP home edition.

          Regards,
          Adrian

          • 2. Re: Connection refused? Need help.
            stealth00

            Hi warjort thanks for the reply. Yeah I am doing stress test, and all the requests were from a single IP. So is there any solution to this problem? I did a search in the archive and it seems Linux doesn't have the problem, but for some reason I have to use Windows.
            I also did the same thing to Weblogic6.0 on Windows, and with up to 1000 concurrent incoming requests there wasn't any problem. This did get me confused. :(

            • 3. Re: Connection refused? Need help.

              Interesting.

              I looked into registry settings on windows. I didn't find
              any. :-(
              I did see the same problem reported on the internet
              with lots of other java applications on Windows.

              I also saw the problem with the default settings of
              inetd on linux, but JBoss doesn't use inetd.

              Since I've got both a linux box, I just stress test on linux.

              One workaround I did find, was to put a sleep
              between the initial connections on the client.
              I managed to get 98 out of 100 with a 1 sec sleep.

              Regards,
              Adrian

              • 4. Re: Connection refused? Need help.
                stealth00

                Hi Adrian thank you for the advices, since I am doing stress testing I can't put sleep between requests :( I just searched the old posts and found someone suggested a tool called 'dynamic backlog' which is said to overcome the problem, I am wondering if there's anyone with any luck on it. Thanks again.
                By the way besides the Weblogic6.0, I also tried Borland AppServer4.5 which didn't either have such a problem. I am wondering why Jboss is doing that.

                • 5. Re: Connection refused? Need help.

                  I wonder if there is some setting in rmi we are missing?

                  I assume you still have the other appservers installed, so
                  the windows registry is the same?

                  Regards,
                  Adrian

                  • 6. Re: Connection refused? Need help.
                    stealth00

                    Yeah I am having all three appservers installed at the same time and the other two worked just fine. Could it be the way JBoss handles clients causes this problem?

                    • 7. Re: Connection refused? Need help.

                      I'll investigate some more.

                      I gave up last time because linux was ok.
                      I assumed it was a windows ip stack thing.

                      Of course it might be the other appservers are *slow*
                      at making connections, so windows doesn't think it is a
                      DOS attack.

                      Regards,
                      Adrian

                      • 8. Re: Connection refused? Need help.
                        stealth00

                        I just tried the dynamic backlog registry modification which says it will exceed the limit of windows, and no it didn't work :(

                        • 9. Re: Connection refused? Need help.
                          mangomango

                          Did you resolve your problem ? I have no problem with Weblogic for N>20 threads but it doesn't work on JBoss 2.4.4.
                          Thanks

                          • 10. Re: Connection refused? Need help.

                            Hi,

                            I have located the cause of the problem.
                            Sun already know about this problem, they have it
                            as an open bug in Java. It only affects Windows, because
                            of the way it processes threads in socket handling.

                            There is something in JBoss I can do to work around
                            this problem. However the fix means the thread accepting
                            the RMI connection isn't the thread processing the
                            request. I know of at least one person using
                            UnicastRemoteObject to get the client's IP address.
                            This code would break with my fix.

                            I'm trying to find a different solution, but nothing
                            else I try works :-(

                            Regards,
                            Adrian