<p>When I startup bitcoin-qt (version 0.20.1.0) on linux, at the bottom of the app is the mesage &quot;Connecting to peers... 4 years and 10 weeks behind&quot;. It appears that things are just frozen, no progress and the increase per hour says &quot;calculating...&quot;. Estimated time left until synced is &quot;Unknown...&quot;.</p>
<p>In the .bitcoin/debug.log file, it just keeps spitting out a lot of the following.</p>
<pre><code>2021-03-10T20:26:47Z Disconnecting and discouraging peer 88.99.213.166:8333!
2021-03-10T20:26:47Z New outbound peer connected: version: 70016, blocks=674050, peer=61 (full-relay)
2021-03-10T20:26:47Z New outbound peer connected: version: 70015, blocks=674050, peer=62 (full-relay)
2021-03-10T20:26:48Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:48Z Disconnecting and discouraging peer 213.156.1.101:8333!
2021-03-10T20:26:48Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:48Z Disconnecting and discouraging peer 35.245.173.118:8333!
2021-03-10T20:26:49Z New outbound peer connected: version: 70015, blocks=674046, peer=63 (full-relay)
2021-03-10T20:26:49Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:49Z Disconnecting and discouraging peer 34.69.253.72:8333!
2021-03-10T20:26:49Z New outbound peer connected: version: 70015, blocks=674050, peer=64 (full-relay)
2021-03-10T20:26:51Z New outbound peer connected: version: 70015, blocks=674050, peer=65 (full-relay)
2021-03-10T20:26:51Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:51Z Disconnecting and discouraging peer 37.187.117.39:8333!
2021-03-10T20:26:51Z New outbound peer connected: version: 70015, blocks=674050, peer=66 (full-relay)
2021-03-10T20:26:52Z New outbound peer connected: version: 70015, blocks=674050, peer=67 (full-relay)
2021-03-10T20:26:53Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:53Z Disconnecting and discouraging peer 47.96.111.238:8333!
2021-03-10T20:26:54Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:54Z Disconnecting and discouraging peer 75.148.91.168:8333!
2021-03-10T20:26:58Z New outbound peer connected: version: 70015, blocks=674050, peer=68 (full-relay)
2021-03-10T20:26:59Z New outbound peer connected: version: 70015, blocks=674050, peer=69 (full-relay)
</code></pre>
<p>Also, I do run a VPN, but even a few days ago things were working ok.</p>
<p>Thoughts?</p>
<p><strong>Update:</strong></p>
<p>I've run ...</p>
<pre><code>$ bitcoin-qt --reindex
</code></pre>
<p>And this eventually leads to a segfault.</p>

CC BY-SA 4.0
2021-03-10T21:18:18.590Z
My best guess is that you have a corrupted database, and Bitcoin Core is rejecting valid blocks as a result. The most likely cause is a hardware error.
Pieter Wuille
CC BY-SA 4.0
2021-03-10T22:26:16.887Z
And how would I fix that?
Ender
CC BY-SA 4.0
2021-03-11T23:12:00.313Z
You can start over by running Bitcoin Core with the "-reindex" command line flag, or by deleting the "blocks" and "chainstate" directories yourself. But in all likelihood these will not address the underlying issue - you need reliable hardware.
Pieter Wuille
CC BY-SA 4.0
2021-03-12T00:49:58.953Z
I guess that's the part I'm not understanding. I've got a good machine, never had issues or anything. What are we talking about as "reliable" and what hardware? Bad blocks in RAM? USB 3.0 to a practically new external hard drive? Anything to nail this down. I see this error a lot on forums and no one can get any more detailed that "bad hardware" which in the majority of cases is a cop out.
Ender
CC BY-SA 4.0
2021-03-12T02:13:40.633Z
You have to realize that Bitcoin Core tends to stress hardware a lot more than most consumer applications, when doing full validation of the chain - and is also far more susceptible to errors (a single bitflip is sufficient to make it reject the entire chain). It could be a slightly overheating CPU, or bad RAM; most USB storage adaptors used in external hard drives are also not designed for the kind of I/O heavy load.
Pieter Wuille
CC BY-SA 4.0
2021-03-12T03:21:40.410Z
All good to know. Thanks for your replies.
Ender
<bitcoin-core><peers>
Why does bitcoin core appear to freeze while connecting to peers on startup?
Ender
# Why does bitcoin core appear to freeze while connecting to peers on startup?

