Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5119

UIMA-AS: CPP wrapper fails with Exception on service shutdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0AS
    • Async Scaleout
    • None

    Description

      The UimacppServiceManagement code fails when remote C++ service terminates. The java code logs the following stack trace:

      > UimacppServiceManagement service reports shutdown DONE
      > UimacppShutdownHook sending quiesce message
      > java.net.SocketException: Socket is closed
      > at java.net.Socket.getInputStream(Socket.java:903)
      > at
      > org.apache.uima.aae.controller.UimacppServiceManagement.
      > quiesceAndStop(Uima
      > cppServiceManagement.java:88)
      > at
      > org.apache.uima.aae.controller.UimacppServiceManagement.
      > quiesceAndShutdown(
      > UimacppServiceManagement.java:397)
      > at
      > org.apache.uima.aae.controller.UimacppShutdownHook.run(
      > UimacppServiceController.java:1105)

      The UimacppServiceManagement is a communication wrapper which is used by UimacppServiceController to interact with a remote C++ process. It sends text commands to the remote using a Socket.

      In quiesceAndStop() the code sends "QUIESCEANDSTOP" command and a remote process exits immediately. After sending the command, the UimacppServiceManagement tries to read from a socket that was closed causing the exception.

      Modify code to catch SocketException and log a short message instead of dumping stack trace and returning an exception. Process terminating quickly should not be considered an error.

      Attachments

        Activity

          People

            cwiklik Jaroslaw Cwiklik
            cwiklik Jaroslaw Cwiklik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: