Lnd: LND fails after unlocking wallet (panic: runtime error: invalid memory address or nil pointer dereference)

Created on 22 Mar 2018  路  5Comments  路  Source: lightningnetwork/lnd

After I unlock my wallet, I get this error anytime I try to run a lncli command:

[lncli] rpc error: code = Unavailable desc = grpc: the connection is unavailable

This is what I'm seeing in my logs:

Mar 22 15:24:34 thundroid lnd[667]: 2018-03-22 15:24:34.423 [INF] CHDB: Checking for schema update: latest_version=0, db_version=0
Mar 22 15:24:34 thundroid lnd[667]: 2018-03-22 15:24:34.549 [INF] RPCS: password RPC server listening on 127.0.0.1:10009
Mar 22 15:24:34 thundroid lnd[667]: 2018-03-22 15:24:34.549 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080
Mar 22 15:24:34 thundroid lnd[667]: 2018-03-22 15:24:34.550 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create wallet, or lncli unlock to unlock already created wallet.
Mar 22 15:32:59 thundroid lnd[667]: 2018-03-22 15:32:59.367 [INF] LNWL: Opened wallet
Mar 22 15:32:59 thundroid lnd[667]: 2018-03-22 15:32:59.536 [ERR] SRVR: invalid password
Mar 22 15:32:59 thundroid lnd[667]: panic: runtime error: invalid memory address or nil pointer dereference
Mar 22 15:32:59 thundroid systemd[1]: lnd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 22 15:32:59 thundroid systemd[1]: lnd.service: Unit entered failed state.
Mar 22 15:32:59 thundroid systemd[1]: lnd.service: Failed with result 'exit-code'.

I notice that the log says "invalid password", but in terminal it's showing:

Input wallet password:

lnd successfully unlocked!

Any idea what could have gone wrong?

I tried creating a new wallet password (but using the same seed that lnd gave me the first time), and this issue still persists.

macaroons

Most helpful comment

Yes :)

For anyone else who experiences this same issue: looks like this was caused by switching from testnet to mainnet. When I deleted macaroons.db, admin.macaroons, and readonly.macaroons, then no more errors after that.

All 5 comments

How much memory does what machine you're running on have? Does it have any swap?

What's the full panic trace?

Memory on my machine is 1994 MB, and only about 25% of it is being used.

I disabled Swap because the operating system is running from an SD card (the node is on an odroid).

I don't know what a full panic trace is, nor how I can retrieve it 馃槄

Was this resolved?

Yes :)

For anyone else who experiences this same issue: looks like this was caused by switching from testnet to mainnet. When I deleted macaroons.db, admin.macaroons, and readonly.macaroons, then no more errors after that.

Was this page helpful?
0 / 5 - 0 ratings