lightninglabs / neutrino

Privacy-Preserving Bitcoin Light Client
MIT License
900 stars 183 forks source link

If `addpeer` URL doesn't resolve, lnd is not starting #212

Closed BitcoinOG closed 3 years ago

BitcoinOG commented 3 years ago

I have several cfilter-serving peers added via addpeer. One of them recently became unavailable and since then lnd refuses to start with:

Waiting for lnd onion address...
Onion address for lnd is v3536zphvgtq5wnbhiwtkfeww2222duvxet5e2npuvtwketjedawmwid.onion
2021-01-25 16:00:48.206 [INF] LTND: Version: 0.11.1-beta commit=v0.11.1-beta, build=production, logging=default
2021-01-25 16:00:48.206 [INF] LTND: Active chain: Bitcoin (network=mainnet)
2021-01-25 16:00:48.206 [INF] LTND: Opening the main database, this might take a few minutes...
2021-01-25 16:00:48.206 [INF] LTND: Opening bbolt database, sync_freelist=false
2021-01-25 16:00:48.591 [INF] CHDB: Checking for schema update: latest_version=17, db_version=17
2021-01-25 16:00:48.591 [INF] LTND: Database now open (time_to_open=384.703952ms)!
2021-01-25 16:00:48.763 [ERR] LTND: unable to initialize neutrino backend: unable to create neutrino light client: lookup btc.asdflkjdsafsafsa.com on 192.168.1.1:53: no such host
2021-01-25 16:00:48.773 [INF] LTND: Shutdown complete

Can reliably reproduce this with lnd 0.11.1-beta.

yyforyongyu commented 3 years ago

@BitcoinOG Thanks for posting this issue!

This is due to the bug that in a previous version of neutrino, when looking up host for one of the peers failed, the whole neutrino initialization would exit. It was fixed in this PR #208 . And upgrading your lnd to the latest version will make it go away.