7 Replies Latest reply on Nov 5, 2001 2:30 AM by Jukka Lehti

    Port scanning crashed JBossMQ

    Jukka Lehti Newbie

      Hello all,

      I downloaded JBossMQ from (is this the latest version, btw?)

      http://prdownloads.sourceforge.net/jboss/jbossmq-1.0.0-Beta-1.zip

      and installed it to my RedHat Linux 7.2/SUN JRE 1.3.1. It was running fine until I performed port scan against the server. When scanning the OIL and UIL ports, an exception is thrown and after that the service is not responding:

      [OILServerILService] Could not initialize the OILServerIL Service.
      java.io.StreamCorruptedException: Caught EOFException while reading the stream header
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:845)
      at java.io.ObjectInputStream.(ObjectInputStream.java:168)
      at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:182)
      at java.lang.Thread.run(Thread.java:484)
      [UILServerILService] Could not initialize the UILServerIL Service.
      java.io.StreamCorruptedException: Caught EOFException while reading the stream header
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:845)
      at java.io.ObjectInputStream.(ObjectInputStream.java:168)
      at org.jboss.mq.il.uil.UILServerILService.run(UILServerILService.java:187)
      at java.lang.Thread.run(Thread.java:484)

      The port scanner I used is available for Linux at:

      http://www.ricksoft.co.uk/downloads/portscan/portscan.htm

      The same problem seems to be with JBossMQ from JBoss-2.4.3.zip, too.

        • 1. Re: Port scanning crashed JBossMQ
          Jukka Lehti Newbie

          Anybody?

          If this is a known problem or documented somewhere, a pointer to TFM would be just fine.

          • 2. Re: Port scanning crashed JBossMQ
            Hiram Chirino Expert

            This seems like a weird one.. Can you consistently reproduce it??

            Regards,
            Hiram

            • 3. Re: Port scanning crashed JBossMQ
              Jukka Lehti Newbie

              Yes, here's how to reproduce it under Linux:

              download the jbossmq from the link above, unzip, 'cd' to jbossmq-1.0.0-Beta-1/bin and say 'sh run.sh'.

              Then, download the portscanner from the link above,
              untar it, and use the binary "ports". (You can also compile it by yourself, but before you do a 'make', you have to remove "struct timeval" definition from the top of ports.cpp.)

              Then just scan those ports used by OIL and UIL, and you'll get the exceptions (during the first scan, after that, you can't get no response at all from those ports, even if sending some valid messages).

              I tried this now also with SUN's J2RE-1.4.0-beta2-linux
              and with it I got:

              [OILServerILService] Could not initialize the OILServerIL Service.
              java.io.EOFException
              at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2138)
              at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2607)
              at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:721)
              at java.io.ObjectInputStream.(ObjectInputStream.java:252)
              at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:182)
              at java.lang.Thread.run(Thread.java:539)

              [UILServerILService] Could not initialize the UILServerIL Service.
              java.net.SocketException: Connection reset by peer: Connection reset by peer
              at java.net.SocketInputStream.socketRead0(Native Method)
              at java.net.SocketInputStream.read(SocketInputStream.java:119)
              at java.net.SocketInputStream.read(SocketInputStream.java:147)
              at java.io.DataInputStream.readShort(DataInputStream.java:323)
              at org.jboss.mq.il.uil.multiplexor.StreamDemux.pumpData(StreamDemux.java:120)
              at org.jboss.mq.il.uil.multiplexor.DemuxInputStream.read(DemuxInputStream.java:87)
              at org.jboss.mq.il.uil.multiplexor.DemuxInputStream.read(DemuxInputStream.java:122)
              at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
              at java.io.BufferedInputStream.read1(BufferedInputStream.java:225)
              at java.io.BufferedInputStream.read(BufferedInputStream.java:280)
              at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2123)
              at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2136)
              at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2607)
              at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:721)
              at java.io.ObjectInputStream.(ObjectInputStream.java:252)
              at org.jboss.mq.il.uil.UILServerILService.run(UILServerILService.java:187)
              at java.lang.Thread.run(Thread.java:539)

              • 4. Re: Port scanning crashed JBossMQ
                Jukka Lehti Newbie

                One more addition: the same exception is also thrown if I use JBoss-2.4.3.zip. (unzip, cd, sh run.sh)

                • 5. Re: Port scanning crashed JBossMQ
                  Charles Chan Newbie

                  The exception is quite okay... actually. The only problem with the code is that once an exception is raised, we should not stop the service.

                  This can be easily fixed by applying the following fix to OILServerILService.java (CVS version):

                  171d170
                  < running = false;

                  Good luck,
                  Charles

                  • 6. Re: Port scanning crashed JBossMQ
                    Charles Chan Newbie

                    This is now fixed in CVS.

                    Charles

                    • 7. Re: Port scanning crashed JBossMQ
                      Jukka Lehti Newbie

                      Hi,

                      I just build jboss-mq from CVS and the problem is fixed!

                      Thanks a lot!

                      PS. FYI:

                      /tmp/jboss-mq/server/output/classes
                      /tmp/jboss-mq/server/src/main/org/jboss/util/timeout/TimeoutFactory.java:248: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                      private void assert(boolean expr)
                      ^