Bitcoin Forum
May 06, 2024, 09:29:25 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: C-Lightning-REST fails on start  (Read 105 times)
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
March 09, 2022, 12:25:58 PM
Merited by OmegaStarScream (4), ABCbits (2)
 #1

What's the problem: C-Lightning-REST fails to start.
Code:
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, 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]
Code:
032ce2dde49164118420ff73062e4d6c8a155df47251c24fc185e09337c241fd7d@xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:9735

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
1714987765
Hero Member
*
Offline Offline

Posts: 1714987765

View Profile Personal Message (Offline)

Ignore
1714987765
Reply with quote  #2

1714987765
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714987765
Hero Member
*
Offline Offline

Posts: 1714987765

View Profile Personal Message (Offline)

Ignore
1714987765
Reply with quote  #2

1714987765
Report to moderator
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
March 09, 2022, 12:31:19 PM
 #2

I believe that I also started having problems with the service at some point. I have been running c-lightning-rest as a plugin without any problems since then. You should give it a try.
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
March 09, 2022, 02:01:21 PM
 #3

I believe that I also started having problems with the service at some point. I have been running c-lightning-rest as a 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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
March 09, 2022, 03:49:54 PM
 #4

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.
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
March 09, 2022, 05:06:38 PM
 #5

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.
Code: (RTL-Config.json)
{
  "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"
}

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
March 09, 2022, 05:27:31 PM
 #6

Code: (RTL-Config.json)
{
        "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.
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
March 09, 2022, 08:26:29 PM
 #7

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.

Code:
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:
Code:
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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!