Blockstream / esplora

Explorer for Bitcoin and Liquid
MIT License
991 stars 395 forks source link

Esplora is currently unavailable, please try again later. #346

Open JamesKBowler opened 2 years ago

JamesKBowler commented 2 years ago

Hello,

Trying to get the docker build working but having some issues with it.

docker run --name=esplora-01 -itd \
  --restart=always \
  --network 172.18.0.0/24 \
  --ip 172.18.0.16 \
  -p 50001:50001 \
  -p 8080:80 \
  --volume ${HOME}/esplora-01/data:/data \
  esplora \
  bash -c "/srv/explorer/run.sh bitcoin-mainnet explorer"

image

Logs from Tor which just repeats over and over.

6-Oct 23 09:19:00.564 [notice] Tor 0.3.5.16 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1d, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.8.
6-Oct 23 09:19:00.564 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
6-Oct 23 09:19:00.564 [notice] Read configuration file "/etc/tor/torrc".
6-Oct 23 09:19:00.567 [warn] Couldn't find $HOME environment variable while expanding "~/.tor"; defaulting to "".
6-Oct 23 09:19:00.567 [warn] Default DataDirectory is "~/.tor".  This expands to "/.tor", which is probably not what you want.  Using "/var/tor" instead
6-Oct 23 09:19:00.567 [warn] ControlPort is open, but no authentication method has been configured.  This means that any program on your computer can reconfigure your Tor.  That's bad!  You should upgrade your Tor controller as soon as possible.
6-Oct 23 09:19:00.567 [notice] Opening Socks listener on 127.0.0.1:9050
6-Oct 23 09:19:00.567 [notice] Opened Socks listener on 127.0.0.1:9050
6-Oct 23 09:19:00.567 [notice] Opening Control listener on 127.0.0.1:9051
6-Oct 23 09:19:00.567 [notice] Opened Control listener on 127.0.0.1:9051
6-Oct 23 09:19:00.567 [notice] Opening Control listener on 127.0.0.1:9051
6-Oct 23 09:19:00.567 [warn] Could not bind to 127.0.0.1:9051: Address already in use. Is Tor already running?
6-Oct 23 09:19:00.567 [notice] Opening Control listener on 127.0.0.1:9051
6-Oct 23 09:19:00.567 [warn] Could not bind to 127.0.0.1:9051: Address already in use. Is Tor already running?
6-Oct 23 09:19:00.567 [notice] Closing partially-constructed Socks listener on 127.0.0.1:9050
6-Oct 23 09:19:00.567 [notice] Closing partially-constructed Control listener on 127.0.0.1:9051
6-Oct 23 09:19:00.567 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
6-Oct 23 09:19:00.567 [err] Reading config failed--see warnings above.

Logs from bitcoind

4-2021-10-23T09:20:49Z Failed to open mempool file from disk. Continuing anyway.
4-2021-10-23T09:20:49Z loadblk thread exit
4-2021-10-23T09:20:49Z Leaving InitialBlockDownload (latching to false)
4-2021-10-23T09:20:50Z Pre-allocating up to position 0x3000000 in blk02775.dat
4-2021-10-23T09:20:53Z UpdateTip: new best=0000000000000000000af59f9c7ed8dc15b2c8414bb9e2ab64a65980c6769f16 height=706286 version=0x20400004 log2_work=93.133774 tx=680639397 date='2021-10-23T08:36:55Z' progress=0.999986 cache=264.6MiB(1920583txo)
4-2021-10-23T09:20:53Z UpdateTip: new best=000000000000000000067656f1ecc90412d1887801a324eec3dbebcf07182a6b height=706287 version=0x20400004 log2_work=93.133785 tx=680641968 date='2021-10-23T08:54:58Z' progress=0.999992 cache=265.0MiB(1923815txo)
4-2021-10-23T09:20:54Z UpdateTip: new best=0000000000000000000b58a663554cc0f690b77a6049e8b9827da9f0318ba2d0 height=706288 version=0x3fffe004 log2_work=93.133797 tx=680642396 date='2021-10-23T08:55:47Z' progress=0.999992 cache=265.5MiB(1928066txo)
4-2021-10-23T09:20:55Z UpdateTip: new best=0000000000000000000304b32198f02ef26ee808df54b33ad63504f646269cea height=706289 version=0x20000004 log2_work=93.133808 tx=680644164 date='2021-10-23T09:06:57Z' progress=0.999996 cache=266.1MiB(1933037txo)
4-2021-10-23T09:20:55Z Pre-allocating up to position 0x600000 in rev02775.dat
4-2021-10-23T09:20:55Z UpdateTip: new best=00000000000000000001caae21d096b4882224a51627e31cdf981fd30b57e77b height=706290 version=0x20002004 log2_work=93.133820 tx=680644973 date='2021-10-23T09:11:52Z' progress=0.999997 cache=266.4MiB(1935491txo)

Logs from electrs

