I'm trying to run lighting-charge (https://github.com/ElementsProject/lightning-charge) on top of one of my 2 lightning (https://github.com/ElementsProject/lightning) instances. I am running 2 nodes using the script here: lightning/contrib/startup_regtest.sh
. This file will start a bitcoin instance as well as 2 lightning nodes (/tmp/l1-regtest
, /tmp/l2-regtest
)
I then tried to run lightning-charge with:
$ NETWORK=regtest charged --api-token super_secret_1 --ln-path ~/.lightning --db-path ~/charge1.db --port 9112
Which gives me this error:
Lightning client connection error { Error: connect ECONNREFUSED ~/.lightning
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '~/.lightning' }
events.js:183
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED ~/.lightning
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
I've also tried running it with ln-path
set to /tmp/l1-regtest/
with ps aux
I can see lightning is running with this command:
~/git/lightning/lightningd/lightningd --lightning-dir=/tmp/l1-regtest
and
~/git/lightning/lightningd/lightningd --lightning-dir=/tmp/l2-regtest
Does anyone know how to get lightning-charge
to connect to my regtest lightning node?
There are instructions on how to do this in docker in the readme file (https://github.com/ElementsProject/lightning-charge/blob/master/README.md), but it doesn't seem to work outside of docker.