(Asked by: username_0 on 2021-03-10)

When I startup bitcoin-qt (version 0.20.1.0) on linux, at the bottom of the app is the mesage "Connecting to peers... 4 years and 10 weeks behind". It appears that things are just frozen, no progress and the increase per hour says "calculating...". Estimated time left until synced is "Unknown...".

In the .bitcoin/debug.log file, it just keeps spitting out a lot of the following.

```
2021-03-10T20:26:47Z Disconnecting and discouraging peer 88.99.213.166:8333!
2021-03-10T20:26:47Z New outbound peer connected: version: 70016, blocks=674050, peer=61 (full-relay)
2021-03-10T20:26:47Z New outbound peer connected: version: 70015, blocks=674050, peer=62 (full-relay)
2021-03-10T20:26:48Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:48Z Disconnecting and discouraging peer 213.156.1.101:8333!
2021-03-10T20:26:48Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:48Z Disconnecting and discouraging peer 35.245.173.118:8333!
2021-03-10T20:26:49Z New outbound peer connected: version: 70015, blocks=674046, peer=63 (full-relay)
2021-03-10T20:26:49Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:49Z Disconnecting and discouraging peer 34.69.253.72:8333!
2021-03-10T20:26:49Z New outbound peer connected: version: 70015, blocks=674050, peer=64 (full-relay)
2021-03-10T20:26:51Z New outbound peer connected: version: 70015, blocks=674050, peer=65 (full-relay)
2021-03-10T20:26:51Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:51Z Disconnecting and discouraging peer 37.187.117.39:8333!
2021-03-10T20:26:51Z New outbound peer connected: version: 70015, blocks=674050, peer=66 (full-relay)
2021-03-10T20:26:52Z New outbound peer connected: version: 70015, blocks=674050, peer=67 (full-relay)
2021-03-10T20:26:53Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:53Z Disconnecting and discouraging peer 47.96.111.238:8333!
2021-03-10T20:26:54Z ERROR: AcceptBlockHeader: block 0000000000000000032864f2cd9a15916fdd8c4e2b49a4a9c1403152bdaa6259 is marked invalid
2021-03-10T20:26:54Z Disconnecting and discouraging peer 75.148.91.168:8333!
2021-03-10T20:26:58Z New outbound peer connected: version: 70015, blocks=674050, peer=68 (full-relay)
2021-03-10T20:26:59Z New outbound peer connected: version: 70015, blocks=674050, peer=69 (full-relay)

```

Also, I do run a VPN, but even a few days ago things were working ok.

Thoughts?

**Update:**

I've run ...

```
$ bitcoin-qt --reindex

```

And this eventually leads to a segfault.

**Tags:** bitcoin-core, peers

> **Comments:**
> **username_1**: My best guess is that you have a corrupted database, and Bitcoin Core is rejecting valid blocks as a result. The most likely cause is a hardware error.  
> **username_0**: And how would I fix that?  
> **username_1**: You can start over by running Bitcoin Core with the "-reindex" command line flag, or by deleting the "blocks" and "chainstate" directories yourself. But in all likelihood these will not address the underlying issue - you need reliable hardware.  
> **username_0**: I guess that's the part I'm not understanding. I've got a good machine, never had issues or anything. What are we talking about as "reliable" and what hardware? Bad blocks in RAM? USB 3.0 to a practically new external hard drive? Anything to nail this down. I see this error a lot on forums and no one can get any more detailed that "bad hardware" which in the majority of cases is a cop out.  
> **username_1**: You have to realize that Bitcoin Core tends to stress hardware a lot more than most consumer applications, when doing full validation of the chain - and is also far more susceptible to errors (a single bitflip is sufficient to make it reject the entire chain). It could be a slightly overheating CPU, or bad RAM; most USB storage adaptors used in external hard drives are also not designed for the kind of I/O heavy load.  
> **username_0**: All good to know. Thanks for your replies.  

---

## 0 answers

