When starting the daemon without a log-file config entry and also no --log-file parameter, but a '~/.lightning/plugins' directory with at least one plugin (in my case just summary.py) I run into a startup issue where the shipped C plugins (e.g. txprepare) try to parse log stdout from the plugin log as JSON RPC data, which crashes the startup. This only happens when the --daemon flag is set:
Startup output
[will@will-lap lightning.git ((6b8ead036...))]$ ./lightningd/lightningd --testnet --daemon
2020-11-03T10:23:57.702Z INFO plugin-bcli: bitcoin-cli initialized and connected to bitcoind.
2020-11-03T10:23:57.723Z INFO lightningd: --------------------------------------------------
2020-11-03T10:23:57.723Z INFO lightningd: Server started with public key 03f564e28e3b6fb5d954062c2f43cec4c348b9f5dde0a8a77dc8f93c26f481eaf8, alias SILENTBEAM-v0.9.1-259-g6b8ead0 (color #03f564) and lightningd v0.9.1-259-g6b8ead0
txprepare: Failed to parse RPC JSON response '2020-11-03T10:23:57.729Z INFO plugin-summary.py: Plugin summa'
Issue and Steps to Reproduce
When starting the daemon without a
log-file
config entry and also no--log-file
parameter, but a '~/.lightning/plugins' directory with at least one plugin (in my case justsummary.py
) I run into a startup issue where the shipped C plugins (e.g.txprepare
) try to parse log stdout from the plugin log as JSON RPC data, which crashes the startup. This only happens when the--daemon
flag is set:Startup output