Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: TheBroskie on February 16, 2018, 12:31:45 PM



Title: bitcoind, I get "Network is unreachable (101)" whenever I have the full blockcha
Post by: TheBroskie on February 16, 2018, 12:31:45 PM
Whenever bitcoind has downloaded the whole blockchain I get this "Network is unreachable (101)" message instead of it telling me that it's synced.
And when I try to use bitcoin-cli with bitcoind in that state I just mentioned, I get this message "error: couldn't connect to server: unknown (code -1)".
Can someone help me out?


Title: Re: bitcoind, I get "Network is unreachable (101)" whenever I have the full blockcha
Post by: jackg on February 16, 2018, 01:41:32 PM
Can you post your entire debug.log (located in the bitcoin data directory, either ~/.Bitcoin or the appdata/local/bitcoin folder for Linux or Windows respectively).


Title: Re: bitcoind, I get "Network is unreachable (101)" whenever I have the full blockcha
Post by: TheBroskie on February 17, 2018, 03:16:36 PM
Here is the debug.log file content

2018-02-14 11:00:42 Bitcoin version v0.15.1
2018-02-14 11:00:42 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-02-14 11:00:42 Assuming ancestors of block 0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1 have valid signatures.
2018-02-14 11:00:42 Setting nMinimumChainWork=00000000000000000000000000000000000000000000002830dab7f76dbb7d63
2018-02-14 11:00:42 Using the 'standard' SHA256 implementation
2018-02-14 11:00:42 Using RdRand as an additional entropy source
2018-02-14 11:00:42 Default data directory /home/mac/.bitcoin
2018-02-14 11:00:42 Using data directory /media/mac/Blockchain/bitcoin/testnet3
2018-02-14 11:00:42 Using config file /media/mac/Blockchain/bitcoin/bitcoin.conf
2018-02-14 11:00:42 Using at most 125 automatic connections (1024 file descriptors available)
2018-02-14 11:00:42 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-02-14 11:00:42 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-02-14 11:00:42 Using 2 threads for script verification
2018-02-14 11:00:42 scheduler thread start
2018-02-14 11:00:42 HTTP: creating work queue of depth 16
2018-02-14 11:00:42 No rpcpassword set - using random cookie authentication
2018-02-14 11:00:42 Generated RPC authentication cookie /media/mac/Blockchain/bitcoin/testnet3/.cookie
2018-02-14 11:00:42 HTTP: starting 4 worker threads
2018-02-14 11:00:42 init message: Verifying wallet(s)...
2018-02-14 11:00:42 Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
2018-02-14 11:00:42 Using wallet wallet.dat
2018-02-14 11:00:42 CDBEnv::Open: LogDir=/media/mac/Blockchain/bitcoin/testnet3/database ErrorFile=/media/mac/Blockchain/bitcoin/testnet3/db.log
2018-02-14 11:00:42 Cache configuration:
2018-02-14 11:00:42 * Using 2.0MiB for block index database
2018-02-14 11:00:42 * Using 8.0MiB for chain state database
2018-02-14 11:00:42 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-02-14 11:00:42 init message: Loading block index...
2018-02-14 11:00:42 Opening LevelDB in /media/mac/Blockchain/bitcoin/testnet3/blocks/index
2018-02-14 11:00:42 Opened LevelDB successfully
2018-02-14 11:00:42 Using obfuscation key for /media/mac/Blockchain/bitcoin/testnet3/blocks/index: 0000000000000000
2018-02-14 11:00:42 LoadBlockIndexDB: last block file = 0
2018-02-14 11:00:42 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2018-02-14 11:00:42 Checking all blk files are present...
2018-02-14 11:00:42 LoadBlockIndexDB: transaction index disabled
2018-02-14 11:00:42 Initializing databases...
2018-02-14 11:00:42 Pre-allocating up to position 0x1000000 in blk00000.dat
2018-02-14 11:00:42 Opening LevelDB in /media/mac/Blockchain/bitcoin/testnet3/chainstate
2018-02-14 11:00:42 Opened LevelDB successfully
2018-02-14 11:00:42 Wrote new obfuscate key for /media/mac/Blockchain/bitcoin/testnet3/chainstate: 20208e54ec72b9c8
2018-02-14 11:00:42 Using obfuscation key for /media/mac/Blockchain/bitcoin/testnet3/chainstate: 20208e54ec72b9c8
2018-02-14 11:00:42 init message: Rewinding blocks...
2018-02-14 11:00:42  block index             610ms
2018-02-14 11:00:42 init message: Loading wallet...
2018-02-14 11:00:42 nFileVersion = 150100
2018-02-14 11:00:42 Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total
2018-02-14 11:00:43 Performing wallet upgrade to 60000
2018-02-14 11:00:47 keypool added 2000 keys (1000 internal), size=2000 (1000 internal)
2018-02-14 11:00:47 keypool reserve 1
2018-02-14 11:00:47 keypool keep 1
2018-02-14 11:00:47  wallet                 5101ms
2018-02-14 11:00:47 keypool added 1 keys (0 internal), size=2000 (1000 internal)
2018-02-14 11:00:48 setKeyPool.size() = 2000
2018-02-14 11:00:48 mapWallet.size() = 0
2018-02-14 11:00:48 mapAddressBook.size() = 1
2018-02-14 11:00:48 UpdateTip: new best=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943 height=0 version=0x00000001 log2_work=32.000022 tx=1 date='2011-02-02 23:16:42' progress=0.000000 cache=0.0MiB(0txo)
2018-02-14 11:00:48 Failed to open mempool file from disk. Continuing anyway.
2018-02-14 11:00:48 mapBlockIndex.size() = 1
2018-02-14 11:00:48 nBestHeight = 0
2018-02-14 11:00:48 torcontrol thread start
2018-02-14 11:00:48 Bound to [::]:18333
2018-02-14 11:00:48 Bound to 0.0.0.0:18333
2018-02-14 11:00:48 init message: Loading P2P addresses...
2018-02-14 11:00:48 ERROR: DeserializeFileDB: Failed to open file /media/mac/Blockchain/bitcoin/testnet3/peers.dat
2018-02-14 11:00:48 Invalid or missing peers.dat; recreating
2018-02-14 11:00:48 init message: Loading banlist...
2018-02-14 11:00:48 ERROR: DeserializeFileDB: Failed to open file /media/mac/Blockchain/bitcoin/testnet3/banlist.dat
2018-02-14 11:00:48 Invalid or missing banlist.dat; recreating
2018-02-14 11:00:48 init message: Starting network threads...
2018-02-14 11:00:48 net thread start
2018-02-14 11:00:48 dnsseed thread start
2018-02-14 11:00:48 Loading addresses from DNS seeds (could take a while)
2018-02-14 11:00:48 addcon thread start
2018-02-14 11:00:48 init message: Done loading
2018-02-14 11:00:48 msghand thread start
2018-02-14 11:00:48 opencon thread start
2018-02-14 11:00:48 ProcessMessages(version, 102 bytes) FAILED peer=0
2018-02-14 11:00:49 46 addresses found from DNS seeds
2018-02-14 11:00:49 dnsseed thread exit
2018-02-14 11:00:49 ProcessMessages(version, 102 bytes) FAILED peer=1
2018-02-14 11:00:50 ProcessMessages(version, 113 bytes) FAILED peer=2
2018-02-14 11:00:50 receive version message: /btcwire:0.5.0/btcd:0.12.0/: version 70013, blocks=1282623, us=91.236.116.233:35428, peer=3
2018-02-14 11:00:57 connect() to [2001:0:5ef5:79fb:205b:220:30d0:290d]:18333 failed: Network is unreachable (101)
2018-02-14 11:01:01 connect() to 82.77.94.73:18333 failed after select(): No route to host (113)
2018-02-14 11:01:04 connect() to [2001:0:5ef5:79fb:2c92:1770:9bd9:fc67]:18333 failed: Network is unreachable (101)
2018-02-14 11:01:14 tor: Thread interrupt
2018-02-14 11:01:14 addcon thread exit
2018-02-14 11:01:14 torcontrol thread exit
2018-02-14 11:01:14 scheduler thread interrupt
2018-02-14 11:01:14 Shutdown: In progress...
2018-02-14 11:01:14 net thread exit
2018-02-14 11:01:14 msghand thread exit
2018-02-14 11:01:16 opencon thread exit
2018-02-14 11:01:16 Dumped mempool: 9e-06s to copy, 0.033129s to dump
2018-02-14 11:01:20 Shutdown: done


