[ 
https://issues.apache.org/jira/browse/UIMA-5119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jerry Cwiklik updated UIMA-5119:
--------------------------------
    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. 

  was:
The UimacppServiceManagement code fails when remote C++ service terminates with 
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. 


> UIMA-AS: CPP wrapper fails with Exception on service shutdown
> -------------------------------------------------------------
>
>                 Key: UIMA-5119
>                 URL: https://issues.apache.org/jira/browse/UIMA-5119
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>             Fix For: 2.9.0AS
>
>
> 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. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to