Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1230600

java.lang.IllegalMonitorStateException in ServerSocket.accept

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.0fcs
    • CPU:
      sparc
    • OS:
      solaris_2.4
    • Verification:
      Not verified

      Description


      Strange exception in Socket.accept. As a result I can't get a simple server that
      accepts socket connections.

      java.lang.IllegalMonitorStateException: current thread not owner
              at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:150)
              at java.net.ServerSocket.accept(ServerSocket.java:107)
              at EchoServer.main(EchoServer.java:157)

      Here is a more elaborate example: I've written server program (EchoServer)
      and a client program (EchoTest). When running these on jakarta (my machine)
      they work fine, but running them on tachyon they fail with the same error.

      Here is how you run it on tachyon:

         > rsh tachyon.eng
         > cd ~avh/public_html/echo
         > java EchoServer

      The server should say "Ready..." pretty soon.

      On the same or another machine run the client program:


         > cd ~avh/public_html/echo
         > java EchoTest tachyon.eng foo bar

      This will connect to the server which will then immediatly get an exception as described.

        Attachments

          Activity

            People

            Assignee:
            dconnellsunw David Connelly (Inactive)
            Reporter:
            ahoffsunw Arthur Hoff (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: