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

Errors on starting LND #185

Closed
jleo84 opened this issue Dec 4, 2020 · 3 comments
Closed

Errors on starting LND #185

jleo84 opened this issue Dec 4, 2020 · 3 comments

Comments

@jleo84
Copy link

jleo84 commented Dec 4, 2020

Hello,

In chapter "18.2 - Interlude Accessing a Second Lightning Node", I am getting the following error message when execute lncli --network=testnet create command:

[lncli] unable to generate seed: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:10009: connect: connection refused"

And if I run the command: lncli --network=testnet getinfo, I get the message:

[lncli] unable to read macaroon path (check the network setting!): open /home/standup/.lnd/data/chain/bitcoin/testnet/admin.macaroon: no such file or directory

The log has some error messages:

standup@ubuntu:~$ sudo journalctl -u lnd -f -n20
-- Logs begin at Tue 2020-12-01 05:26:06 PST. --
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.468 [INF] LTND: Opening bbolt database, sync_freelist=false
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.472 [INF] CHDB: Checking for schema update: latest_version=17, db_version=17
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.472 [INF] LTND: Database now open (time_to_open=3.32664ms)!
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.481 [INF] RPCS: password RPC server listening on 127.0.0.1:10009
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.481 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.481 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create a wallet, `lncli unlock` to unlock an existing wallet, or `lncli changepassword` to change the password of an existing wallet and unlock it.
Dec 04 00:40:46 ubuntu systemd[1]: Stopping LND Lightning Network Daemon...
Dec 04 00:40:46 ubuntu lncli[5094]: [lncli] open /var/lib/lnd/tls.cert: no such file or directory
Dec 04 00:40:46 ubuntu systemd[1]: lnd.service: Control process exited, code=exited, status=1/FAILURE
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.929 [INF] LTND: Received terminated
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.929 [INF] LTND: Shutting down...
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.929 [INF] LTND: Gracefully shutting down.
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.930 [ERR] LTND: unable to set up wallet password listeners: shutting down
Dec 04 00:40:46 ubuntu lnd[5083]: 2020-12-04 00:40:46.930 [INF] LTND: Shutdown complete
Dec 04 00:40:46 ubuntu lnd[5083]: unable to set up wallet password listeners: shutting down
Dec 04 00:40:46 ubuntu systemd[1]: lnd.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 00:40:46 ubuntu systemd[1]: lnd.service: Failed with result 'exit-code'.
Dec 04 00:40:46 ubuntu systemd[1]: Stopped LND Lightning Network Daemon.
Dec 04 00:40:46 ubuntu systemd[1]: Dependency failed for LND Lightning Network Daemon.
Dec 04 00:40:46 ubuntu systemd[1]: lnd.service: Job lnd.service/start failed with result 'dependency'.

I found similar issue here but with no applicable answer.

Can it be fixed ? Is there any step of tutorial missing ?

@jleo84
Copy link
Author

jleo84 commented Dec 5, 2020

I've noticed if I run /usr/bin/lnd instead of sudo systemctl start lnd, the lncli works.

Is it something related to service configuration ?

@shannona
Copy link
Collaborator

shannona commented Jan 5, 2021

That error suggests that Lightning is not connecting to Bitcoin correctly. It's most likely due to bitcoind.rpcuser and bitcoind.rpcpass being blank in ~/.lnd/lnd.conf:

bitcoind.rpcuser=
bitcoind.rpcpass=

These can be filled in as follows:

$ BITCOINRPC_USER=$(cat ~standup/.bitcoin/bitcoin.conf | grep rpcuser | awk -F = '{print $2}')
$ BITCOINRPC_PASS=$(cat ~standup/.bitcoin/bitcoin.conf | grep rpcpassword | awk -F = '{print $2}')

My top guess is that you rebooted the machine to restart Bitcoin and then didn't refill these variables, so the config creation didn't work correctly. I've rewritten the chapter a little bit so that doesn't happen.

I also found one other error regarding installation (where something wasn't sudoed), and resolved that. I've verified that the CLI commands work correct following the designated setup.

@shannona shannona closed this as completed Jan 5, 2021
@zhengjia
Copy link

Make sure you specify --rpcserver and point it to the second node.

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