11 Replies Latest reply on Jun 26, 2003 12:54 PM by dasfoid

    Application blocking on PlainSocketImpl.

    jltucci

      Hello,
      I am using jboss-3.2.0 on Redhat 7.2 with jre version 1.4.1_01 and I my application seems to be blocking on the PlainSocketImpl.socketAccept() native method. I am using the jswat debugger, and when I look at the threads running, I see that only 1 in the main function is running, and that is the one blocking on the native method PlainSocketImpl.socketAccept() there are 3 OILClient threads running in JBoss, but they are all waiting on the main thread to connect the socket, does anyone have any ideas on what may be causing this method to block?

      Thanks for your time,

      -Joel L. Tucci

        • 1. Re: Application blocking on PlainSocketImpl.

          With OIL the server connects back to the client
          on a separate connection.
          Try using UIL2 if you cannot get this work,
          which uses a single connection.

          Regards,
          Adrian

          • 2. Re: Application blocking on PlainSocketImpl.
            dasfoid

            (Sorry for the different user name, I think my company is blocking the email from jboss telling me my temp. password)

            Thanks, but it still did not work :( Now it is blocking on SocketInputStream.socketRead0() (another native method) when I use UIL or UIL2, maybe it would help if I gave a little bit more info on the application: I am using the application to communicate to applets that are run on Wndows 2000 pcs. We have had success with the same application on other servers, but for some reason, this one just stopped working one day, we tried copying backup configuration files, and upgrading JBoss from 3.0.7 to 3.2.0, but to no avail. So we have been working on this problem on and off again for over a month, so any help would be greatly appreciated.

            -JLT

            • 3. Re: Application blocking on PlainSocketImpl.
              dasfoid

              Well, I figured it out, it seems that the message is being sent, but either a) it's never getting to the client or b) the client is rejecting it, any tips on trying to figure out which one it is?

              Thanks,
              -JLT

              • 4. Re: Application blocking on PlainSocketImpl.

                Does it work if you are not in an applet
                on the same machine?
                Are there any messages in the java console?

                Regards,
                Adrian

                • 5. Re: Application blocking on PlainSocketImpl.
                  dasfoid

                  An exception is generated(after about 45 seconds) in the java console window:
                  ava.lang.NullPointerException

                  at sun.plugin.cache.CacheFile.getFileType(Unknown Source)

                  at sun.plugin.cache.CacheFile.before(Unknown Source)

                  at sun.plugin.cache.CleanupThread$1.compare(Unknown Source)

                  at java.util.Arrays.mergeSort(Unknown Source)

                  at java.util.Arrays.mergeSort(Unknown Source)

                  at java.util.Arrays.mergeSort(Unknown Source)

                  at java.util.Arrays.mergeSort(Unknown Source)

                  at java.util.Arrays.mergeSort(Unknown Source)

                  at java.util.Arrays.mergeSort(Unknown Source)

                  at java.util.Arrays.sort(Unknown Source)

                  at sun.plugin.cache.CleanupThread.getFilesInCache(Unknown Source)

                  at sun.plugin.cache.CleanupThread.cleanCache(Unknown Source)

                  at sun.plugin.cache.CleanupThread.run(Unknown Source)



                  Well, I finally broke down and put a packet sniffer on my computer to look at all the packets I'm recieving from the server, and all the packets seem to be coming through(if I look at the data, it's the messages that should be coming) but the client isn't recognizing any messages that are coming. I am using (because of requirements) windows 2k with IE 6(also tried netscape, but same problem), any suggestions on where I can start to look at what the problem is?
                  This is really strange though because we have other servers running the same code, (supposedly) same setup, and they work fine(this server is to be a backup and development server)

                  Any advice would be much appreciated,

                  Thanks,
                  -Joel L. Tucci

                  • 6. Re: Application blocking on PlainSocketImpl.
                    genman


                    I would try to run a stand-alone client on the client machine talking to the server and attempt to reproduce the problem. It could be that your applet environment is old or buggy. That thread stack trace doesn't seem related to the issue at hand, but may indicate you're running with a bad (buggy?) environment.

                    • 7. Re: Application blocking on PlainSocketImpl.

                      Try flushing the applet cache.

                      Regards,
                      Adrian

                      • 8. Re: Application blocking on PlainSocketImpl.
                        dasfoid

                        Well, nothing useful, I doubt it is the client however, since the client works fine when we run the same applet on 2 of our other servers. The problem seems to be that for whatever reason, the 2 servers that are messed up(one ran fine for 6 months, then just seemed to randomly get this problem) seem to send all the info to the applet, but the applet never launches the onMessage method, any clues as to what configuration/setting might be causing this? The os, java version, and JBoss version are all the same(actually, I tried upgrading the version on the machine I am working on, but it didn't work), and as far as I can tell, all the network configurations are the same. I have turned logging on in JBoss, but nothing useful shows up in the log, it seems to be working fine.

                        Any help would be much appreciated,

                        -Joel L. Tucci

                        • 9. Re: Application blocking on PlainSocketImpl.

                          Since you mention redhat,
                          check /etc/hosts
                          the default config maps your hostname to 127.0.0.1

                          Regards,
                          Adrian

                          • 10. Re: Application blocking on PlainSocketImpl.
                            dasfoid

                            here is the host file(for security reasons I made a fake ip address and made a fake name)

                            127.0.0.1 localhost.localdomain localhost
                            86.7.53.09 something.maindomain.com

                            so I don't think it's there.

                            Thanks,
                            -Joel L. Tucci

                            • 11. Re: Application blocking on PlainSocketImpl.
                              dasfoid

                              Sorry for the flurry of posts, I really do appreciate your help, here is what the person who was working on this problem before found, hopefully it can be of some use: http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= I tried 3 different versions of the JRE and 3 different browsers, still the same problem, once again, any advice would be very invaluable.

                              Thanks,
                              -Joel L. Tucci