2-2021-10-23T09:19:45.971+00:00 - WARN - waiting for bitcoind sync to finish: 706077/706285 blocks, verification progress: 99.941%
2-2021-10-23T09:19:51.614+00:00 - WARN - waiting for bitcoind sync to finish: 706107/706285 blocks, verification progress: 99.950%
2-2021-10-23T09:19:57.480+00:00 - WARN - waiting for bitcoind sync to finish: 706131/706285 blocks, verification progress: 99.956%
2-2021-10-23T09:20:03.293+00:00 - WARN - waiting for bitcoind sync to finish: 706143/706285 blocks, verification progress: 99.960%
2-2021-10-23T09:20:10.054+00:00 - WARN - waiting for bitcoind sync to finish: 706161/706285 blocks, verification progress: 99.965%
2-2021-10-23T09:20:15.843+00:00 - WARN - waiting for bitcoind sync to finish: 706179/706285 blocks, verification progress: 99.968%
2-2021-10-23T09:20:21.860+00:00 - WARN - waiting for bitcoind sync to finish: 706191/706285 blocks, verification progress: 99.972%
2-2021-10-23T09:20:27.304+00:00 - WARN - waiting for bitcoind sync to finish: 706203/706285 blocks, verification progress: 99.975%
2-2021-10-23T09:20:33.682+00:00 - WARN - waiting for bitcoind sync to finish: 706221/706285 blocks, verification progress: 99.981%
2-2021-10-23T09:20:39.032+00:00 - WARN - waiting for bitcoind sync to finish: 706245/706285 blocks, verification progress: 99.987%
2-2021-10-23T09:20:46.081+00:00 - WARN - waiting for bitcoind sync to finish: 706275/706285 blocks, verification progress: 99.995%
2-2021-10-23T09:20:53.095+00:00 - WARN - waiting for bitcoind sync to finish: 706286/706290 blocks, verification progress: 99.999%
2-2021-10-23T09:22:48.902+00:00 - INFO - hash=00000000000000000001caae21d096b4882224a51627e31cdf981fd30b57e77b height=706290 @ 2021-10-23T09:11:52Z (706291 left to index)

Is this log anything to be concered about? Failed to open mempool file from disk. Continuing anyway.

and electrs seems to be stuck at 99.999%

Thanks

JamesKBowler commented 2 years ago

Just check the the logs again.

cat esplora-01/data/logs/electrs/current

2-thread 'blkfiles_reader' panicked at 'failed to read "/data/bitcoin/blocks/blk01604.dat": Os { code: 5, kind: Other, message: "Input/output error" }', src/new_index/fetch.rs:160:41
2-note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2-Config { log: StdErrLog { verbosity: Info, quiet: false, show_level: true, timestamp: Millisecond, modules: [], writer: "stderr", color_choice: Never }, network_type: Bitcoin, db_path: "/data/electrs_bitcoin_db/mainnet/mainnet", daemon_dir: "/data/bitcoin", blocks_dir: "/data/bitcoin/blocks", daemon_rpc_addr: 127.0.0.1:8332, cookie: None, electrum_rpc_addr: 0.0.0.0:50001, http_addr: 127.0.0.1:3000, http_socket_file: Some("/var/electrs-rest.sock"), monitoring_addr: 0.0.0.0:4224, jsonrpc_import: false, light_mode: false, address_search: true, index_unspendables: false, cors: None, precache_scripts: Some("/srv/explorer/popular-scripts.txt"), utxos_limit: 500, electrum_txs_limit: 100000, electrum_banner: "Welcome to electrs-esplora 0.4.1", electrum_public_hosts: None, electrum_announce: false, tor_proxy: Some(127.0.0.1:9050) }
2-2021-10-23T13:59:59.651+00:00 - INFO - NetworkInfo { version: 210100, subversion: "/Satoshi:0.21.1/", relayfee: 0.00001 }
2-2021-10-23T13:59:59.681+00:00 - INFO - BlockchainInfo { chain: "main", blocks: 706321, headers: 706321, bestblockhash: "0000000000000000000bbf7f8e00f5d0e9ffed252073e878a8cc5fc9d2b55d97", pruned: false, verificationprogress: 0.9999991, initialblockdownload: Some(false) }
2-2021-10-23T14:03:51.026+00:00 - INFO - hash=0000000000000000000bbf7f8e00f5d0e9ffed252073e878a8cc5fc9d2b55d97 height=706321 @ 2021-10-23T13:57:07Z (706322 left to index)
JamesKBowler commented 2 years ago

whilst copying over the bitcoin blocks to another dirve I got this.

cp: error reading '/mnt/275410c1-ea0c-469b-9b01-2d5b8e0484e8/esplora-01/data/bitcoin/blocks/blk01604.dat': Input/output error
cp: error reading '/mnt/275410c1-ea0c-469b-9b01-2d5b8e0484e8/esplora-01/data/bitcoin/blocks/blk01802.dat': Input/output error

Trying something will report back, but ultimately I think they are corrupt.. like the FED. Also I'm not 100% sure electrs has finished indexing either.

philippem commented 2 years ago

As a workaround, are you able to delete everything in ${HOME}/esplora-01/data and recreate the container?

druonn commented 2 years ago

recreate and check availability of free space

renie commented 1 year ago

Same happens to me. My logs are basically the same also: electr stuck around 99% verification, tor not able to bind, and web app saying "Esplora is currently unavailable, please try again later.". I've recreated the path and container twice. There is plenty of free space, some TB.

Is there still anybody trying to fix that?