Start9Labs / thunderhub-startos

MIT License
2 stars 4 forks source link

Failure to connect to LND node #8

Closed elvece closed 2 years ago

elvece commented 2 years ago

Error logs when attempting to login:

2021-12-22T05:12:34.254694Z 2021-12-22 05:12:34 info [THUB]: Using tor proxy for external requests: socks://172.18.0.1:9050
2021-12-22T05:12:40.158394Z 2021-12-22 05:12:40 verbose [THUB]: No cookie path provided
2021-12-22T05:12:45.823141Z 2021-12-22 05:12:45 verbose [THUB]: No macaroon path provided
2021-12-22T05:12:52.120864Z 2021-12-22 05:12:52 info [THUB]: Saving new yaml file with hashed passwords
2021-12-22T05:12:52.133237Z 2021-12-22 05:12:52 info [THUB]: Succesfully saved
2021-12-22T05:12:52.140944Z 2021-12-22 05:12:52 info [THUB]: Server accounts that will be available: Embassy LND
2021-12-22T05:13:05.815994Z 2021-12-22 05:13:05 debug [THUB]: Correct password for account 41372044-98bb-526f-a49e-82164f240416
2021-12-22T05:13:12.736672Z 2021-12-22 05:13:12 error [THUB]: Unable to connect to this node: [ 503, 'FailedToConnectToDaemon', [length]: 2 ]

Nothing jumped out as wrong in the docker_entrypoint.sh configuration to me:

URL=lnd.embassy:10009
yq -i e ".accounts[$i] = {\"name\":\"$NAME\", \"serverUrl\":\"$URL\", \"certificatePath\":\"/mnt/lnd/tls.cert\", \"macaroonPath\":\"/mnt/lnd/admin.macaroon\" }" /root/accounts.yaml

Interestingly the macaroon files seem to be at the specified location:

root@embassy-46b2f89d:~# docker exec -it thunderhub.embassy /bin/bash
bash-5.0# ls -la /mnt/lnd
total 44
drwxr-xr-x 2 root root 4096 Dec 22 04:17 .
drwxr-xr-x 1 root root 4096 Dec 22 06:09 ..
-rw------- 1 root root  280 Dec 22 06:11 admin.macaroon
-rw-r--r-- 1 root root   83 Dec 22 06:11 chainnotifier.macaroon
-rw-r--r-- 1 root root  132 Dec 22 06:11 invoice.macaroon
-rw-r--r-- 1 root root   91 Dec 22 06:11 invoices.macaroon
-rw-r--r-- 1 root root  199 Dec 22 06:11 readonly.macaroon
-rw-r--r-- 1 root root   91 Dec 22 06:11 router.macaroon
-rw-r--r-- 1 root root   92 Dec 22 06:11 signer.macaroon
-rw-r--r-- 1 root root  895 Dec 22 06:11 tls.cert
-rw-r--r-- 1 root root  114 Dec 22 06:11 walletkit.macaroon

That's all I've got for preliminary debugging.

chrisguida commented 2 years ago

I think I actually saw this just now on my 0.2 node. It cleared up on the next try. Can you try TH again a couple of times so I can see if this is the same issue?

chrisguida commented 2 years ago

Recreated on 0.2 -> 0.3 migration. Uninstalled TH and installed fresh. Problem still exists. I think it might be an issue with the macaroons or cert LND is generating.

chrisguida commented 2 years ago

Macaroons and cert seem fine since RTL works just fine. Not sure what else it could be, unless it's a problem with the gRPC interface

chrisguida commented 2 years ago

Fixed by https://github.com/Start9Labs/lnd-wrapper/commit/56a59596efe497e2927515c2f96dc7962abda6f4