Open danielmain opened 2 years ago
Thanks @danielmain - I believe that you have found a cardano-node bug.
Daedalus needs to use ShutdownMethod.CloseFD
so that there may be clean node shutdown on Windows, and so that the node receives a shutdown message if ever the Daedalus process crashes or is killed.
The cardano-node logs will probably contain "received shutdown request" which means that the node.stop()
function has done its job.
If not, could you please add some logging around the if/else branches in doStop()
?
P.S. Here is a doc about why it isn't possible to just send a signal to cardano-node https://github.com/input-output-hk/cardano-launcher/blob/master/docs/windows-clean-shutdown.md
Reverted kill signal and added logging.
Fix that solves the issue when stopping cardano-node at the very beginning when Daedalus starts and it is synchronizing.
Issue When Daedalus is closed cardano-node is not being stopped.
Description Even though Daedalus calls node.stop nothing happens.
Problem in cardano-launcher The switch case
ServiceStatus.Started
is evaluated The problem is that theif
inside the function doStop(timeoutSeconds) is evaluated false (becausecfg.shutdownMethod == 2
) that is why in theelse
cardano-node is never stopped.Solution Adding
proc.kill('SIGTERM');
in the else.