ExchangeUnion / xud-docker

Streamlined setup of xud and all dependencies via docker 🐳
https://docs.exchangeunion.com
GNU Affero General Public License v3.0
5 stars 5 forks source link

[simnet] lndbtc_1 exits with "unable to start server: -1: Block number out of range" #7

Closed kilrau closed 5 years ago

kilrau commented 5 years ago
kilrau@K-Yoga:~/xud-docker/xud-simnet$ docker-compose up -d
Creating network "xud-simnet_default" with the default driver
Creating xud-simnet_ltcd_1   ... done
Creating xud-simnet_btcd_1 ... done
Creating xud-simnet_lndbtc_1 ... done
Creating xud-simnet_lndltc_1 ... done
Creating xud-simnet_ctl_1    ... done
Creating xud-simnet_xud_1    ... done
kilrau@K-Yoga:~/xud-docker/xud-simnet$ docker-compose ps
       Name                      Command               State                         Ports                      
----------------------------------------------------------------------------------------------------------------
xud-simnet_btcd_1     ./entrypoint.sh --addpeer= ...   Up       0.0.0.0:18556->18556/tcp                        
xud-simnet_ctl_1      /bin/sh -c python a.py           Up                                                       
xud-simnet_lndbtc_1   ./entrypoint.sh                  Exit 1                                                   
xud-simnet_lndltc_1   ./entrypoint.sh                  Up       0.0.0.0:20009->10009/tcp                        
xud-simnet_ltcd_1     ./entrypoint.sh --addpeer= ...   Up       0.0.0.0:19556->18556/tcp                        
xud-simnet_xud_1      /bin/sh -c ./entrypoint.sh       Up       0.0.0.0:18885->8885/tcp, 0.0.0.0:18886->8886/tcp
kilrau@K-Yoga:~/xud-docker/xud-simnet$ docker-compose logs -f lndbtc
Attaching to xud-simnet_lndbtc_1
lndbtc_1  | 2019-05-23 10:06:58.471 [WRN] LTND: open /root/.lnd/lnd.conf: no such file or directory
lndbtc_1  | 2019-05-23 10:06:58.471 [INF] LTND: Version: 0.5.0-beta commit=v0.4.2-beta-1254-g13afd0b4de30c2ddb752b0095fcda3e53c01fc7e, build=production, logging=default
lndbtc_1  | 2019-05-23 10:06:58.472 [INF] LTND: Active chain: Bitcoin (network=simnet)
lndbtc_1  | 2019-05-23 10:06:58.472 [INF] CHDB: Checking for schema update: latest_version=6, db_version=6
lndbtc_1  | 2019-05-23 10:06:58.569 [INF] LTND: Primary chain is set to: bitcoin
lndbtc_1  | 2019-05-23 10:06:59.978 [INF] LNWL: Opened wallet
lndbtc_1  | 2019-05-23 10:07:06.187 [INF] LNWL: The wallet has been unlocked without a time limit
lndbtc_1  | 2019-05-23 10:07:06.187 [INF] LTND: LightningWallet opened
lndbtc_1  | 2019-05-23 10:07:06.187 [INF] LNWL: Catching up block hashes to height 275932, this will take a while...
lndbtc_1  | 2019-05-23 10:07:06.195 [INF] LNWL: Caught up to height 80000
lndbtc_1  | 2019-05-23 10:07:06.196 [INF] HSWC: Restoring in-memory circuit state from disk
lndbtc_1  | 2019-05-23 10:07:06.198 [INF] HSWC: Payment circuits loaded: num_pending=0, num_open=0
lndbtc_1  | 2019-05-23 10:07:06.202 [INF] RPCS: RPC server listening on [::]:10009
lndbtc_1  | 2019-05-23 10:07:06.204 [INF] RPCS: gRPC proxy started at [::]:8080
lndbtc_1  | 2019-05-23 10:07:06.272 [INF] NTFN: New block epoch subscription
lndbtc_1  | 2019-05-23 10:07:06.272 [INF] HSWC: Starting HTLC Switch
lndbtc_1  | 2019-05-23 10:07:06.273 [INF] NTFN: New block epoch subscription
lndbtc_1  | 2019-05-23 10:07:06.273 [INF] NTFN: New block epoch subscription
lndbtc_1  | 2019-05-23 10:07:06.275 [INF] UTXN: Processing outputs from missed blocks. Starting with blockHeight=281034, to current blockHeight=275932
lndbtc_1  | 2019-05-23 10:07:06.275 [INF] UTXN: UTXO Nursery is now fully synced
lndbtc_1  | 2019-05-23 10:07:06.275 [INF] DISC: Authenticated Gossiper is starting
lndbtc_1  | 2019-05-23 10:07:06.275 [INF] BRAR: Starting contract observer, watching for breaches.
lndbtc_1  | 2019-05-23 10:07:06.275 [INF] NTFN: New block epoch subscription
lndbtc_1  | 2019-05-23 10:07:06.276 [INF] CRTR: FilteredChainView starting
lndbtc_1  | 2019-05-23 10:07:06.353 [INF] CRTR: Filtering chain using 0 channels active
lndbtc_1  | 2019-05-23 10:07:06.354 [INF] CRTR: Prune tip for Channel Graph: height=281793, hash=56e58d43984bb9f0cca1de4a8e8759c19c80383136f65e4a8a549419816f0615
lndbtc_1  | 2019-05-23 10:07:06.354 [ERR] SRVR: unable to start server: -1: Block number out of range
lndbtc_1  | 
lndbtc_1  | 2019-05-23 10:07:06.354 [INF] LTND: Shutdown complete
lndbtc_1  | -1: Block number out of range
xud-simnet_lndbtc_1 exited with code 1
kilrau commented 5 years ago

