Title: C-Lightning-REST fails on start
Post by: BlackHatCoiner on March 09, 2022, 12:25:58 PM
What's the problem: C-Lightning-REST fails to start. Mar 09 12:14:48 raspibolt node[14132]: --- Starting the cl-rest server --- warn Mar 09 12:14:48 raspibolt node[14132]: --- cl-rest api server is ready and listening on port: 3001 --- warn Mar 09 12:14:48 raspibolt node[14132]: --- cl-rest doc server is ready and listening on port: 4001 --- warn Mar 09 12:15:13 raspibolt node[14132]: Lightning client connection closed, reconnecting error Mar 09 12:15:15 raspibolt node[14132]: Lightning client connection error error Mar 09 12:15:15 raspibolt node[14132]: node:events:504 Mar 09 12:15:15 raspibolt node[14132]: throw er; // Unhandled 'error' event Mar 09 12:15:15 raspibolt node[14132]: ^ Mar 09 12:15:15 raspibolt node[14132]: Error: connect ECONNREFUSED /home/bitcoin/.lightning/testnet/lightning-rpc Mar 09 12:15:15 raspibolt node[14132]: at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) Mar 09 12:15:15 raspibolt node[14132]: Emitted 'error' event on LightningClient instance at: Mar 09 12:15:15 raspibolt node[14132]: at Socket.<anonymous> (/home/bitcoin/c-lightning-REST/lightning-client-js.js:77:23) Mar 09 12:15:15 raspibolt node[14132]: at Socket.emit (node:events:526:28) Mar 09 12:15:15 raspibolt node[14132]: at emitErrorNT (node:internal/streams/destroy:164:8) Mar 09 12:15:15 raspibolt node[14132]: at emitErrorCloseNT (node:internal/streams/destroy:129:3) Mar 09 12:15:15 raspibolt node[14132]: at processTicksAndRejections (node:internal/process/task_queues:83:21) { Mar 09 12:15:15 raspibolt node[14132]: errno: -111, Mar 09 12:15:15 raspibolt node[14132]: code: 'ECONNREFUSED', Mar 09 12:15:15 raspibolt node[14132]: syscall: 'connect', Mar 09 12:15:15 raspibolt node[14132]: address: '/home/bitcoin/.lightning/testnet/lightning-rpc' Mar 09 12:15:15 raspibolt node[14132]: } Mar 09 12:15:15 raspibolt node[14132]: Node.js v17.5.0 Mar 09 12:15:15 raspibolt systemd[1]: c-lightning-REST.service: Main process exited, code=exited, status=1/FAILURE Mar 09 12:15:15 raspibolt systemd[1]: c-lightning-REST.service: Failed with result 'exit-code' I have a Lightning node[1] running fine in testnet and I recently installed Ride The Lightning (https://github.com/Ride-The-Lightning), which is a comfortable web browser app. After an unfortunate RPi shutdown, I can't understand what have gone wrong, but when I start the service, it prompts me the above. I'm having this issue a week now and I haven't figured out anything despite of all the restarts and re-edits I've done. Everything else (bitcoind, lightningd, tor etc.) works properly.
[1] 032ce2dde49164118420ff73062e4d6c8a155df47251c24fc185e09337c241fd7d@xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:9735
Title: Re: C-Lightning-REST fails on start
Post by: Rath_ on March 09, 2022, 12:31:19 PM
I believe that I also started having problems with the service at some point. I have been running c-lightning-rest as a plugin (https://github.com/Ride-The-Lightning/c-lightning-REST#option-2-run-as-c-lightning-plugin) without any problems since then. You should give it a try.
Title: Re: C-Lightning-REST fails on start
Post by: BlackHatCoiner on March 09, 2022, 02:01:21 PM
I believe that I also started having problems with the service at some point. I have been running c-lightning-rest as a plugin (https://github.com/Ride-The-Lightning/c-lightning-REST#option-2-run-as-c-lightning-plugin) without any problems since then. You should give it a try.
I did, but I have another problem now. Ride The Lightning considers my node as a LND one, but it's C-Lightning and I've written it in RTL-Config.json.
Title: Re: C-Lightning-REST fails on start
Post by: Rath_ on March 09, 2022, 03:49:54 PM
I did, but I have another problem now. Ride The Lightning considers my node as a LND one, but it's C-Lightning and I've written it in RTL-Config.json.
We won't be able to help you unless you share your config with us. You might have made a small mistake somewhere which causes RTL to use the default settings.
Title: Re: C-Lightning-REST fails on start
Post by: BlackHatCoiner on March 09, 2022, 05:06:38 PM
We won't be able to help you unless you share your config with us. You might have made a small mistake somewhere which causes RTL to use the default settings. { "port": "3000", "SSO": { "rtlSSO": 0, "rtlCookiePath": "", "logoutRedirectLink": "" }, "nodes": [ { "index": 1, "lnNode": "c-lightning", "lnImplementation": "CLT", "Authentication": { "macaroonPath": "/home/bitcoin/c-lightning-REST/certs/" }, "Settings": { "userPersona": "OPERATOR", "themeMode": "NIGHT", "themeColor": "PURPLE", "channelBackupPath": "/home/bitcoin/RTL/", "bitcoindConfigPath": "/mnt/ext/bitcoin/", "logLevel": "INFO", "fiatConversion": false, "lnServerUrl": "https://127.0.0.1:3003/v1" } } ], "multiPassHashed": "80cd7705a67ed19996fac8c8506cf72ac33163cf0fcc60ab0b78462a1f25554d" }
Title: Re: C-Lightning-REST fails on start
Post by: Rath_ on March 09, 2022, 05:27:31 PM
{ "lnServerUrl": "https://127.0.0.1:3003/v1"
Are you sure that port 3003 is correct? You should set it to the same value as "rest-port" in your c-lightning config. Also, try removing "/v1" as it should not be necessary.
Title: Re: C-Lightning-REST fails on start
Post by: BlackHatCoiner on March 09, 2022, 08:26:29 PM
Are you sure that port 3003 is correct? You should set it to the same value as "rest-port" in your c-lightning config. Also, try removing "/v1" as it should not be necessary. Apparently, it's not a port issue, but rather a web socket one. bitcoin@raspibolt:~/.lightning/testnet $ sudo service RTL status ● RTL.service - RTL daemon Loaded: loaded (/lib/systemd/system/RTL.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2022-03-09 19:21:50 GMT; 47min ago Main PID: 3902 (node) Tasks: 11 (limit: 4915) CGroup: /system.slice/RTL.service └─3902 /usr/bin/node /home/bitcoin/RTL/rtl.js
Mar 09 20:06:49 raspibolt node[3902]: [09/03/2022, 20:06:49] ERROR: CLWebSocket => Web socket error: socket hang up Mar 09 20:06:49 raspibolt node[3902]: [09/03/2022, 20:06:49] INFO: CLWebSocket => Web socket disconnected, will reconnect again.... Mar 09 20:07:53 raspibolt node[3902]: [09/03/2022, 20:07:53] INFO: CLWebSocket => Reconnecting to the CLightning's Websocket Server... Mar 09 20:07:53 raspibolt node[3902]: [09/03/2022, 20:07:53] INFO: CLWebSocket => Connecting to the CLightning's Websocket Server... Mar 09 20:07:53 raspibolt node[3902]: [09/03/2022, 20:07:53] ERROR: CLWebSocket => Web socket error: socket hang up Mar 09 20:07:53 raspibolt node[3902]: [09/03/2022, 20:07:53] INFO: CLWebSocket => Web socket disconnected, will reconnect again.... Mar 09 20:08:57 raspibolt node[3902]: [09/03/2022, 20:08:57] INFO: CLWebSocket => Reconnecting to the CLightning's Websocket Server... Mar 09 20:08:57 raspibolt node[3902]: [09/03/2022, 20:08:57] INFO: CLWebSocket => Connecting to the CLightning's Websocket Server... Mar 09 20:08:57 raspibolt node[3902]: [09/03/2022, 20:08:57] ERROR: CLWebSocket => Web socket error: socket hang up Mar 09 20:08:57 raspibolt node[3902]: [09/03/2022, 20:08:57] INFO: CLWebSocket => Web socket disconnected, will reconnect again.... From a sudo service lightningd status I get: Warning: The unit file, source configuration file or drop-ins of lightningd.service changed on disk. Run 'systemctl daem ● lightningd.service - C-Lightning daemon Loaded: loaded (/lib/systemd/system/lightningd.service; enabled; vendor preset: enabled) Active: activating (start) since Wed 2022-03-09 20:25:31 GMT; 606ms ago Cntrl PID: 9912 (lightningd) Tasks: 13 (limit: 4915) CGroup: /system.slice/lightningd.service ├─9912 /usr/local/bin/lightningd --daemon --conf /home/bitcoin/.lightning/testnet/lightningd.conf --plugin=/h ├─9916 /usr/local/bin/lightningd --daemon --conf /home/bitcoin/.lightning/testnet/lightningd.conf --plugin=/h ├─9917 /usr/local/bin/../libexec/c-lightning/plugins/autoclean ├─9918 /usr/local/bin/../libexec/c-lightning/plugins/bcli ├─9919 /usr/local/bin/../libexec/c-lightning/plugins/fetchinvoice ├─9920 /usr/local/bin/../libexec/c-lightning/plugins/funder ├─9921 /usr/local/bin/../libexec/c-lightning/plugins/topology ├─9922 /usr/local/bin/../libexec/c-lightning/plugins/keysend ├─9923 /usr/local/bin/../libexec/c-lightning/plugins/offers ├─9924 /usr/local/bin/../libexec/c-lightning/plugins/pay ├─9925 /usr/local/bin/../libexec/c-lightning/plugins/txprepare └─9926 /usr/local/bin/../libexec/c-lightning/plugins/spenderp
Mar 09 20:25:31 raspibolt systemd[1]: Starting C-Lightning daemon... Mar 09 20:25:32 raspibolt lightningd[9912]: # Mar 09 20:25:32 raspibolt lightningd[9912]: # Fatal error in , line 0 Mar 09 20:25:32 raspibolt lightningd[9912]: # Check failed: reservation_.SetPermissions(protect_start, protect_size, per Mar 09 20:25:32 raspibolt lightningd[9912]: # Mar 09 20:25:32 raspibolt lightningd[9912]: #FailureMessage Object: 0xbecdb680 So, I'll just blame my luck and reinstall the whole thing unless you've experienced this before.
|