lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.73k stars 2.09k forks source link

confusion about EOF #1396

Closed jagottsicher closed 6 years ago

jagottsicher commented 6 years ago

I am running bitcoind in a docker container it is setup nice and neat and running properly. a clightning already communicationg with it.

now I started docker run --name lnd --network container:bitcoind_mainnet -v /scratch/bitcoin/mainnet/bitcoind:/root/.bitcoin -v /scratch/bitcoin/mainnet/lnd:/root/.lnd lightninglabs/lnd lightninglabs/lnd:latest --bitcoin.active --bitcoin.mainnet --bitcoin.node=bitcoind --bitcoind.rpcuser=bitcoinrpc --bitcoind.rpcpass=2xRzXXXXXXXXXXXXXXXXXXXXXXXXXXXXjQxM --bitcoind.zmqpath=tcp://127.0.0.1:8333

as you can see I prepared for both bitcoind and lnd some scratch space to keep their data .

I could even create a wallet and unlock it, but afterwards the container crashes (better stops working. Log shows: 2018-06-15 14:25:47.688 [INF] LTND: Version 0.4.1-beta commit=d0c0e5c7c256e430696d52ac6f6d67217a7d7652 2018-06-15 14:25:47.688 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2018-06-15 14:25:47.689 [INF] CHDB: Checking for schema update: latest_version=0, db_version=0 2018-06-15 14:25:47.772 [INF] RPCS: password RPC server listening on 127.0.0.1:10009 2018-06-15 14:25:47.774 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2018-06-15 14:25:47.775 [INF] LTND: Waiting for wallet encryption password. Uselncli createto create wallet, orlncli unlockto unlock already created wallet. 2018-06-15 14:26:18.760 [INF] LTND: Version 0.4.1-beta commit=d0c0e5c7c256e430696d52ac6f6d67217a7d7652 2018-06-15 14:26:18.760 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2018-06-15 14:26:18.761 [INF] CHDB: Checking for schema update: latest_version=0, db_version=0 2018-06-15 14:26:18.845 [INF] RPCS: password RPC server listening on 127.0.0.1:10009 2018-06-15 14:26:18.848 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2018-06-15 14:26:18.848 [INF] LTND: Waiting for wallet encryption password. Uselncli createto create wallet, orlncli unlockto unlock already created wallet. 2018-06-15 14:26:34.949 [INF] LNWL: Opened wallet 2018-06-15 14:26:35.148 [INF] LTND: Primary chain is set to: bitcoin 2018-06-15 14:26:35.149 [INF] LTND: Initializing bitcoind backed fee estimator 2018-06-15 14:26:37.618 [INF] LNWL: Opened wallet unable to start wallet: EOF unable to create chain control: EOF EOF

Now I am some clueless, because my bitcoind container is forwarding 9735:9735 and 8333:8333 for communication via RPC and the clightning client, but even if I ignroe the RPC-Port requests (will take late care of) I always get this EOF. Why I can't start the wallet. I though I already created it successfully.

If I do not unlock the wallet the log shows: 2018-06-15 14:27:23.921 [INF] LTND: Version 0.4.1-beta commit=d0c0e5c7c256e430696d52ac6f6d67217a7d7652 2018-06-15 14:27:23.941 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2018-06-15 14:27:23.960 [INF] CHDB: Checking for schema update: latest_version=0, db_version=0 2018-06-15 14:27:24.046 [INF] RPCS: password RPC server listening on 127.0.0.1:10009 2018-06-15 14:27:24.047 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2018-06-15 14:27:24.048 [INF] LTND: Waiting for wallet encryption password. Uselncli createto create wallet, orlncli unlockto unlock already created wallet. root@81-7-17-202:~# 2018 Jun 15 16:27:57 81-7-17-202 PAM service(sshd) ignoring max retries; 4 > 3 2018 Jun 15 16:27:58 81-7-17-202 PAM service(sshd) ignoring max retries; 4 > 3 2018 Jun 15 16:28:38 81-7-17-202 PAM service(sshd) ignoring max retries; 4 > 3 2018 Jun 15 16:28:38 81-7-17-202 PAM service(sshd) ignoring max retries; 4 > 3 2018 Jun 15 16:28:41 81-7-17-202 PAM service(sshd) ignoring max retries; 4 > 3 What am I missing here? feeling like I will facepalm later, but at the moment I am thankful for an explainantion.

Roasbeef commented 6 years ago

It's unable to connect to the bitcoind instance. Make sure that your bitcoind has been compiled with zmq, and is also listening on the proper ports. It looks like the issue here is networking between your containers, not lnd itself from what I can gather.

jagottsicher commented 6 years ago

thanks for the push into that direction. I'll check that and learn about zmq to deal with the ports and establish a proper connectivity between the containers.