I have my lightningd on logrotate with a killall -s SIGHUP lightningd. The logrotate is set up to rotate once a day at midnight. lightningd does the log rotation correctly on SIGHUP once, but the second one kills it.
Nov 28 11:24:09 server systemd[1]: Starting C-Lightning Daemon...
Nov 28 11:24:19 server systemd[1]: Started C-Lightning Daemon.
Nov 30 00:00:14 server systemd[1]: lightningd.service: Main process exited, code=killed, status=1/HUP
Nov 30 00:00:14 server systemd[1]: lightningd.service: Succeeded.
Nov 30 00:00:44 server systemd[1]: lightningd.service: Service RestartSec=30s expired, scheduling restart.
Nov 30 00:00:44 server systemd[1]: lightningd.service: Scheduled restart job, restart counter is at 1.
Nov 30 00:00:44 server systemd[1]: Stopped C-Lightning Daemon.
Nov 30 00:00:44 server systemd[1]: Starting C-Lightning Daemon...
Nov 30 00:00:51 server systemd[1]: Started C-Lightning Daemon.
Dec 02 00:00:07 server systemd[1]: lightningd.service: Main process exited, code=killed, status=1/HUP
Dec 02 00:00:07 server systemd[1]: lightningd.service: Succeeded.
Dec 02 00:00:37 server systemd[1]: lightningd.service: Service RestartSec=30s expired, scheduling restart.
Dec 02 00:00:37 server systemd[1]: lightningd.service: Scheduled restart job, restart counter is at 2.
Dec 02 00:00:37 server systemd[1]: Stopped C-Lightning Daemon.
Dec 02 00:00:37 server systemd[1]: Starting C-Lightning Daemon...
Dec 02 00:00:42 server systemd[1]: Started C-Lightning Daemon.
Looking at the logs, at the top of the log of odd-numbered days:
2020-12-01T00:00:09.445Z INFO lightningd: Started log due to SIGHUP
But on logs of even-numbered days:
2020-12-02T00:00:38.204Z INFO connectd: Static Tor service onion address: "<secret>.onion:9735,127.0.0.1:9735" bound from extern port 9735
2020-12-02T00:00:38.357Z INFO plugin-bcli: bitcoin-cli initialized and connected to bitcoind.
2020-12-02T00:00:42.320Z INFO lightningd: --------------------------------------------------
2020-12-02T00:00:42.320Z INFO lightningd: Server started with public key <secret>, alias <secret> (color #<secret>) and lightningd 0.9.2
Version is the 0.9.2 release, unmodified.
I have my
lightningdonlogrotatewith akillall -s SIGHUP lightningd. Thelogrotateis set up to rotate once a day at midnight.lightningddoes the log rotation correctly onSIGHUPonce, but the second one kills it.Looking at the logs, at the top of the log of odd-numbered days:
But on logs of even-numbered days:
Version is the 0.9.2 release, unmodified.