Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shesek/lightning-charge:standalone - unable to start #68

Closed
jaro2k opened this issue Nov 28, 2019 · 8 comments
Closed

shesek/lightning-charge:standalone - unable to start #68

jaro2k opened this issue Nov 28, 2019 · 8 comments

Comments

@jaro2k
Copy link

jaro2k commented Nov 28, 2019

I'm searching for advise..
I'm running bitcoin node and c-lightning in separate containers and I'm trying to get them integrated with lightning-charge running in third container.
All 3 containers are on the same host.

following the document from this project I have mapped:
/etc/lightning -> /root/.lightning
and I mounted /root/.lightning file-system from c-lightning container to the lightning-charge container.

When container starts it throws the following error:

Using lightningd directory mounted in /etc/lightning... waiting for RPC unix socket... bin/docker-entrypoint.sh: line 71: inotifywait: command not found

Starting Lightning Charge
Lightning client connection error { Error: connect ENOENT /etc/lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'connect',
address: '/etc/lightning/lightning-rpc' }
events.js:183
throw er; // Unhandled 'error' event
^

Error: connect ENOENT /etc/lightning/lightning-rpc
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

@shesek
Copy link
Contributor

shesek commented Nov 28, 2019

It seems like lightning charge was unable to find the c-lightning rpc socket in /etc/lightning/lightning-rpc. Was your c-lightning node already running when you started the lightning charge container?

Lightning charge should normally wait for the c-lightning socket file to appear if its not there when starting up (to support starting charge while c-lightning is still warming up), but there was a bug preventing this from working, which was causing the error you were seeing. 43973f4 should fix this, I'll be releasing this in v0.4.12 soon.

@shesek
Copy link
Contributor

shesek commented Nov 28, 2019

0.4.12 is released and available on docker hub, can you try again and verify this fixed the issue?

@shesek shesek reopened this Nov 28, 2019
@jaro2k
Copy link
Author

jaro2k commented Nov 28, 2019

thank you! I managed to move on slightly.. but there is still a problem..
I mounted filesystem from bitcoin container to mount-point: /etc/bitcoin
and filesystem from lightning container to mount-point: /etc/lightning as instructed in documentation..

This is the output from container startup:

Using lightningd directory mounted in /etc/lightning...
Starting Lightning Charge
undefined:1
{ "jsonrpc": "2.0", "id" : "1", "result" :

SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Interface.LightningClient.rl.on.line (/opt/charged/node_modules/clightning-client/index.js:60:29)
at emitOne (events.js:116:13)
at Interface.emit (events.js:211:7)
at Interface._onLine (readline.js:280:10)
at Interface._normalWrite (readline.js:422:12)
at Socket.ondata (readline.js:139:10)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at Pipe.onread (net.js:601:20)

Maybe I'm doing something fundamentally wrong..

@shesek
Copy link
Contributor

shesek commented Nov 28, 2019

Which version of c-lightning are you running?

Also, note that you don't need to mount in the bitcoin's datadir if you're mounting lightning's.

@jaro2k
Copy link
Author

jaro2k commented Nov 28, 2019

v.0.7.0
the issue before you helped me with was caused by the fact that I had incorrect mount-point /etc/lightning set so your assumption was correct when you asked me whether c-lightning is up and running. It was up but it was not accessible.
I believe my mounting-point is correct now.. but since then I'm getting this issue.
I can removed /etc/bitcoin to make it more correct.

I need to say that this containers are running on top of NAS from QNAP and I'm mounting the file-system of c-lightning as a share:
/etc/lightning -> /share/docker/c-lightning-1 Read/Write

am I able to turn some level of debug logging via Environment-params ? maybe I can find out more that way..

@shesek
Copy link
Contributor

shesek commented Nov 29, 2019

I'm not aware of any specific issues that should prevent charge from working with c-lightning v0.7.0, but would it be possible to update to the latest version (v0.7.3) and see if the issue persists? There were lots of major improvements and bug fixes since v0.7.0, so you should probably update anyway :)

@jaro2k
Copy link
Author

jaro2k commented Nov 30, 2019

It works! :)
issue was gone ones c-lightning got upgraded from 0.7.0 to 0.7.3, see output:

curl $CHARGE/info
{"id":"02ca4c46faa50b2d961f4ad2e9d00c90826077b6a282b71079a88cb29a34b8c84a"...}

@shesek, thank you so much for your support and your effort.. I'm happy to join your LN node.. you can find me at: 02ca4c46faa50b2d961f4ad2e9d00c90826077b6a282b71079a88cb29a34b8c84a@178.143.52.84:9735

issue can be closed. Cheers!

@jaro2k jaro2k closed this as completed Dec 1, 2019
@robertclarkson
Copy link

@jaro2k I'm trying to do this as well. Is there any chance you'd share your docker-compose.yml? Any help much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants