<p>I tried running bitcoind in testnet mode again and this time it's downloading the blocks.  I'm not sure why.  Maybe it had something to do with me putting back an IP address into /etc/resolv.conf, which I had previously commented out.</p>

CC BY-SA 3.0
2014-03-16T19:13:22.007Z
These were nameserver IP addresses.  I don't know why that would affect bitcoind.
JLP
CC BY-SA 3.0
2014-03-14T03:26:08.357Z
2014-03-14T03:26:08.357Z
JLP
<p>The reason why you are not finding nodes is that there may not be many available through the traditional bootstrapping methods (many clients are installed with UPnP off, or behind firewalls and cannot accept incoming connections, and existing nodes with inbound connections can sometimes be spread thin). If you're patient enough you will eventually get a connection.</p>

<p>If you don't want to be patient, there is a workaround to this. You need to find the hostname (IP address or URL) of a bitcoind connected to nodes on testnet. Once you have found one, shutdown bitcoind, and edit your bitcoin configuration file (nano .bitcoin/bitcoin.conf) with the line:</p>

<pre><code> addnode=&lt;hostname&gt;
</code></pre>

<p>When you start bitcoind it will look in the conf file and attempt to each node you define this way.</p>

<p>You can also simply shutdown bitcoind and start with the command:</p>

<pre><code>bitcoind -dameon -addnode=&lt;hostname&gt;
</code></pre>

<p>Peers successfully connected to are saved in file peers.dat so both methods work equally well, if the node you are trying to connect to is online. More info on peers.dat and how to view it can be found here (in case you would like to help a friend find a connection to testnet): <a href="https://bitcoin.stackexchange.com/questions/19586/how-do-i-read-peers-dat-file-to-get-a-list-of-all-peers-seen-or-that-bitcoind-ha">How do I read peers.dat file to get a list of all peers seen or that bitcoind has connected to?</a></p>

CC BY-SA 3.0
2014-03-14T06:02:15.400Z
2014-03-16T19:35:21.250Z
2017-04-13T12:47:33.660Z
Mark
<p>I installed bitcoind into Linux.  I'm running it in testnet mode but it is not synchronizing as it is not downloading blocks.</p>

<p>I have the following in bitcoin.conf:</p>

<pre><code>rpcport=8332  # Needed for testnet as default port for testnet is 18332
</code></pre>

<p>Below is what it shows from <code>bitcoind getinfo</code>:</p>

<pre><code>{
    "version" : 80600,
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 0,
    "timeoffset" : 0,
    "connections" : 0,
    "proxy" : "",
    "difficulty" : 1.00000000,
    "testnet" : true,
    "keypoololdest" : 1392428204,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}
</code></pre>

<p>I have the following for <code>ufw status verbose</code> for the firewall:</p>

<pre><code>Status: active

To                         Action      From
--                         ------      ----
8333/tcp                   ALLOW       Anywhere
8332/tcp                   ALLOW       Anywhere
18333/tcp                  ALLOW       Anywhere
8333                       ALLOW       Anywhere
8332                       ALLOW       Anywhere
18333                      ALLOW       Anywhere
8333/tcp                   ALLOW       Anywhere (v6)
8332/tcp                   ALLOW       Anywhere (v6)
18333/tcp                  ALLOW       Anywhere (v6)
8333                       ALLOW       Anywhere (v6)
8332                       ALLOW       Anywhere (v6)
18333                      ALLOW       Anywhere (v6)

8332/tcp                   ALLOW OUT   Anywhere
18333/tcp                  ALLOW OUT   Anywhere
8333                       ALLOW OUT   Anywhere
8332                       ALLOW OUT   Anywhere
18333                      ALLOW OUT   Anywhere
8333/tcp                   ALLOW OUT   Anywhere
8332/tcp                   ALLOW OUT   Anywhere (v6)
18333/tcp                  ALLOW OUT   Anywhere (v6)
8333                       ALLOW OUT   Anywhere (v6)
8332                       ALLOW OUT   Anywhere (v6)
18333                      ALLOW OUT   Anywhere (v6)
8333/tcp                   ALLOW OUT   Anywhere (v6)
</code></pre>

<p>Below is the content of debug.log:</p>

