lightning icon indicating copy to clipboard operation
lightning copied to clipboard

Minor issue/question: Trailing spaces in Config file parameter make CLN fail to start

Open BTCBellyButton opened this issue 1 year ago • 8 comments

Issue

I recently updated my config file and there were a couple of trailing spaces at the end of the line that I didn't notice. I didn't need the changes right away so I didn't restart CLN after modifying the config file. Today I finally had to restart CLN service and it kept failing. I did change Bitcoin to Bitcoin Knots and I thought that could be the reason and it took me awhile before realizing that the problem wasn't Knots but the change I made to the config file few weeks ago... When I finally decided to try and run it form the CLI instead than through systemctl I saw this message and I could fixed the issue:

lightningd: Config file /mnt/md0/C-Lightning/config line 24: autoclean-failedforwards-age=1296000 : '1296000 ' is not a number

So the question/proposal is: wouldn't be better to try and remove any trailing spaces from the parameters when reading the configuration file? Or at least have some warnings showing up in the systemctl status output (if it is even possible) other than a generic failure?

image

BTCBellyButton avatar Mar 07 '24 18:03 BTCBellyButton

looks like the value 1296000 is dirty and core lightning is taking it as a string, do you have any white space after the 1296000?

vincenzopalazzo avatar Mar 07 '24 19:03 vincenzopalazzo

looks like the value 1296000 is dirty and core lightning is taking it as a string, do you have any white space after the 1296000?

Yes that's what happened and why I was proposing an improvement:

So the question/proposal is: wouldn't be better to try and remove any trailing spaces from the parameters when reading the configuration file? Or at least have some warnings showing up in the systemctl status output (if it is even possible) other than a generic failure?

BTCBellyButton avatar Mar 08 '24 04:03 BTCBellyButton

Sorry miss you suggestion, could be a good option IMHO, so marking this issue as a good first issue

vincenzopalazzo avatar Mar 12 '24 11:03 vincenzopalazzo

Is this issue up for grabs ?

srikanth-iyengar avatar Mar 14 '24 02:03 srikanth-iyengar

Hello, I was curious if this issue was up for grabs? If so, could you possibly assign this issue to me?

DreadPirate07 avatar Mar 16 '24 18:03 DreadPirate07

You can go with this issue without be assigned, just feel free to open a PR @srikanth-iyengar @DreadPirate07

vincenzopalazzo avatar Mar 18 '24 11:03 vincenzopalazzo

@srikanth-iyengar @DreadPirate07 share a Sphinx Chat profile with Core Lightning and we can look to throw some bounty your way!

https://community.sphinx.chat/bounty/1747

BitcoinJiuJitsu avatar Mar 26 '24 00:03 BitcoinJiuJitsu

That's interesting

srikanth-iyengar avatar Mar 26 '24 04:03 srikanth-iyengar

I would work upon this issue. Can I get some more info regarding this issue?

SETURAJ avatar Apr 18 '24 21:04 SETURAJ

@BitcoinJiuJitsu looks like this issue has been fixed and closed, but the Sphinx bounty is still active, FYI...

https://community.sphinx.chat/p/clt2n32tu2rjujq1jn6g/bounties/1747/8

aaroncarlucci avatar Oct 15 '24 15:10 aaroncarlucci