Open Talkless opened 2 years ago
Hey! I would like to work on this!
Got another lnd
auto-shutdown, this time I did nothing, i.e. bitcoind
is still running:
Sep 20 13:34:12 odroid-hc1 lnd[3214]: 2021-09-20 13:34:12.812 [INF] HLCK: Health check: chain backend, call: 2 failed with: health check: chain backend timed
out after: 30s, backing off for: 2m0s
...
Sep 20 13:36:42 odroid-hc1 lnd[3214]: 2021-09-20 13:36:42.859 [CRT] SRVR: Health check: chain backend failed after 3 calls
This same thing happened to me recently, shutdown due to healthcheck chain backend failed after 3 calls
. I'm also using systemd to manage lnd and my node was down for some time without my knowledge. My wish would probably be that lnd doesn't shut down in case the backend is lagging - rather it goes in an idle state and waits for the backend to come back online. However, having it shutdown with an error in case of healthcheck failure and using Restart=on-failure
would be good enough for my needs. So +1 to this feature request.
This issue repeats about 2-3 times per month:
Oh, I see I can configure health checks: https://github.com/lightningnetwork/lnd/blob/ad78ff114fd38dd392989849a50d4a000f1519d0/sample-lnd.conf#L940
Still, this issue stands, process should exit with non-successful code.
Any progress? lnd "died" while I was not at home, probably due to bitcoind being loaded too much with huge mempool we have recently:
May 09 23:12:03 odroid-hc1 lnd[2542]: 2023-05-09 23:12:03.347 [CRT] SRVR: Health check: chain backend failed after 10 calls
May 09 23:12:03 odroid-hc1 lnd[2542]: 2023-05-09 23:12:03.356 [INF] SRVR: Sending request for shutdown
Background
While troubleshooting
tor
&bitcoind
issues, I've restartedbitcoind
two times in a row, and discovered (just accidentally, as I havebitcoind
andlnd
logs tailed in the sametmux
split screen) thatlnd
is shutting itself down:systemctl status
now is:So it has
SUCCESS
status, meaningsystemd
will not restartlnd
in case of this bail out, even if I haveRestart=on-failure
, as this was not reported as failure. This is risk for "silently" losing lightning functionality...Your environment
v0.13.1-beta
Linux odroid-hc1 4.19.0-17-armmp-lpae #1 SMP Debian 4.19.194-3 (2021-07-18) armv7l GNU/Linux
v0.21.1
Steps to reproduce
Keep restarting bitcoind until
lnd
shuts down with success resultExpected behaviour
lnd
process should exit with non-zero result.Actual behaviour
lnd
exits with success result.