<pre><code>2014-03-13 01:04:57 Bitcoin version v0.8.6.0-g03a7d67-beta ()
2014-03-13 01:04:57 Using OpenSSL version OpenSSL 1.0.1 14 Mar 2012
2014-03-13 01:04:57 Default data directory /home/jlp/.bitcoin
2014-03-13 01:04:57 Using data directory /home/jlp/.bitcoin/testnet3
2014-03-13 01:04:57 Using at most 125 connections (1024 file descriptors available)
2014-03-13 01:04:57 Using 4 threads for script verification
2014-03-13 01:04:57 init message: Verifying wallet...
2014-03-13 01:04:57 dbenv.open LogDir=/home/jlp/.bitcoin/testnet3/database ErrorFile=/h$
2014-03-13 01:04:57 Bound to [::]:18333
2014-03-13 01:04:57 Bound to 0.0.0.0:18333
2014-03-13 01:04:57 init message: Loading block index...
2014-03-13 01:04:57 Opening LevelDB in /home/jlp/.bitcoin/testnet3/blocks/index
2014-03-13 01:04:57 Opened LevelDB successfully
2014-03-13 01:04:57 Opening LevelDB in /home/jlp/.bitcoin/testnet3/chainstate
2014-03-13 01:04:58 Opened LevelDB successfully
2014-03-13 01:04:58 LoadBlockIndexDB(): last block file = 0
2014-03-13 01:04:58 LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, s$
2014-03-13 01:04:58 LoadBlockIndexDB(): transaction index disabled
2014-03-13 01:04:58 LoadBlockIndexDB(): hashBestChain=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2014-03-13 01:04:58 init message: Verifying blocks...
2014-03-13 01:04:58  block index              43ms
2014-03-13 01:04:58 init message: Loading wallet...
2014-03-13 01:04:58 nFileVersion = 80600
2014-03-13 01:04:58  wallet                  441ms
2014-03-13 01:04:58 init message: Loading addresses...
2014-03-13 01:04:58 Loaded 0 addresses from peers.dat  1ms
2014-03-13 01:04:58 mapBlockIndex.size() = 1
2014-03-13 01:04:58 nBestHeight = 0
2014-03-13 01:04:58 setKeyPool.size() = 101
2014-03-13 01:04:58 mapWallet.size() = 0
2014-03-13 01:04:58 mapAddressBook.size() = 1
2014-03-13 01:04:58 AddLocal(XXX.XXX.XXX.XXX:18333,1)
2014-03-13 01:04:58 IPv4 eth0: XXX.XXX.XXX.XXX
2014-03-13 01:04:58 dnsseed thread start
2014-03-13 01:04:58 Loading addresses from DNS seeds (could take a while)
2014-03-13 01:04:58 net thread start
2014-03-13 01:04:58 addcon thread start
2014-03-13 01:04:58 opencon thread start
2014-03-13 01:04:58 msghand thread start
2014-03-13 01:04:58 dumpaddr thread start
2014-03-13 01:04:58 0 addresses found from DNS seeds
2014-03-13 01:04:58 dnsseed thread exit
2014-03-13 01:04:58 init message: Done loading
2014-03-13 01:04:59 GetMyExternalIP() received [XXX.XXX.XXX.XXX] XXX.XXX.XXX.XXX:0
2014-03-13 01:04:59 GetMyExternalIP() returned XXX.XXX.XXX.XXX
2014-03-13 01:04:59 AddLocal(XXX.XXX.XXX.XXX:18333,4)
2014-03-13 01:06:52 ThreadRPCServer method=getinfo
2014-03-13 01:06:52 keypool reserve 2
2014-03-13 01:06:52 keypool return 2
2014-03-13 01:09:09 ThreadRPCServer method=getinfo
2014-03-13 01:09:09 keypool reserve 2
2014-03-13 01:09:09 keypool return 2
2014-03-13 01:19:58 Flushed 0 addresses to peers.dat  4ms
2014-03-13 01:34:58 Flushed 0 addresses to peers.dat  18ms
2014-03-13 01:49:58 Flushed 0 addresses to peers.dat  1ms
2014-03-13 02:04:58 Flushed 0 addresses to peers.dat  22ms
2014-03-13 02:19:58 Flushed 0 addresses to peers.dat  3ms
2014-03-13 02:34:58 Flushed 0 addresses to peers.dat  44ms
2014-03-13 02:49:58 Flushed 0 addresses to peers.dat  22ms
2014-03-13 03:04:58 Flushed 0 addresses to peers.dat  34ms
2014-03-13 03:19:58 Flushed 0 addresses to peers.dat  16ms
2014-03-13 03:34:58 Flushed 0 addresses to peers.dat  32ms
...
...
...
2014-03-13 13:04:59 Flushed 0 addresses to peers.dat  20ms
2014-03-13 13:19:59 Flushed 0 addresses to peers.dat  3ms
2014-03-13 13:30:47 ThreadRPCServer method=getinfo
2014-03-13 13:30:47 keypool reserve 2
2014-03-13 13:30:47 keypool return 2
2014-03-13 13:34:59 Flushed 0 addresses to peers.dat  21ms
</code></pre>

<p>Can anyone suggest any solutions to get bitcoind to synchronize and download the blocks?</p>

<p>Update on 2014-03-13:</p>

<p>I tried removing bitcoin.conf and running this:</p>

<pre><code>bitcoind -testnet -debugnet -printtoconsole
</code></pre>

<p>and I got the following:</p>

<pre><code>Bitcoin version v0.8.6.0-g03a7d67-beta ()
Using OpenSSL version OpenSSL 1.0.1 14 Mar 2012
Default data directory /home/jlp/.bitcoin
Using data directory /home/jlp/.bitcoin/testnet3
Using at most 125 connections (1024 file descriptors available)
Using 4 threads for script verification
init message: Verifying wallet...
dbenv.open LogDir=/home/jlp/.bitcoin/testnet3/database ErrorFile=/home/jlp/.bitcoin/testnet3/db.log
Bound to [::]:18333
Bound to 0.0.0.0:18333
init message: Loading block index...
Opening LevelDB in /home/jlp/.bitcoin/testnet3/blocks/index
Opened LevelDB successfully
Opening LevelDB in /home/jlp/.bitcoin/testnet3/chainstate
Opened LevelDB successfully
LoadBlockIndexDB(): last block file = 0
LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2011-02-02...2011-02-02)
LoadBlockIndexDB(): transaction index disabled
LoadBlockIndexDB(): hashBestChain=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  height=0 date=2011-02-02 23:16:42
init message: Verifying blocks...
 block index              32ms
init message: Loading wallet...
nFileVersion = 80600
 wallet                  454ms
init message: Loading addresses...
Loaded 0 addresses from peers.dat  0ms
mapBlockIndex.size() = 1
nBestHeight = 0
setKeyPool.size() = 101
mapWallet.size() = 0
mapAddressBook.size() = 1
AddLocal(XXX.XXX.XXX.XXX:18333,1)
IPv4 eth0: XXX.XXX.XXX.XXX
dnsseed thread start
Loading addresses from DNS seeds (could take a while)
net thread start
addcon thread start
opencon thread start
msghand thread start


dumpaddr thread start
Error: To use bitcoind, you must set a rpcpassword in the configuration file:
/home/jlp/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com

Error: To use bitcoind, you must set a rpcpassword in the configuration file:
/home/jlp/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com

init message: Done loading
dumpaddr thread stop
Shutdown : In progress...
msghand thread interrupt
Flush(false)
wallet.dat refcount=0
opencon thread interrupt
wallet.dat checkpoint
addcon thread interrupt
wallet.dat detach
wallet.dat closed
DBFlush(false) ended               1ms
StopNode()
net thread interrupt
0 addresses found from DNS seeds
dnsseed thread exit
Flushed 0 addresses to peers.dat  9ms
Committing 0 changed transactions to coin database...
Flush(true)
wallet.dat refcount=0
wallet.dat checkpoint
wallet.dat detach
wallet.dat closed
DBFlush(true) ended               1ms
Shutdown : done
</code></pre>

<p>As per the suggestion in the above response, I put the following into bitcoin.conf:</p>

<pre><code>rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
</code></pre>

<p>and reran:</p>

<pre><code>bitcoind -testnet -debugnet -printtoconsole
</code></pre>

<p>and got the following:</p>

<pre><code>Bitcoin version v0.8.6.0-g03a7d67-beta ()
Using OpenSSL version OpenSSL 1.0.1 14 Mar 2012
Default data directory /home/jlp/.bitcoin
Using data directory /home/jlp/.bitcoin/testnet3
Using at most 125 connections (1024 file descriptors available)
Using 4 threads for script verification
init message: Verifying wallet...
dbenv.open LogDir=/home/jlp/.bitcoin/testnet3/database ErrorFile=/home/jlp/.bitcoin/testnet3/db.log
Bound to [::]:18333
Bound to 0.0.0.0:18333
init message: Loading block index...
Opening LevelDB in /home/jlp/.bitcoin/testnet3/blocks/index
Opened LevelDB successfully
Opening LevelDB in /home/jlp/.bitcoin/testnet3/chainstate
Opened LevelDB successfully
LoadBlockIndexDB(): last block file = 0
LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2011-02-02...2011-02-02)
LoadBlockIndexDB(): transaction index disabled
LoadBlockIndexDB(): hashBestChain=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  height=0 date=2011-02-02 23:16:42
init message: Verifying blocks...
 block index              50ms
