Mainnet sync stuck

Hi, I’ve setup a mainnet node on Friday by following your documentation (Full Node Deployment | Matic Network | Documentation) and it started sync well but it’s stuck now (block 5909695) bor log:

May 24 15:26:02 ip-172-31-16-182 bash[225683]: Hash: 0xaec63b5000c8fd8b088cdf04611c0b210e579a4f3ae95b7e54293b8d10cae88e
May 24 15:26:02 ip-172-31-16-182 bash[225683]:          0: cumulative: 88485 gas: 88485 contract: 0x0000000000000000000000000000000000000000 status: 1 tx: 0x53699110d50b26ff53311426a671fed0e5bb3c64cee69f0a2af8d708ec6bdf8f logs: [0xc011be8d10] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000008000000000000000400000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000040000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000400000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000100000100000000000000000000000000000000000000000000000000000000000002000000000100000 state:
May 24 15:26:02 ip-172-31-16-182 bash[225683]:          1: cumulative: 275659 gas: 187174 contract: 0x0000000000000000000000000000000000000000 status: 1 tx: 0xc8c6f846c8043caa822b45a9598a54455b4bdff2bd182f5de2d73cc4b7edc464 logs: [0xc011be8e70 0xc011be8f20 0xc011be8fd0 0xc011be9080] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000200008000000000000000400000000000000200000000000000000000100000800000000000010000000100000000000000000000000000000000800000000000000004000000000080000000000000000000000000010000000000000000000000000000000000000000000000000000200002000000000400000100000000000000010000800000020000010000004000000000000008000001000000000000000000000000000000100500000002008000000000000000000000000000000000000000000000000000000000100000 state:
May 24 15:26:02 ip-172-31-16-182 bash[225683]: Error: invalid merkle root (remote: 97815dd6ef814d34fe8f4dde1373d9cc3127e743ed432a66e4e5c4bc3372753e local: 1f7236265c84f22749d5540200ad0bc3d4ec0814a87e6dea8caa42a1edcd4244)
May 24 15:26:02 ip-172-31-16-182 bash[225683]: ##############################
May 24 15:26:02 ip-172-31-16-182 bash[225683]:  
May 24 15:26:02 ip-172-31-16-182 bash[225683]: WARN [05-24|15:26:02.274] Synchronisation failed, dropping peer    peer=4325bafe985184bef0fa8fd39f7ab783a3118a21f7509dd0087cd8002d6bbff3 err="retrieved hash chain is invalid: invalid merkle root (remote: 97815dd6ef814d34fe8f4dde1373d9cc3127e743ed432a66e4e5c4bc3372753e local: 1f7236265c84f22749d5540200ad0bc3d4ec0814a87e6dea8caa42a1edcd4244)"
May 24 15:26:02 ip-172-31-16-182 bash[225683]: ERROR[05-24|15:26:02.275] Ethereum peer removal failed             peer=4325bafe err="peer not registered"
May 24 15:26:05 ip-172-31-16-182 bash[225683]: INFO [05-24|15:26:05.249] Looking for peers                        peercount=4 tried=24 static=0
May 24 15:26:13 ip-172-31-16-182 bash[225683]: INFO [05-24|15:26:13.835] Fetching state updates from Heimdall     fromID=4797 to=2020-10-18T19:09:54Z
May 24 15:26:13 ip-172-31-16-182 bash[225683]: INFO [05-24|15:26:13.837] Fetching state sync events               queryParams="from-id=4797&to-time=1603048194&limit=50"
May 24 15:26:13 ip-172-31-16-182 bash[225683]: INFO [05-24|15:26:13.842] Skip duplicated bad block                number=5909696 hash="aec63b…cae88e"
May 24 15:26:13 ip-172-31-16-182 bash[225683]: ERROR[05-24|15:26:13.842]
May 24 15:26:13 ip-172-31-16-182 bash[225683]: ########## BAD BLOCK #########
May 24 15:26:13 ip-172-31-16-182 bash[225683]: Chain config: {ChainID: 137 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 3395000, Muir Glacier: 3395000, Berlin: 14750000, YOLO v3: <nil>, Engine: bor}
May 24 15:26:13 ip-172-31-16-182 bash[225683]: Number: 5909696
May 24 15:26:13 ip-172-31-16-182 bash[225683]: Hash: 0xaec63b5000c8fd8b088cdf04611c0b210e579a4f3ae95b7e54293b8d10cae88e
May 24 15:26:13 ip-172-31-16-182 bash[225683]:          0: cumulative: 88485 gas: 88485 contract: 0x0000000000000000000000000000000000000000 status: 1 tx: 0x53699110d50b26ff53311426a671fed0e5bb3c64cee69f0a2af8d708ec6bdf8f logs: [0xc011be98c0] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000008000000000000000400000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000040000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000400000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000100000100000000000000000000000000000000000000000000000000000000000002000000000100000 state:
May 24 15:26:13 ip-172-31-16-182 bash[225683]:          1: cumulative: 275659 gas: 187174 contract: 0x0000000000000000000000000000000000000000 status: 1 tx: 0xc8c6f846c8043caa822b45a9598a54455b4bdff2bd182f5de2d73cc4b7edc464 logs: [0xc01499f970 0xc01499fa20 0xc01499fad0 0xc01499fb80] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000200008000000000000000400000000000000200000000000000000000100000800000000000010000000100000000000000000000000000000000800000000000000004000000000080000000000000000000000000010000000000000000000000000000000000000000000000000000200002000000000400000100000000000000010000800000020000010000004000000000000008000001000000000000000000000000000000100500000002008000000000000000000000000000000000000000000000000000000000100000 state:
May 24 15:26:13 ip-172-31-16-182 bash[225683]: Error: invalid merkle root (remote: 97815dd6ef814d34fe8f4dde1373d9cc3127e743ed432a66e4e5c4bc3372753e local: 1f7236265c84f22749d5540200ad0bc3d4ec0814a87e6dea8caa42a1edcd4244)
May 24 15:26:13 ip-172-31-16-182 bash[225683]: ##############################
May 24 15:26:13 ip-172-31-16-182 bash[225683]:  
May 24 15:26:13 ip-172-31-16-182 bash[225683]: WARN [05-24|15:26:13.843] Synchronisation failed, dropping peer    peer=d534e83a9a2bb7e765c846adaa8f7d087b24665c62a6eaf2270114fda5efd92f err="retrieved hash chain is invalid: invalid merkle root (remote: 97815dd6ef814d34fe8f4dde1373d9cc3127e743ed432a66e4e5c4bc3372753e local: 1f7236265c84f22749d5540200ad0bc3d4ec0814a87e6dea8caa42a1edcd4244)"
May 24 15:26:13 ip-172-31-16-182 bash[225683]: ERROR[05-24|15:26:13.844] Ethereum peer removal failed             peer=d534e83a err="peer not registered"
May 24 15:26:13 ip-172-31-16-182 bash[225683]: WARN [05-24|15:26:13.856] Synchronisation failed, dropping peer    peer=8ec7352b8985509b60adffaaa643a7f5a9eb6b779e9cef26a5f998d06379c391 err="action from bad peer ignored: returned headers 192 != requested 1"
May 24 15:26:13 ip-172-31-16-182 bash[225683]: ERROR[05-24|15:26:13.856] Ethereum peer removal failed             peer=8ec7352b err="peer not registered"

did you find a way to solve this? having the same issue…

Hi, yes.
The issue was that firewall ports were closed.

What ports exactly must be open?

From doc Full Node Deployment | Matic Network | Documentation

  • Open ports 22, 26656 and 30303 to world (0.0.0.0/0) on node firewall. All other ports should be closed.