peers always drop, until only localhost remain
Closed this issue · 5 comments
always flooding
could not get block 7598 from peer [-7,[-7,159,69,196,83],8080]
could not get block 7647 from peer [-7,[-7,163,172,105,48],8080]
and eventually goes
sync died!
sync died!
As a result, api:height() always looses its track.
Adding them back from time to time does not help much
[sync:stop(), peers:add([{{168,62,52,179},8080}, {{51,15,69,135},8080}, {{150,109,104,200},8080}, {{221,10,135,34},8080}]), sync:start()].
Dies again very soon (in seconds)
> [length(peers:all()), sync:status ()].
[1,go]
Are you in sync mode normal?
How many blocks does it download before it gets stuck?
Normal mode.
- How many blocks does it download before it gets stuck?
sometimes 0, or if with luck, all the way up to chain height.
Restarting sync sometimes works. Like this:
[sync:stop(), sync_mode:normal(), sync:get_headers({{163,172,71,65},8080}), peers:add([{{168,62,52,179},8080}, {{51,15,69,135},8080}]), sync:start()].
(amoveo_core_prod@host)6> could not get block 39603 from p(amoveo_core_prod@host)6> sync:get_headers({{163,172,71,65},8080}).
error
(amoveo_core_prod@host)7>
(amoveo_core_prod@host)7> could not get block 39603 from peer [-7,[-7,139,59,144,76],8080]could not get block 39603 from peer [-7,[-7,45,77,8,119],8080]could not get block 39603 from peer [-7,[-7,159,65,120,84],8080]could not get block 39603 from (amoveo_core_prod@host)7>
(amoveo_core_prod@host)7> peers:all().could not get block 39603 from peer [-7,[-7,159,65,108,112],8080]
[{{45,77,8,119},8080},
{{138,68,4,55},8080},
{{176,9,76,201},8080},
{{51,15,69,135},8080},
{{150,109,104,200},8080},
{{173,230,157,155},8080},
{{221,10,135,34},8080},
{{18,206,158,75},8080},
{{159,65,108,112},8080},
{{104,238,149,86},8080},
{{70,133,222,59},8080},
{{148,251,1,50},8080},
{{51,15,75,100},8080},
{{127,0,0,1},8080},
{{51,15,212,91},8080},
{{73,95,148,9},8080},
{{139,59,144,76},8080},
{{163,172,105,48},8080},
{{159,69,1,44},8080},
{{88,99,245,31},8080},
{{159,89,106,253},8080},
{{159,65,120,84},8080}]
(amoveo_core_prod@host)8>
additional info,
block:height() stuck at 39503 but it's trying to get block 39603
15> [block:height(), api:height()].
[39503,39689]
16> could not get block 39603 from peer [-7,[-7,159,89,106,253],8080]
Dig deeper
% find blocks -type f | wc
39504 39504 2289111
It's really stuck in 39503 but why the error message says 39599, 39603??
And a question. How can I purge all peers quickly, then I can restart sync from a seed node?
It appears NAT related.
https://github.com/zack-bitcoin/amoveo/blob/master/docs/getting-started/sync.md
Don't switch to sync mode normal until you already synced the blocks.