init message: Loading wallet...
nFileVersion = 80600
 wallet                  436ms
init message: Loading addresses...
Loaded 0 addresses from peers.dat  1ms
mapBlockIndex.size() = 1
nBestHeight = 0
setKeyPool.size() = 101
mapWallet.size() = 0
mapAddressBook.size() = 1
AddLocal(XXX.XXX.XXX.XXX:18333,1)
IPv4 eth0: XXX.XXX.XXX.XXX
dnsseed thread start
net thread start
Loading addresses from DNS seeds (could take a while)
addcon thread start
opencon thread start
msghand thread start
dumpaddr thread start
init message: Done loading
0 addresses found from DNS seeds
dnsseed thread exit
connection timeout
ERROR: GetMyExternalIP() : connection to YYY.YYY.YYY.YYY:80 failed
connection timeout
ERROR: GetMyExternalIP() : connection to ZZZ.ZZZ.ZZZ.ZZZ:80 failed
GetMyExternalIP() received [XXX.XXX.XXX.XXX] XXX.XXX.XXX.XXX:0
GetMyExternalIP() returned XXX.XXX.XXX.XXX
AddLocal(XXX.XXX.XXX.XXX:18333,4)
</code></pre>

<p>After a long while, I got the following additional response:</p>

<pre><code>Flushed 0 addresses to peers.dat  201ms
Flushed 0 addresses to peers.dat  4ms
</code></pre>

<p>Can anyone discern from above, what the problem is and how to solve it?</p>

CC BY-SA 3.0
2014-03-14T03:24:41.130Z
@George I installed and ran `traceroute checkip.dyndns.org` and I got 13 lines (hops?) back. `nslookup google.com` returns 11 IP addresses for google.com.  However, I tried running bitcoind in testnet mode again and this time it's downloading the blocks.  I'm not sure why.  Maybe it had something to do with me putting back an IP address into /etc/resolv.conf, which I had previously commented out.
JLP
<bitcoind><block><testnet><synchronization>
bitcoind in testnet is not synchronizing
JLP
# bitcoind in testnet is not synchronizing

(Asked by: username_0 on 2014-03-13)

I installed bitcoind into Linux. I'm running it in testnet mode but it is not synchronizing as it is not downloading blocks.

I have the following in bitcoin.conf:

```
rpcport=8332  # Needed for testnet as default port for testnet is 18332

```

Below is what it shows from `bitcoind getinfo`:

```
{
    "version" : 80600,
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 0,
    "timeoffset" : 0,
    "connections" : 0,
    "proxy" : "",
    "difficulty" : 1.00000000,
    "testnet" : true,
    "keypoololdest" : 1392428204,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

```

I have the following for `ufw status verbose` for the firewall:

```
Status: active

To                         Action      From
--                         ------      ----
8333/tcp                   ALLOW       Anywhere
8332/tcp                   ALLOW       Anywhere
18333/tcp                  ALLOW       Anywhere
8333                       ALLOW       Anywhere
8332                       ALLOW       Anywhere
18333                      ALLOW       Anywhere
8333/tcp                   ALLOW       Anywhere (v6)
8332/tcp                   ALLOW       Anywhere (v6)
18333/tcp                  ALLOW       Anywhere (v6)
8333                       ALLOW       Anywhere (v6)
8332                       ALLOW       Anywhere (v6)
18333                      ALLOW       Anywhere (v6)

8332/tcp                   ALLOW OUT   Anywhere
18333/tcp                  ALLOW OUT   Anywhere
8333                       ALLOW OUT   Anywhere
8332                       ALLOW OUT   Anywhere
18333                      ALLOW OUT   Anywhere
8333/tcp                   ALLOW OUT   Anywhere
8332/tcp                   ALLOW OUT   Anywhere (v6)
18333/tcp                  ALLOW OUT   Anywhere (v6)
8333                       ALLOW OUT   Anywhere (v6)
8332                       ALLOW OUT   Anywhere (v6)
18333                      ALLOW OUT   Anywhere (v6)
8333/tcp                   ALLOW OUT   Anywhere (v6)

```

