Running bitcoind process should be stopped through its RPC interface, by running
bitcoind -conf=/etc/bitcoin/bitcoin.conf stop
Existing initscript does not do it, and it fails to stop bitcoind process.
Steps to Reproduce:
1. Start properly configured bitcoind by /etc/init.d/bitcoind start
2. Try to stop it /etc/init.d/bitcoind stop (it will time out)
Bitcoind process keeps normally running and must be killed or stopped manually via RPC.
Bitcoind process shiould cleanly finish.
CC: email@example.com did not match anything
Please fix metadata.xml.
(In reply to comment #1)
> CC: firstname.lastname@example.org did not match anything
> Please fix metadata.xml.
@jer metadata fixed in all packages that should cc luke-jr
@luke-jr. This looks like an easy fix. However, looking at the init script, I think you can safely remove the backwards compat functions start_baselayout() and stop_baselayout(), and then collapse back start_openrc() and stop_openrc() into start() and stop() respectively.
I am not sure if the bitcoin rpc command should be used to stop bitcoind since it only queues the stop action and returns immediately. This is definitely not what you want on system shutdown as it could cause the bitcoind process to be terminated while it's in the process of shutdown.
I have increased the wait argument given start-stop-daemon to 120 seconds for bitcoind shutdown. But it seems that start-stop-daemon does not respect this setting sometimes:
+ start-stop-daemon --stop --user bitcoin --name bitcoind --pidfile /var/run/bitcoind.pid --wait 120000 --progress
* start-stop-daemon: 1 process refused to stop
+ eend 1 [ !! ]
+ exit 1
* ERROR: bitcoind failed to stop
Every . (dot) in the start-stop-daemon progress bar is equal to 1 second, this means that start-stop-daemon did only wait for about 6 seconds. Not sure if this is a bug or a feature within start-stop-daemon.
-w, --wait <arg> Milliseconds to wait for daemon start
I don't see a way to wait longer for stop...
Either openrc's start-stop-daemon implements -w also in when called with --stop OR we could copy the behavior if squids initd script shutdown.
I guess this can be closed without fix, newer bitcoind versions usually respond much faster to termination request.
(In reply to Juraj Variny from comment #6)
> I guess this can be closed without fix, newer bitcoind versions usually
> respond much faster to termination request.
Closing as OBSOLETE, reopen if issue still happens