2

I work for a corporation therefore work behind a corporate firewall. I login to their vpn then I access company resources like mails, IMs etc. As a internal team project, I'm trying to setup a btc full node on a k8s platform. I created a local docker image using a simple dockerfile (very simplified version of https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.21/Dockerfile), where I extract btc core binary and execute bitcoind. When I run the container (and bitcoind inside it), I see it abruptly stops after dns seed query. Below is log

2021-11-03T18:16:34Z Bitcoin Core version v22.0.0 (release build)
2021-11-03T18:16:34Z Assuming ancestors of block 00000000000000000008a89e854d57e5667df88f1cdef6fde2fbca1de5b639ad have valid signatures.
2021-11-03T18:16:34Z Setting nMinimumChainWork=00000000000000000000000000000000000000001fa4663bbbe19f82de910280
2021-11-03T18:16:34Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2021-11-03T18:16:34Z Using RdRand as an additional entropy source
2021-11-03T18:16:34Z Default data directory /root/.bitcoin
2021-11-03T18:16:34Z Using data directory /root/.bitcoin
2021-11-03T18:16:34Z Config file: /root/.bitcoin/bitcoin.conf (not found, skipping)
2021-11-03T18:16:34Z Using at most 125 automatic connections (1048576 file descriptors available)
2021-11-03T18:16:34Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2021-11-03T18:16:34Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2021-11-03T18:16:34Z Script verification uses 5 additional threads
2021-11-03T18:16:34Z scheduler thread start
2021-11-03T18:16:34Z libevent: getaddrinfo: address family for nodename not supported
2021-11-03T18:16:34Z Binding RPC on address ::1 port 8332 failed.
2021-11-03T18:16:34Z HTTP: creating work queue of depth 16
2021-11-03T18:16:34Z Using random cookie authentication.
2021-11-03T18:16:34Z Generated RPC authentication cookie /root/.bitcoin/.cookie
2021-11-03T18:16:34Z HTTP: starting 4 worker threads
2021-11-03T18:16:34Z Using wallet directory /root/.bitcoin/wallets
2021-11-03T18:16:34Z init message: Verifying wallet(s)…
2021-11-03T18:16:34Z init message: Loading banlist…
2021-11-03T18:16:34Z Missing or invalid file /root/.bitcoin/banlist.dat
2021-11-03T18:16:34Z Recreating the banlist database
2021-11-03T18:16:34Z SetNetworkActive: true
2021-11-03T18:16:34Z Failed to read fee estimates from /root/.bitcoin/fee_estimates.dat. Continue anyway.
2021-11-03T18:16:34Z Using /16 prefix for IP bucketing
2021-11-03T18:16:34Z Cache configuration:
2021-11-03T18:16:34Z * Using 2.0 MiB for block index database
2021-11-03T18:16:34Z * Using 8.0 MiB for chain state database
2021-11-03T18:16:34Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2021-11-03T18:16:34Z init message: Loading block index…
2021-11-03T18:16:34Z Switching active chainstate to Chainstate [ibd] @ height -1 (null)
2021-11-03T18:16:34Z Opening LevelDB in /root/.bitcoin/blocks/index
2021-11-03T18:16:34Z Opened LevelDB successfully
2021-11-03T18:16:34Z Using obfuscation key for /root/.bitcoin/blocks/index: 0000000000000000
2021-11-03T18:16:34Z LoadBlockIndexDB: last block file = 0
2021-11-03T18:16:34Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2021-11-03T18:16:34Z Checking all blk files are present...
2021-11-03T18:16:34Z Initializing databases...
2021-11-03T18:16:34Z Opening LevelDB in /root/.bitcoin/chainstate
2021-11-03T18:16:34Z Opened LevelDB successfully
2021-11-03T18:16:34Z Wrote new obfuscate key for /root/.bitcoin/chainstate: 0ee90f79911b43fb
2021-11-03T18:16:34Z Using obfuscation key for /root/.bitcoin/chainstate: 0ee90f79911b43fb
2021-11-03T18:16:34Z  block index              16ms
2021-11-03T18:16:34Z loadblk thread start
2021-11-03T18:16:34Z UpdateTip: new best=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f height=0 version=0x00000001 log2_work=32.000022 tx=1 date='2009-01-03T18:15:05Z' progress=0.000000 cache=0.0MiB(0txo)
2021-11-03T18:16:34Z block tree size = 1
2021-11-03T18:16:34Z nBestHeight = 0
2021-11-03T18:16:34Z Failed to open mempool file from disk. Continuing anyway.
2021-11-03T18:16:34Z loadblk thread exit
2021-11-03T18:16:34Z torcontrol thread start
2021-11-03T18:16:34Z Bound to 127.0.0.1:8334
2021-11-03T18:16:34Z Bound to [::]:8333
2021-11-03T18:16:34Z Bound to 0.0.0.0:8333
2021-11-03T18:16:34Z init message: Loading P2P addresses…
2021-11-03T18:16:34Z Missing or invalid file /root/.bitcoin/peers.dat
2021-11-03T18:16:34Z Recreating peers.dat
2021-11-03T18:16:34Z Missing or invalid file /root/.bitcoin/anchors.dat
2021-11-03T18:16:34Z 0 block-relay-only anchors will be tried for connections.
2021-11-03T18:16:34Z init message: Starting network threads…
2021-11-03T18:16:34Z net thread start
2021-11-03T18:16:34Z dnsseed thread start
2021-11-03T18:16:34Z addcon thread start
2021-11-03T18:16:34Z opencon thread start
2021-11-03T18:16:34Z msghand thread start
2021-11-03T18:16:34Z Loading addresses from DNS seed seed.bitcoin.sipa.be
2021-11-03T18:16:34Z init message: Done loading
2021-11-03T18:16:35Z Loading addresses from DNS seed dnsseed.bitcoin.dashjr.org
2021-11-03T18:16:35Z Loading addresses from DNS seed seed.btc.petertodd.org
2021-11-03T18:16:36Z Loading addresses from DNS seed seed.bitcoinstats.com
2021-11-03T18:16:36Z Loading addresses from DNS seed seed.bitcoin.jonasschnelli.ch
2021-11-03T18:16:36Z Loading addresses from DNS seed dnsseed.emzy.de
2021-11-03T18:16:37Z Loading addresses from DNS seed dnsseed.bluematt.me
2021-11-03T18:16:37Z Loading addresses from DNS seed seed.bitcoin.wiz.biz
2021-11-03T18:16:38Z Loading addresses from DNS seed seed.bitcoin.sprovoost.nl
2021-11-03T18:16:38Z 209 addresses found from DNS seeds
2021-11-03T18:16:38Z dnsseed thread exit

So it's able to query dnsseed but then just stays here forever. If then I disconnect from my vpn in my mac, the service becomes alive and is able to connect to peers and starts fetching the blocks. This makes sense because obviously something with my corporate firewall prevents further connection. Now I can contact IT dept and ask them to make some exceptions because of this project, but I don't know what to tell them. Is it simply asking them to ignore all firewall rules for this container or is it some specific IP/servers we can whitelist? Is there a proxy server that we need to whitelist to enable btc core to function? I don't think I need to make changes in my container config since when vpn is disconnected it works as expected. I mean if I ask IT dept to take my container and run in their in-house k8s platform, what should they (or I) be doing extra, network firewall-wise, so that the container works?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.