Below is the content of debug.log:

```
2014-03-13 01:04:57 Bitcoin version v0.8.6.0-g03a7d67-beta ()
2014-03-13 01:04:57 Using OpenSSL version OpenSSL 1.0.1 14 Mar 2012
2014-03-13 01:04:57 Default data directory /home/jlp/.bitcoin
2014-03-13 01:04:57 Using data directory /home/jlp/.bitcoin/testnet3
2014-03-13 01:04:57 Using at most 125 connections (1024 file descriptors available)
2014-03-13 01:04:57 Using 4 threads for script verification
2014-03-13 01:04:57 init message: Verifying wallet...
2014-03-13 01:04:57 dbenv.open LogDir=/home/jlp/.bitcoin/testnet3/database ErrorFile=/h$
2014-03-13 01:04:57 Bound to [::]:18333
2014-03-13 01:04:57 Bound to 0.0.0.0:18333
2014-03-13 01:04:57 init message: Loading block index...
2014-03-13 01:04:57 Opening LevelDB in /home/jlp/.bitcoin/testnet3/blocks/index
2014-03-13 01:04:57 Opened LevelDB successfully
2014-03-13 01:04:57 Opening LevelDB in /home/jlp/.bitcoin/testnet3/chainstate
2014-03-13 01:04:58 Opened LevelDB successfully
2014-03-13 01:04:58 LoadBlockIndexDB(): last block file = 0
2014-03-13 01:04:58 LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, s$
2014-03-13 01:04:58 LoadBlockIndexDB(): transaction index disabled
2014-03-13 01:04:58 LoadBlockIndexDB(): hashBestChain=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2014-03-13 01:04:58 init message: Verifying blocks...
2014-03-13 01:04:58  block index              43ms
2014-03-13 01:04:58 init message: Loading wallet...
2014-03-13 01:04:58 nFileVersion = 80600
2014-03-13 01:04:58  wallet                  441ms
2014-03-13 01:04:58 init message: Loading addresses...
2014-03-13 01:04:58 Loaded 0 addresses from peers.dat  1ms
2014-03-13 01:04:58 mapBlockIndex.size() = 1
2014-03-13 01:04:58 nBestHeight = 0
2014-03-13 01:04:58 setKeyPool.size() = 101
2014-03-13 01:04:58 mapWallet.size() = 0
2014-03-13 01:04:58 mapAddressBook.size() = 1
2014-03-13 01:04:58 AddLocal(XXX.XXX.XXX.XXX:18333,1)
2014-03-13 01:04:58 IPv4 eth0: XXX.XXX.XXX.XXX
2014-03-13 01:04:58 dnsseed thread start
2014-03-13 01:04:58 Loading addresses from DNS seeds (could take a while)
2014-03-13 01:04:58 net thread start
2014-03-13 01:04:58 addcon thread start
2014-03-13 01:04:58 opencon thread start
2014-03-13 01:04:58 msghand thread start
2014-03-13 01:04:58 dumpaddr thread start
2014-03-13 01:04:58 0 addresses found from DNS seeds
2014-03-13 01:04:58 dnsseed thread exit
2014-03-13 01:04:58 init message: Done loading
2014-03-13 01:04:59 GetMyExternalIP() received [XXX.XXX.XXX.XXX] XXX.XXX.XXX.XXX:0
2014-03-13 01:04:59 GetMyExternalIP() returned XXX.XXX.XXX.XXX
2014-03-13 01:04:59 AddLocal(XXX.XXX.XXX.XXX:18333,4)
2014-03-13 01:06:52 ThreadRPCServer method=getinfo
2014-03-13 01:06:52 keypool reserve 2
2014-03-13 01:06:52 keypool return 2
2014-03-13 01:09:09 ThreadRPCServer method=getinfo
2014-03-13 01:09:09 keypool reserve 2
2014-03-13 01:09:09 keypool return 2
2014-03-13 01:19:58 Flushed 0 addresses to peers.dat  4ms
2014-03-13 01:34:58 Flushed 0 addresses to peers.dat  18ms
2014-03-13 01:49:58 Flushed 0 addresses to peers.dat  1ms
2014-03-13 02:04:58 Flushed 0 addresses to peers.dat  22ms
2014-03-13 02:19:58 Flushed 0 addresses to peers.dat  3ms
2014-03-13 02:34:58 Flushed 0 addresses to peers.dat  44ms
2014-03-13 02:49:58 Flushed 0 addresses to peers.dat  22ms
2014-03-13 03:04:58 Flushed 0 addresses to peers.dat  34ms
2014-03-13 03:19:58 Flushed 0 addresses to peers.dat  16ms
2014-03-13 03:34:58 Flushed 0 addresses to peers.dat  32ms
...
...
...
2014-03-13 13:04:59 Flushed 0 addresses to peers.dat  20ms
2014-03-13 13:19:59 Flushed 0 addresses to peers.dat  3ms
2014-03-13 13:30:47 ThreadRPCServer method=getinfo
2014-03-13 13:30:47 keypool reserve 2
2014-03-13 13:30:47 keypool return 2
2014-03-13 13:34:59 Flushed 0 addresses to peers.dat  21ms

```