After some moments also for lndltc:

kilrau@K-Yoga:~/xud-docker/xud-simnet$ docker-compose logs -f lndltc
Attaching to xud-simnet_lndltc_1
lndltc_1  | 2019-05-23 10:06:59.617 [WRN] LTND: open /root/.lnd/lnd.conf: no such file or directory
lndltc_1  | 2019-05-23 10:06:59.617 [INF] LTND: Version: 0.5.0-beta commit=v0.4.2-beta-1254-g13afd0b4de30c2ddb752b0095fcda3e53c01fc7e, build=production, logging=default
lndltc_1  | 2019-05-23 10:06:59.617 [INF] LTND: Active chain: Litecoin (network=simnet)
lndltc_1  | 2019-05-23 10:06:59.618 [INF] CHDB: Checking for schema update: latest_version=6, db_version=6
lndltc_1  | 2019-05-23 10:06:59.756 [INF] LTND: Primary chain is set to: litecoin
lndltc_1  | 2019-05-23 10:07:01.133 [INF] LNWL: Opened wallet
lndltc_1  | 2019-05-23 10:07:32.242 [INF] LNWL: The wallet has been unlocked without a time limit
lndltc_1  | 2019-05-23 10:07:32.242 [INF] LTND: LightningWallet opened
lndltc_1  | 2019-05-23 10:07:32.242 [INF] LNWL: Catching up block hashes to height 489170, this will take a while...
lndltc_1  | 2019-05-23 10:07:32.249 [INF] HSWC: Restoring in-memory circuit state from disk
lndltc_1  | 2019-05-23 10:07:32.250 [INF] LNWL: Caught up to height 480000
lndltc_1  | 2019-05-23 10:07:32.253 [INF] HSWC: Payment circuits loaded: num_pending=0, num_open=0
lndltc_1  | 2019-05-23 10:07:32.258 [INF] RPCS: RPC server listening on [::]:10009
lndltc_1  | 2019-05-23 10:07:32.259 [INF] RPCS: gRPC proxy started at [::]:8080
lndltc_1  | 2019-05-23 10:07:32.327 [INF] HSWC: Starting HTLC Switch
lndltc_1  | 2019-05-23 10:07:32.327 [INF] NTFN: New block epoch subscription
lndltc_1  | 2019-05-23 10:07:32.327 [INF] NTFN: New block epoch subscription
lndltc_1  | 2019-05-23 10:07:32.327 [INF] NTFN: New block epoch subscription
lndltc_1  | 2019-05-23 10:07:32.327 [INF] UTXN: Processing outputs from missed blocks. Starting with blockHeight=501543, to current blockHeight=489170
lndltc_1  | 2019-05-23 10:07:32.327 [INF] UTXN: UTXO Nursery is now fully synced
lndltc_1  | 2019-05-23 10:07:32.327 [INF] DISC: Authenticated Gossiper is starting
lndltc_1  | 2019-05-23 10:07:32.327 [INF] NTFN: New block epoch subscription
lndltc_1  | 2019-05-23 10:07:32.327 [INF] BRAR: Starting contract observer, watching for breaches.
lndltc_1  | 2019-05-23 10:07:32.328 [INF] CRTR: FilteredChainView starting
lndltc_1  | 2019-05-23 10:07:32.372 [INF] CRTR: Filtering chain using 0 channels active
lndltc_1  | 2019-05-23 10:07:32.372 [INF] CRTR: Prune tip for Channel Graph: height=502040, hash=202ac345261b628e35397ffdb3b50051eaca3240fa19e93bce5ae3937e0fe293
lndltc_1  | 2019-05-23 10:07:32.373 [ERR] SRVR: unable to start server: -1: Block number out of range
lndltc_1  | 
lndltc_1  | 2019-05-23 10:07:32.373 [INF] LTND: Shutdown complete
lndltc_1  | -1: Block number out of range
xud-simnet_lndltc_1 exited with code 1
reliveyy commented 5 years ago

This is a common error when I starting lnd with the layer 1 node starting or syncing. So I just add the restart policy to always to avoid some unexpected errors crashing the lnd.

kilrau commented 5 years ago

Saw that, closing. Will reopen if I encounter it again.