Title: Re: bitcoind, I get "Network is unreachable (101)" whenever I have the full blockcha
Post by: jackg on February 17, 2018, 07:41:05 PM
1. It's being run in testnet I think, are the other nodes definitely active?
2. Do you have any AV/firewalls enabled on your device/modem/router?
3. Did you configure a config file correctly with rpcuser and rpcpass?
4. It seems to also run into an issue with leading the default datadir, how's your hard drive and was the folder deleted just beforehand?


Title: Re: bitcoind, I get "Network is unreachable (101)" whenever I have the full blockcha
Post by: TheBroskie on February 17, 2018, 08:18:45 PM
Yes it's being run on the testnet, I have no other nodes running.
I have no firewalls as far as I know, I'm running Ubuntu with default settings and I even tried disabling ufw.
I configured the config file to according to the book "Mastering bitcoin" as so:

rpcuser=bitcoinrpc
rpcpassword=(arbitrary digits I chose)

I'm using an external harddrive as datadir.
Btw, when using an external hdd as datadir I have to run bitcoind as sudo for it to work.
I'm downloading the testnet to my internal datadir as I'm writing this message, don't know if it will fit though.
I haven't tried the mainnet because the blockchain is to big for my internal hdd.


Title: Re: bitcoind, I get "Network is unreachable (101)" whenever I have the full blockcha
Post by: jackg on February 17, 2018, 09:32:33 PM
Yes it's being run on the testnet, I have no other nodes running.
I have no firewalls as far as I know, I'm running Ubuntu with default settings and I even tried disabling ufw.
I configured the config file to according to the book "Mastering bitcoin" as so:

rpcuser=bitcoinrpc
rpcpassword=(arbitrary digits I chose)

I'm using an external harddrive as datadir.
Btw, when using an external hdd as datadir I have to run bitcoind as sudo for it to work.
I'm downloading the testnet to my internal datadir as I'm writing this message, don't know if it will fit though.
I haven't tried the mainnet because the blockchain is to big for my internal hdd.

I don't particularly know how testnet works/where you're supposed to get the data from?

However, try running it with the mainnet with the command -prune=1000. The number is the size the download data is limited to in megabytes. Minimum is 1000MB if you have enough internal space free.

Otherwise, where are you downloading the testnet from? Is the reason it can't connect because there aren't any nodes with a compatible blockchain.


Title: Re: bitcoind, I get "Network is unreachable (101)" whenever I have the full blockcha
Post by: TheBroskie on February 19, 2018, 07:32:46 PM
I ran it with the main-net with the prune option and I was able to download the blockchain to my internal hdd.
I still get the errors as soon as I reach the most recent block but running the bitcoin-cli now works, so my problem is solved I guess.
Thank you so much for your help!