obsidiansystems / ex-healthcare-claims-processing

Reference DAML application demonstrating a healthcare use case.
Apache License 2.0
0 stars 1 forks source link

Python script triggers do not get killed properly #81

Closed ApolloUnicorn closed 3 years ago

ApolloUnicorn commented 3 years ago

After https://github.com/obsidiansystems/ex-healthcare-claims-processing/commit/550764d2d35bd09a6d4f26b824553cec5a3db660, once the triggers are started they do not get killed properly. When we attempt to launch the triggers at a later point, the previous instance has some remnant that can't be killed.

12:07:40.895 [TriggerService-akka.actor.default-dispatcher-7] ERROR akka.io.TcpListener - Bind failed for TCP channel on endpoint [/127.0.0.1:8088]
java.net.BindException: [/127.0.0.1:8088] Address already in use
.
.
12:07:40.897 [TriggerService-akka.actor.default-dispatcher-10] ERROR akka.actor.LocalActorRefProvider - guardian failed, shutting down system
java.lang.RuntimeException: Server failed to start
.
.
Caused by: akka.stream.impl.io.ConnectionSourceStage$$anon$1$$anon$2: Bind failed because of java.net.BindException: [/127.0.0.1:8088] Address already in use
Caused by: java.net.BindException: [/127.0.0.1:8088] Address already in use
.
.
12:07:40.898 [TriggerService-akka.actor.default-dispatcher-10] ERROR akka.actor.OneForOneStrategy - Server failed to start
java.lang.RuntimeException: Server failed to start
.
.
Caused by: akka.stream.impl.io.ConnectionSourceStage$$anon$1$$anon$2: Bind failed because of java.net.BindException: [/127.0.0.1:8088] Address already in use
Caused by: java.net.BindException: [/127.0.0.1:8088] Address already in use
.
.
Exception in thread "shutdownHook1" java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
.
.
ERROR:root:Trigger service died unexpectedly:
None
DEBUG:damlassistant:Killing subprocess...
WARNING:damlassistant:Could not found process 29440 to kill

I was eventually able to kill it by looking for anything listed as daml in processes, but that should get killed when shutting it down in terminal.

ApolloUnicorn commented 3 years ago

@richardkapolnai-da is this something you have encountered?

richardkapolnai-da commented 3 years ago

Wow I had the impression that it was fixed, sorry for that... :disappointed: I'll try to fix this early next week. In the meantime, as a workaround, I suggest using jps to figure out what to kill (and perhaps killall java - use it at your own risk) Or, try to kill it only with Ctrl+C.

Thanks for raising this!

richardkapolnai-da commented 3 years ago

Hopefully fixed in upstream (https://github.com/digital-asset/ex-healthcare-claims-processing/pull/129). Thank you for reporting again!