Can anyone suggest any solutions to get bitcoind to synchronize and download the blocks?

Update on 2014-03-13:

I tried removing bitcoin.conf and running this:

```
bitcoind -testnet -debugnet -printtoconsole

```

and I got the following:

```
Bitcoin version v0.8.6.0-g03a7d67-beta ()
Using OpenSSL version OpenSSL 1.0.1 14 Mar 2012
Default data directory /home/jlp/.bitcoin
Using data directory /home/jlp/.bitcoin/testnet3
Using at most 125 connections (1024 file descriptors available)
Using 4 threads for script verification
init message: Verifying wallet...
dbenv.open LogDir=/home/jlp/.bitcoin/testnet3/database ErrorFile=/home/jlp/.bitcoin/testnet3/db.log
Bound to [::]:18333
Bound to 0.0.0.0:18333
init message: Loading block index...
Opening LevelDB in /home/jlp/.bitcoin/testnet3/blocks/index
Opened LevelDB successfully
Opening LevelDB in /home/jlp/.bitcoin/testnet3/chainstate
Opened LevelDB successfully
LoadBlockIndexDB(): last block file = 0
LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2011-02-02...2011-02-02)
LoadBlockIndexDB(): transaction index disabled
LoadBlockIndexDB(): hashBestChain=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  height=0 date=2011-02-02 23:16:42
init message: Verifying blocks...
 block index              32ms
init message: Loading wallet...
nFileVersion = 80600
 wallet                  454ms
init message: Loading addresses...
Loaded 0 addresses from peers.dat  0ms
mapBlockIndex.size() = 1
nBestHeight = 0
setKeyPool.size() = 101
mapWallet.size() = 0
mapAddressBook.size() = 1
AddLocal(XXX.XXX.XXX.XXX:18333,1)
IPv4 eth0: XXX.XXX.XXX.XXX
dnsseed thread start
Loading addresses from DNS seeds (could take a while)
net thread start
addcon thread start
opencon thread start
msghand thread start

dumpaddr thread start
Error: To use bitcoind, you must set a rpcpassword in the configuration file:
/home/jlp/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com

Error: To use bitcoind, you must set a rpcpassword in the configuration file:
/home/jlp/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com

init message: Done loading
dumpaddr thread stop
Shutdown : In progress...
msghand thread interrupt
Flush(false)
wallet.dat refcount=0
opencon thread interrupt
wallet.dat checkpoint
addcon thread interrupt
wallet.dat detach
wallet.dat closed
DBFlush(false) ended               1ms
StopNode()
net thread interrupt
0 addresses found from DNS seeds
dnsseed thread exit
Flushed 0 addresses to peers.dat  9ms
Committing 0 changed transactions to coin database...
Flush(true)
wallet.dat refcount=0
wallet.dat checkpoint
wallet.dat detach
wallet.dat closed
DBFlush(true) ended               1ms
Shutdown : done

```

As per the suggestion in the above response, I put the following into bitcoin.conf:

```
rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

```

and reran:

```
bitcoind -testnet -debugnet -printtoconsole

```

and got the following:

