iost-official / go-iost

Official Go implementation of the IOST blockchain
https://developers.iost.io/
GNU Lesser General Public License v3.0
564 stars 112 forks source link

A problem with syncing block #1139

Closed egorsmkv closed 4 years ago

egorsmkv commented 4 years ago

I am trying to update my node but there's a problem with infinite "Syncing block" statements:

Info 2020-03-05 20:52:03.373 main.go:76 build time:20191213_041250+0000
Info 2020-03-05 20:52:03.373 main.go:77 git hash:be629f19cbed8489142a901f5612fbf2fb55a729
Info 2020-03-05 20:52:03.373 main.go:78 code version:3.3.1
Info 2020-03-05 20:52:04.708 recovery.go:46 current Tag: 68pULGKoc7FGvPfghnJFvhYzbxH7Dw1wisgZ4npxppTC
Info 2020-03-05 20:52:04.708 wal.go:295 RecoverFromDir
Warn 2020-03-05 20:52:04.708 util.go:88 ignore file in WAL directory, path: .1583440594700554615.0.wal.tmp error: bad wal name
Info 2020-03-05 20:52:04.709 block_cache.go:297 Got LIB: 59630541
Info 2020-03-05 20:52:04.709 block_cache.go:307 Witness Block Num:59630541
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:31ibPtxBLW5e7yTsV9XSDVZ5Hs5w9n7UtHNzXpuP7EUB
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:G5DPSoGy4J4y5ZzGQ5uPXbddJFCyzBzva2r5XjFSsNVa
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:6frvjXKU1Etv41sqyBjCHv3WeUhP21VR9PL4emJteFRX
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:AXWziEWvUzcpbYUiFoqinGX88JnPggz9uSuVfpwi6xY6
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:GiUzmFkgK7ofvuxjSLMeL8nK46UXALDDeSPh31C18FRZ
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:CTj4eE1FcjDL2GbGzLzMWA9i9wPE7mgA4q3papUWPGXw
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:y6u3XeZFf9tACn3rxqV54FnYqTJ4U2gp1XDRnYb2w8K
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:6MVV9cRvKtGeeijN7RQMVaAJBZ6Pqj8hczTdoYPdcift
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:AceLkScRaMNDZfaTUbHS8UJ5GCELs7gctKscnW1Eh3gT
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:4K4xauhm16YYrUJ3NUcUNuQqcabsN81xxqEazNYZQp62
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:GGJWd9oBZAoojYQWppirzNDWADcCzCPLWeqe4VqgWMFU
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:GogC92fWAm7dSZF6kMBfTdYyNdLPmJyDEpnAaW4xeh8L
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:EyrEiCifydwypSJV34GyozQ5GBeKPZrm6VSfWr5AWzae
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:sV6z7ngGPRWfz2mUTSw1RwCCQFrh7ZdDvaVCX7Yt9im
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:Adqh8922V4cK62EXoJv9wTf4aZb5J4CrihZUY9oiUTTV
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:B2yX1YXqP5MzPkFSnjtZUrNM9CMx7AcRDnjMAyBJjmT7
Info 2020-03-05 20:52:04.709 block_cache.go:309 ActiveWitness:8Q7jaeioUK2BmZ56VK347a13sy2jPNZHrcuYe4GSbnGF
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:31ibPtxBLW5e7yTsV9XSDVZ5Hs5w9n7UtHNzXpuP7EUB
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:G5DPSoGy4J4y5ZzGQ5uPXbddJFCyzBzva2r5XjFSsNVa
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:6frvjXKU1Etv41sqyBjCHv3WeUhP21VR9PL4emJteFRX
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:AXWziEWvUzcpbYUiFoqinGX88JnPggz9uSuVfpwi6xY6
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:GiUzmFkgK7ofvuxjSLMeL8nK46UXALDDeSPh31C18FRZ
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:CTj4eE1FcjDL2GbGzLzMWA9i9wPE7mgA4q3papUWPGXw
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:y6u3XeZFf9tACn3rxqV54FnYqTJ4U2gp1XDRnYb2w8K
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:6MVV9cRvKtGeeijN7RQMVaAJBZ6Pqj8hczTdoYPdcift
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:AceLkScRaMNDZfaTUbHS8UJ5GCELs7gctKscnW1Eh3gT
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:4K4xauhm16YYrUJ3NUcUNuQqcabsN81xxqEazNYZQp62
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:GGJWd9oBZAoojYQWppirzNDWADcCzCPLWeqe4VqgWMFU
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:GogC92fWAm7dSZF6kMBfTdYyNdLPmJyDEpnAaW4xeh8L
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:EyrEiCifydwypSJV34GyozQ5GBeKPZrm6VSfWr5AWzae
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:sV6z7ngGPRWfz2mUTSw1RwCCQFrh7ZdDvaVCX7Yt9im
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:Adqh8922V4cK62EXoJv9wTf4aZb5J4CrihZUY9oiUTTV
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:B2yX1YXqP5MzPkFSnjtZUrNM9CMx7AcRDnjMAyBJjmT7
Info 2020-03-05 20:52:04.710 block_cache.go:312 PendingWitness:8Q7jaeioUK2BmZ56VK347a13sy2jPNZHrcuYe4GSbnGF
Info 2020-03-05 20:52:04.745 encoder.go:41 Encoder Name: /var/lib/iserver/storage/BlockCacheWAL/.1580532282119418966.58.wal.tmp
Info 2020-03-05 20:52:04.745 block_cache.go:328 Recover block start
Info 2020-03-05 20:52:04.745 block_cache.go:331 Recover block progress:0/2275
Info 2020-03-05 20:52:05.009 block_cache.go:385 Set node 59630465 active to :[31ibPtxBLW5e7yTsV9XSDVZ5Hs5w9n7UtHNzXpuP7EUB G5DPSoGy4J4y5ZzGQ5uPXbddJFCyzBzva2r5XjFSsNVa 6frvjXKU1Etv41sqyBjCHv3WeUhP21VR9PL4emJteFRX AXWziEWvUzcpbYUiFoqinGX88JnPggz9uSuVfpwi6xY6 GiUzmFkgK7ofvuxjSLMeL8nK46UXALDDeSPh31C18FRZ CTj4eE1FcjDL2GbGzLzMWA9i9wPE7mgA4q3papUWPGXw y6u3XeZFf9tACn3rxqV54FnYqTJ4U2gp1XDRnYb2w8K 6MVV9cRvKtGeeijN7RQMVaAJBZ6Pqj8hczTdoYPdcift AceLkScRaMNDZfaTUbHS8UJ5GCELs7gctKscnW1Eh3gT 4K4xauhm16YYrUJ3NUcUNuQqcabsN81xxqEazNYZQp62 GGJWd9oBZAoojYQWppirzNDWADcCzCPLWeqe4VqgWMFU GogC92fWAm7dSZF6kMBfTdYyNdLPmJyDEpnAaW4xeh8L EyrEiCifydwypSJV34GyozQ5GBeKPZrm6VSfWr5AWzae sV6z7ngGPRWfz2mUTSw1RwCCQFrh7ZdDvaVCX7Yt9im Adqh8922V4cK62EXoJv9wTf4aZb5J4CrihZUY9oiUTTV B2yX1YXqP5MzPkFSnjtZUrNM9CMx7AcRDnjMAyBJjmT7 8Q7jaeioUK2BmZ56VK347a13sy2jPNZHrcuYe4GSbnGF]
Info 2020-03-05 20:52:05.009 block_cache.go:353 Finish ApplySetRoot!
Info 2020-03-05 20:52:05.011 block_cache.go:331 Recover block progress:2000/2275
Warn 2020-03-05 20:52:05.028 block.go:134 verify block execute failed, blockNum: 59630542, blockHash: 2AUPBXCohkWiKCtRt1cHyTWujynaoc2APwExeA3z64RL, err: invalid chain_id, should be 1020, yours:1024
Info 2020-03-05 20:52:05.043 block_cache.go:395 Set linkedRootWitness to :[GGJWd9oBZAoojYQWppirzNDWADcCzCPLWeqe4VqgWMFU 2BynNHAadxFkpMKomNKWoELsqhEgQTCCD89qFVhXzYLC GogC92fWAm7dSZF6kMBfTdYyNdLPmJyDEpnAaW4xeh8L CcAJSA68JP6FSSGydnMFhrw71ahgymGvFGQMcLDVmyPY FuvYC9oqaKacep35GwuYsZPtqBcZiSGtx3pEUq8MU2qj FPJkVhos1bmSLbdwVMipB3Rywkf6WRWLxA6qjHyP4Bae 7WT3cBipf1AyE5hyTwbPwJRq7Lf39BYSwwJFdJ6wJByL CEvrA3hkDU8YBuaJyv8YRF2DC34WhrwH2phZmtbCcHXZ 6eq5CZYBXWH4GmLvDQ2ruMCwwDstqY1seo51vhgc3De6 31ibPtxBLW5e7yTsV9XSDVZ5Hs5w9n7UtHNzXpuP7EUB G5DPSoGy4J4y5ZzGQ5uPXbddJFCyzBzva2r5XjFSsNVa 6frvjXKU1Etv41sqyBjCHv3WeUhP21VR9PL4emJteFRX AXWziEWvUzcpbYUiFoqinGX88JnPggz9uSuVfpwi6xY6 GiUzmFkgK7ofvuxjSLMeL8nK46UXALDDeSPh31C18FRZ CTj4eE1FcjDL2GbGzLzMWA9i9wPE7mgA4q3papUWPGXw y6u3XeZFf9tACn3rxqV54FnYqTJ4U2gp1XDRnYb2w8K 6MVV9cRvKtGeeijN7RQMVaAJBZ6Pqj8hczTdoYPdcift AceLkScRaMNDZfaTUbHS8UJ5GCELs7gctKscnW1Eh3gT 4K4xauhm16YYrUJ3NUcUNuQqcabsN81xxqEazNYZQp62 EyrEiCifydwypSJV34GyozQ5GBeKPZrm6VSfWr5AWzae sV6z7ngGPRWfz2mUTSw1RwCCQFrh7ZdDvaVCX7Yt9im Adqh8922V4cK62EXoJv9wTf4aZb5J4CrihZUY9oiUTTV]
Info 2020-03-05 20:52:05.044 collector.go:39 Add node metrics: diskstats
Info 2020-03-05 20:52:05.044 collector.go:68 Node metrics started.
Info 2020-03-05 20:52:05.045 net_service.go:112 local multiaddr: /ip4/127.0.0.1/tcp/30000/ipfs/12D3KooWCxrh7s7ZcWcwMZaUXdJdeZiSciGsSAYbQ5BPw8eo67NQ
Info 2020-03-05 20:52:05.045 net_service.go:112 local multiaddr: /ip4/172.18.0.2/tcp/30000/ipfs/12D3KooWCxrh7s7ZcWcwMZaUXdJdeZiSciGsSAYbQ5BPw8eo67NQ
Info 2020-03-05 20:52:05.046 peer_manager.go:467 no routing file. file=/var/lib/iserver/p2p/routing.table
Info 2020-03-05 20:52:07.046 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:09.047 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:11.047 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:13.047 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:15.047 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:17.048 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:19.048 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:21.048 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:23.048 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:25.049 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:27.049 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:29.049 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:31.049 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:33.050 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:35.050 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:37.050 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:39.051 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:41.051 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:43.051 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:45.051 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:47.052 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:49.052 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:51.052 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:53.053 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:55.053 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:57.053 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:52:59.053 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:53:01.054 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:53:03.054 sync.go:170 Syncing block in [59630542 59631541]...
Info 2020-03-05 20:53:05.054 sync.go:170 Syncing block in [59630542 59631541]...
ccding commented 4 years ago

