question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to use docker image

See original GitHub issue

Hey there, thanks for releasing this!

In the README it says the docker image contains bitcoind, c-lightning and charged – I am getting quite a few lightning-rpc errors though?

Here’s my docker-compose.yml:

version: '2'
services:
  charge:
    image: shesek/lightning-charge
    volumes:
      - ~/.lightning:/root.lightning
      - ~/.bitcoin:/root/.bitcoin
      - ~/.charged/charge.db:/opt/charged/sqlite.db
    environment:
      - API_TOKEN=tacquitos
    ports:
      - 9112:9112

And here’s the output I’m getting when trying to make an invoice:

charge_1  | 2018-01-17T05:31:58.274Z lightning-client #1 --> invoice ["10000","NFOcWboDN0Z~KxMQezbbh","Lightning Charge Invoice",null]
charge_1  | Lightning client connection error Error: This socket is closed
charge_1  |     at Socket._writeGeneric (net.js:726:18)
charge_1  |     at Socket._write (net.js:786:8)
charge_1  |     at doWrite (_stream_writable.js:387:12)
charge_1  |     at writeOrBuffer (_stream_writable.js:373:5)
charge_1  |     at Socket.Writable.write (_stream_writable.js:290:11)
charge_1  |     at Socket.write (net.js:704:40)
charge_1  |     at Promise (/opt/charged/node_modules/lightning-client/index.js:149:30)
charge_1  |     at new Promise (<anonymous>)
charge_1  |     at clientConnectionPromise.then (/opt/charged/node_modules/lightning-client/index.js:137:25)
charge_1  |     at <anonymous>
charge_1  |     at process._tickCallback (internal/process/next_tick.js:188:7)
charge_1  | 2018-01-17T05:32:11.173Z lightning-client Trying to reconnect...
charge_1  | Lightning client connection error { Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
charge_1  |     at Object._errnoException (util.js:1022:11)
charge_1  |     at _exceptionWithHostPort (util.js:1044:20)
charge_1  |     at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
charge_1  |   code: 'ECONNREFUSED',
charge_1  |   errno: 'ECONNREFUSED',
charge_1  |   syscall: 'connect',
charge_1  |   address: '/root/.lightning/lightning-rpc' }
charge_1  | 2018-01-17T05:32:11.179Z lightning-client Trying to reconnect...
charge_1  | Lightning client connection error { Error: connect ECONNREFUSED /root/.lightning/lightning-rpc
charge_1  |     at Object._errnoException (util.js:1022:11)
charge_1  |     at _exceptionWithHostPort (util.js:1044:20)
charge_1  |     at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
charge_1  |   code: 'ECONNREFUSED',
charge_1  |   errno: 'ECONNREFUSED',
charge_1  |   syscall: 'connect',
charge_1  |   address: '/root/.lightning/lightning-rpc' }

Thanks again for all the hard work, so excited to use this!

EDIT:

If it helps, I can successfully ping the server normally to check for invoices, and get an empty list back:

$ curl -u api-token:tacquitos http://hotness:9112/invoices
[]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:30 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
shesekcommented, Jan 26, 2018

The lightning directory is at /data/lightning, you should use lightning-cli --lightning-dir=/data/lightning getpeers.

You can also set alias lnc=lightning-cli --lightning-dir=/data/lightning, then run commands with lnc getpeers.

1reaction
yayitsweicommented, Jan 21, 2018

Thanks Nadav!

On Sat, Jan 20, 2018 at 3:41 PM Nadav Ivgi notifications@github.com wrote:

lightning-charge@0.2.0-beta.5 was released on npm and docker (image digest: 563a79de9c1e5a9edb070e5a6d1ce06cb11707e3b1f3cadfde74a009e9a4cdb1).

Closing this issue, let me know if you need any other help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ElementsProject/lightning-charge/issues/9#issuecomment-359211040, or mute the thread https://github.com/notifications/unsubscribe-auth/AANQBqsGVarIrFmjwREJsBMwe8A8-DSOks5tMnmegaJpZM4Rg1IR .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use Docker Images, Containers and Dockerfiles
Building our image​​ The way to build an image from a Dockerfile is to run build on the command line. The following command...
Read more >
Run your image as a container - Docker Documentation
To run an image inside of a container, we use the docker run command. The docker run command requires one parameter and that...
Read more >
What is a Docker Image? Introduction and use cases
A Docker image is a file used to execute code in a Docker container. Docker images act as a set of instructions to...
Read more >
Understanding and Building Docker Images - JFrog
A Docker image is a read-only template that contains a set of instructions for creating a container that can run on the Docker...
Read more >
A Docker Tutorial for Beginners
You can use the docker images command to see a list of all images on your system. ... Now we can run as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found