```
Bitcoin version v0.8.6.0-g03a7d67-beta ()
Using OpenSSL version OpenSSL 1.0.1 14 Mar 2012
Default data directory /home/jlp/.bitcoin
Using data directory /home/jlp/.bitcoin/testnet3
Using at most 125 connections (1024 file descriptors available)
Using 4 threads for script verification
init message: Verifying wallet...
dbenv.open LogDir=/home/jlp/.bitcoin/testnet3/database ErrorFile=/home/jlp/.bitcoin/testnet3/db.log
Bound to [::]:18333
Bound to 0.0.0.0:18333
init message: Loading block index...
Opening LevelDB in /home/jlp/.bitcoin/testnet3/blocks/index
Opened LevelDB successfully
Opening LevelDB in /home/jlp/.bitcoin/testnet3/chainstate
Opened LevelDB successfully
LoadBlockIndexDB(): last block file = 0
LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2011-02-02...2011-02-02)
LoadBlockIndexDB(): transaction index disabled
LoadBlockIndexDB(): hashBestChain=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  height=0 date=2011-02-02 23:16:42
init message: Verifying blocks...
 block index              50ms
init message: Loading wallet...
nFileVersion = 80600
 wallet                  436ms
init message: Loading addresses...
Loaded 0 addresses from peers.dat  1ms
mapBlockIndex.size() = 1
nBestHeight = 0
setKeyPool.size() = 101
mapWallet.size() = 0
mapAddressBook.size() = 1
AddLocal(XXX.XXX.XXX.XXX:18333,1)
IPv4 eth0: XXX.XXX.XXX.XXX
dnsseed thread start
net thread start
Loading addresses from DNS seeds (could take a while)
addcon thread start
opencon thread start
msghand thread start
dumpaddr thread start
init message: Done loading
0 addresses found from DNS seeds
dnsseed thread exit
connection timeout
ERROR: GetMyExternalIP() : connection to YYY.YYY.YYY.YYY:80 failed
connection timeout
ERROR: GetMyExternalIP() : connection to ZZZ.ZZZ.ZZZ.ZZZ:80 failed
GetMyExternalIP() received [XXX.XXX.XXX.XXX] XXX.XXX.XXX.XXX:0
GetMyExternalIP() returned XXX.XXX.XXX.XXX
AddLocal(XXX.XXX.XXX.XXX:18333,4)

```

After a long while, I got the following additional response:

```
Flushed 0 addresses to peers.dat  201ms
Flushed 0 addresses to peers.dat  4ms

```

Can anyone discern from above, what the problem is and how to solve it?

**Tags:** bitcoind, block, testnet, synchronization

> **Comments:**
> **username_0**: @George I installed and ran `traceroute checkip.dyndns.org` and I got 13 lines (hops?) back. `nslookup google.com` returns 11 IP addresses for google.com.  However, I tried running bitcoind in testnet mode again and this time it's downloading the blocks.  I'm not sure why.  Maybe it had something to do with me putting back an IP address into /etc/resolv.conf, which I had previously commented out.  

---

## 2 answers

### Answer by username_0 on 2014-03-14. Score: 0 | Accepted answer

I tried running bitcoind in testnet mode again and this time it's downloading the blocks. I'm not sure why. Maybe it had something to do with me putting back an IP address into /etc/resolv.conf, which I had previously commented out.

> **Comments:**
> **username_0**: These were nameserver IP addresses.  I don't know why that would affect bitcoind.  

---

### Answer by username_1 on 2014-03-14. Score: 3

The reason why you are not finding nodes is that there may not be many available through the traditional bootstrapping methods (many clients are installed with UPnP off, or behind firewalls and cannot accept incoming connections, and existing nodes with inbound connections can sometimes be spread thin). If you're patient enough you will eventually get a connection.

If you don't want to be patient, there is a workaround to this. You need to find the hostname (IP address or URL) of a bitcoind connected to nodes on testnet. Once you have found one, shutdown bitcoind, and edit your bitcoin configuration file (nano .bitcoin/bitcoin.conf) with the line:

```
 addnode=<hostname>

```

When you start bitcoind it will look in the conf file and attempt to each node you define this way.

You can also simply shutdown bitcoind and start with the command:

```
bitcoind -dameon -addnode=<hostname>

```

Peers successfully connected to are saved in file peers.dat so both methods work equally well, if the node you are trying to connect to is online. More info on peers.dat and how to view it can be found here (in case you would like to help a friend find a connection to testnet): [How do I read peers.dat file to get a list of all peers seen or that bitcoind has connected to?](https://bitcoin.stackexchange.com/questions/19586/how-do-i-read-peers-dat-file-to-get-a-list-of-all-peers-seen-or-that-bitcoind-ha)


---

