bitcoind im testnet synchronisiert nicht

Ich habe Bitcoin in Linux installiert. Ich führe es im Testnet-Modus aus, aber es synchronisiert nicht, da es keine Blöcke herunterlädt.

Ich habe folgendes in bitcoin.conf:

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

Unten ist, was es zeigt von 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" : ""
}

ufw status verboseFür die Firewall habe ich folgendes :

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)

Unten ist der Inhalt von 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

Kann jemand Lösungen vorschlagen, um Bitcoin dazu zu bringen, die Blöcke zu synchronisieren und herunterzuladen?

Update vom 13.03.2014:

Ich habe versucht, bitcoin.conf zu entfernen und Folgendes auszuführen:

bitcoind -testnet -debugnet -printtoconsole

und ich habe folgendes bekommen:

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

Gemäß dem Vorschlag in der obigen Antwort habe ich Folgendes in die bitcoin.conf eingefügt:

rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

und erneut ausgeführt:

bitcoind -testnet -debugnet -printtoconsole

und folgendes bekommen:

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)

Nach längerer Zeit bekam ich folgende zusätzliche Antwort:

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

Kann jemand von oben erkennen, was das Problem ist und wie man es löst?

0 addresses found from DNS seedsund das connection timeout, was Sie beim Ausführen erhalten, GetMyExternalIP()impliziert Netzwerkkonfigurationsprobleme. Versuchen Sie zu traceroute checkip.dyndns.orgsehen, ob Ihre Anfrage durchgeht. Gibt nslookup google.comeine gültige IP zurück? Wenn ja, versetzen Sie Ihre Firewall (und Ihren Router, falls letzterer nicht funktioniert) in den DMZ-Modus und prüfen Sie, ob sich etwas ändert.
@George Ich habe es installiert und ausgeführt traceroute checkip.dyndns.orgund 13 Zeilen (Hops?) Zurückbekommen. nslookup google.comgibt 11 IP-Adressen für google.com zurück. Ich habe jedoch erneut versucht, Bitcoin im Testnet-Modus auszuführen, und dieses Mal lädt es die Blöcke herunter. Ich bin mir nicht sicher warum. Vielleicht hatte es etwas damit zu tun, dass ich eine IP-Adresse in /etc/resolv.conf eingefügt habe, die ich zuvor auskommentiert hatte.

Antworten (2)

Der Grund, warum Sie keine Knoten finden, ist, dass möglicherweise nicht viele über die herkömmlichen Bootstrapping-Methoden verfügbar sind (viele Clients werden mit ausgeschaltetem UPnP oder hinter Firewalls installiert und können keine eingehenden Verbindungen akzeptieren, und vorhandene Knoten mit eingehenden Verbindungen können manchmal dünn gesät sein ). Wenn Sie geduldig genug sind, werden Sie schließlich eine Verbindung bekommen.

Wenn Sie nicht geduldig sein möchten, gibt es eine Problemumgehung dafür. Sie müssen den Hostnamen (IP-Adresse oder URL) einer Bitcoin finden, die mit Knoten im Testnetz verbunden ist. Wenn Sie eine gefunden haben, fahren Sie bitcoind herunter und bearbeiten Sie Ihre Bitcoin-Konfigurationsdatei (nano .bitcoin/bitcoin.conf) mit der Zeile:

 addnode=<hostname>

Wenn Sie Bitcoin starten, wird es in der conf-Datei nachsehen und versuchen, jeden Knoten zu erreichen, den Sie auf diese Weise definieren.

Sie können Bitcoin auch einfach herunterfahren und mit dem Befehl starten:

bitcoind -dameon -addnode=<hostname>

Peers, mit denen erfolgreich eine Verbindung hergestellt wurde, werden in der Datei peers.dat gespeichert, sodass beide Methoden gleich gut funktionieren, wenn der Knoten, zu dem Sie eine Verbindung herstellen möchten, online ist. Weitere Informationen zu peers.dat und wie man sie anzeigt, finden Sie hier (falls Sie einem Freund helfen möchten, eine Verbindung zum Testnet zu finden): How do I read peers.dat file to get a list of all peers seen or that Bitcoin hat sich verbunden?

Ich habe versucht, Bitcoin erneut im Testnet-Modus auszuführen, und dieses Mal lädt es die Blöcke herunter. Ich bin mir nicht sicher warum. Vielleicht hatte es etwas damit zu tun, dass ich eine IP-Adresse in /etc/resolv.conf eingefügt habe, die ich zuvor auskommentiert hatte.

War es ein DNS-Servereintrag, den Sie auskommentiert hatten? Denn das wäre sinnvoll.
Dies waren Nameserver-IP-Adressen. Ich weiß nicht, warum das Bitcoin beeinflussen würde.
Nun, das ist der Grund, warum Sie den 0 addresses found from DNS seedsFehler bekommen haben und alles von diesem Punkt an ging unter.