can you run iwallet state and see how many nodes your server has connected to?

egorsmkv commented 4 years ago
root@37c673c00d95:/workdir# ./iwallet state
Connecting to server localhost:30002 ...
{
    "buildTime": "20191213_041250+0000",
    "gitHash": "be629f19cbed8489142a901f5612fbf2fb55a729",
    "mode": "ModeNormal",
    "network": {
        "id": "12D3KooWCxrh7s7ZcWcwMZaUXdJdeZiSciGsSAYbQ5BPw8eo67NQ",
        "peerCount": 0
    },
    "codeVersion": "3.3.1",
    "serverTime": "1583475335624809933",
    "netName": "debugnet",
    "protocolVersion": "1.0",
    "chainId": 1020,
    "headBlock": "59630541",
    "headBlockHash": "68pULGKoc7FGvPfghnJFvhYzbxH7Dw1wisgZ4npxppTC",
    "libBlock": "59630541",
    "libBlockHash": "68pULGKoc7FGvPfghnJFvhYzbxH7Dw1wisgZ4npxppTC",
    "witnessList": [
        "31ibPtxBLW5e7yTsV9XSDVZ5Hs5w9n7UtHNzXpuP7EUB",
        "G5DPSoGy4J4y5ZzGQ5uPXbddJFCyzBzva2r5XjFSsNVa",
        "6frvjXKU1Etv41sqyBjCHv3WeUhP21VR9PL4emJteFRX",
        "AXWziEWvUzcpbYUiFoqinGX88JnPggz9uSuVfpwi6xY6",
        "GiUzmFkgK7ofvuxjSLMeL8nK46UXALDDeSPh31C18FRZ",
        "CTj4eE1FcjDL2GbGzLzMWA9i9wPE7mgA4q3papUWPGXw",
        "y6u3XeZFf9tACn3rxqV54FnYqTJ4U2gp1XDRnYb2w8K",
        "6MVV9cRvKtGeeijN7RQMVaAJBZ6Pqj8hczTdoYPdcift",
        "AceLkScRaMNDZfaTUbHS8UJ5GCELs7gctKscnW1Eh3gT",
        "4K4xauhm16YYrUJ3NUcUNuQqcabsN81xxqEazNYZQp62",
        "GGJWd9oBZAoojYQWppirzNDWADcCzCPLWeqe4VqgWMFU",
        "GogC92fWAm7dSZF6kMBfTdYyNdLPmJyDEpnAaW4xeh8L",
        "EyrEiCifydwypSJV34GyozQ5GBeKPZrm6VSfWr5AWzae",
        "sV6z7ngGPRWfz2mUTSw1RwCCQFrh7ZdDvaVCX7Yt9im",
        "Adqh8922V4cK62EXoJv9wTf4aZb5J4CrihZUY9oiUTTV",
        "B2yX1YXqP5MzPkFSnjtZUrNM9CMx7AcRDnjMAyBJjmT7",
        "8Q7jaeioUK2BmZ56VK347a13sy2jPNZHrcuYe4GSbnGF"
    ],
    "libWitnessList": [
        "31ibPtxBLW5e7yTsV9XSDVZ5Hs5w9n7UtHNzXpuP7EUB",
        "G5DPSoGy4J4y5ZzGQ5uPXbddJFCyzBzva2r5XjFSsNVa",
        "6frvjXKU1Etv41sqyBjCHv3WeUhP21VR9PL4emJteFRX",
        "AXWziEWvUzcpbYUiFoqinGX88JnPggz9uSuVfpwi6xY6",
        "GiUzmFkgK7ofvuxjSLMeL8nK46UXALDDeSPh31C18FRZ",
        "CTj4eE1FcjDL2GbGzLzMWA9i9wPE7mgA4q3papUWPGXw",
        "y6u3XeZFf9tACn3rxqV54FnYqTJ4U2gp1XDRnYb2w8K",
        "6MVV9cRvKtGeeijN7RQMVaAJBZ6Pqj8hczTdoYPdcift",
        "AceLkScRaMNDZfaTUbHS8UJ5GCELs7gctKscnW1Eh3gT",
        "4K4xauhm16YYrUJ3NUcUNuQqcabsN81xxqEazNYZQp62",
        "GGJWd9oBZAoojYQWppirzNDWADcCzCPLWeqe4VqgWMFU",
        "GogC92fWAm7dSZF6kMBfTdYyNdLPmJyDEpnAaW4xeh8L",
        "EyrEiCifydwypSJV34GyozQ5GBeKPZrm6VSfWr5AWzae",
        "sV6z7ngGPRWfz2mUTSw1RwCCQFrh7ZdDvaVCX7Yt9im",
        "Adqh8922V4cK62EXoJv9wTf4aZb5J4CrihZUY9oiUTTV",
        "B2yX1YXqP5MzPkFSnjtZUrNM9CMx7AcRDnjMAyBJjmT7",
        "8Q7jaeioUK2BmZ56VK347a13sy2jPNZHrcuYe4GSbnGF"
    ],
    "pendingWitnessList": [
        "31ibPtxBLW5e7yTsV9XSDVZ5Hs5w9n7UtHNzXpuP7EUB",
        "G5DPSoGy4J4y5ZzGQ5uPXbddJFCyzBzva2r5XjFSsNVa",
        "6frvjXKU1Etv41sqyBjCHv3WeUhP21VR9PL4emJteFRX",
        "AXWziEWvUzcpbYUiFoqinGX88JnPggz9uSuVfpwi6xY6",
        "GiUzmFkgK7ofvuxjSLMeL8nK46UXALDDeSPh31C18FRZ",
        "CTj4eE1FcjDL2GbGzLzMWA9i9wPE7mgA4q3papUWPGXw",
        "y6u3XeZFf9tACn3rxqV54FnYqTJ4U2gp1XDRnYb2w8K",
        "6MVV9cRvKtGeeijN7RQMVaAJBZ6Pqj8hczTdoYPdcift",
        "AceLkScRaMNDZfaTUbHS8UJ5GCELs7gctKscnW1Eh3gT",
        "4K4xauhm16YYrUJ3NUcUNuQqcabsN81xxqEazNYZQp62",
        "GGJWd9oBZAoojYQWppirzNDWADcCzCPLWeqe4VqgWMFU",
        "GogC92fWAm7dSZF6kMBfTdYyNdLPmJyDEpnAaW4xeh8L",
        "EyrEiCifydwypSJV34GyozQ5GBeKPZrm6VSfWr5AWzae",
        "sV6z7ngGPRWfz2mUTSw1RwCCQFrh7ZdDvaVCX7Yt9im",
        "Adqh8922V4cK62EXoJv9wTf4aZb5J4CrihZUY9oiUTTV",
        "B2yX1YXqP5MzPkFSnjtZUrNM9CMx7AcRDnjMAyBJjmT7",
        "8Q7jaeioUK2BmZ56VK347a13sy2jPNZHrcuYe4GSbnGF"
    ],
    "headBlockTime": "1580532833500156267",
    "libBlockTime": "1580532833500156267"
}

I think, the "peerCount": 0 field does show it?

ccding commented 4 years ago

you have to wait until it grows to a higher number

egorsmkv commented 4 years ago

I waited a lot of time, can I speed it up?

jerkyrs commented 4 years ago

Stop container. Remove the p2p.routing file. Restart. This rediscovers new peers.

Ensure you have SSD or NVME data disk attached and high GHz CPU clocks.

egorsmkv commented 4 years ago

@jerkyrs I think this file does not exist:

Info 2020-03-07 07:49:35.230 peer_manager.go:467 no routing file. file=/var/lib/iserver/p2p/routing.table
ccding commented 4 years ago

It's an Info, not a Warning or Error. You can see it has created a brand new routing file.

egorsmkv commented 4 years ago

I've ran the container, entered into it and I haven't seen this file. @jerkyrs said about this file?

lispc commented 4 years ago

Maybe you can have a try this: https://developers.iost.io/docs/en/4-running-iost-node/Deployment.html#snapshot-with-pruned-history

egorsmkv commented 4 years ago

@lispc okay, I will try it. Thanks.