upgrade not working


Park, Jungil
 

 

Hi Team,

 

I am using 1.4.0 with couchdb and tried to upgrade to 2.0.

I use the following commands.

 

1.               command

docker run --rm -v /opt/hyperledger/production/peer0org1:/var/hyperledger/production/ \

            -v /opt/hfabric.v1x/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp/ \

            --name peer0.org1.example.com \

            --env CORE_LEDGER_STATE_STATEDATABASE=CouchDB  \

            hyperledger/fabric-peer:2.0 peer node upgrade-dbs

2.               ouput

 

2020-03-30 11:29:56.778 UTC [kvledger] UpgradeDBs -> INFO 001 Ledger data folder from config = [/var/hyperledger/production/ledgersData]

2020-03-30 11:29:56.783 UTC [kvledger] dropStateLevelDB -> INFO 002 Dropping StateLevelDB at location [/var/hyperledger/production/ledgersData/stateLeveldb] ...if present

2020-03-30 11:29:56.783 UTC [kvledger] dropConfigHistoryDB -> INFO 003 Dropping ConfigHistoryDB at location [/var/hyperledger/production/ledgersData/configHistory]

2020-03-30 11:29:56.784 UTC [kvledger] dropBookkeeperDB -> INFO 004 Dropping BookkeeperDB at location [/var/hyperledger/production/ledgersData/bookkeeper]

2020-03-30 11:29:56.784 UTC [kvledger] dropHistoryDB -> INFO 005 Dropping HistoryDB at location [/var/hyperledger/production/ledgersData/historyLeveldb] ...if present

2020-03-30 11:29:56.784 UTC [fsblkstorage] DeleteBlockStoreIndex -> INFO 006 Dropping the index dir [/var/hyperledger/production/ledgersData/chains/index]... if present

 

 

 

 

3.               second command

docker run --rm -v /opt/hyperledger/production/peer0org1:/var/hyperledger/production/ \

            -v /opt/hfabric.v1x/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp/ \

            --name peer0.org1.example.com \

            hyperledger/fabric-peer:2.0 peer node start

 

 

 

4.               ouput :

5.  2020-03-30 09:00:24.383 UTC [nodeCmd] serve -> INFO 001 Starting peer:

6.   Version: 2.0.0

7.   Commit SHA: 0432c3e

8.   Go version: go1.13.4

9.   OS/Arch: linux/amd64

10.  Chaincode:

11.   Base Docker Namespace: hyperledger

12.   Base Docker Label: org.hyperledger.fabric

13.   Docker Namespace: hyperledger

14. 2020-03-30 09:00:24.384 UTC [peer] getLocalAddress -> INFO 002 Auto-detected peer address: 172.17.0.2:7051

15. 2020-03-30 09:00:24.384 UTC [peer] getLocalAddress -> INFO 003 Host is 0.0.0.0 , falling back to auto-detected address: 172.17.0.2:7051

16. 2020-03-30 09:00:24.414 UTC [gossip.service] New -> INFO 004 Initialize gossip with endpoint 172.17.0.2:7051

17. 2020-03-30 09:00:24.416 UTC [gossip.gossip] New -> INFO 005 Creating gossip service with self membership of Endpoint: , InternalEndpoint: 172.17.0.2:7051, PKI-ID: 65dfd2f8791c19aacad25b10a94d2db1219f7be324344483be4bdf8aee89bd3b, Metadata:

18. 2020-03-30 09:00:24.416 UTC [gossip.gossip] New -> WARN 006 External endpoint is empty, peer will not be accessible outside of its organization

19. 2020-03-30 09:00:24.416 UTC [gossip.gossip] start -> INFO 007 Gossip instance 172.17.0.2:7051 started

20. 2020-03-30 09:00:24.417 UTC [ledgermgmt] NewLedgerMgr -> INFO 008 Initializing LedgerMgr

21. 2020-03-30 09:00:24.456 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 009 DB is empty Setting db format as 2.0

22. 2020-03-30 09:00:24.483 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00a DB is empty Setting db format as 2.0

23. 2020-03-30 09:00:24.484 UTC [ledgermgmt] NewLedgerMgr -> INFO 00b Initialized LedgerMgr

24. 2020-03-30 09:00:24.484 UTC [lifecycle] InitializeLocalChaincodes -> INFO 00c Initialized lifecycle cache with 0 already installed chaincodes

25. 2020-03-30 09:00:24.485 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00d Entering computeChaincodeEndpoint with peerHostname: 172.17.0.2

26. 2020-03-30 09:00:24.485 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00e Exit with ccEndpoint: 172.17.0.2:7052

27. 2020-03-30 09:00:24.485 UTC [nodeCmd] createChaincodeServer -> WARN 00f peer.chaincodeListenAddress is not set, using 172.17.0.2:7052

28. 2020-03-30 09:00:24.490 UTC [sccapi] DeploySysCC -> INFO 010 deploying system chaincode 'lscc'

29. 2020-03-30 09:00:24.490 UTC [sccapi] DeploySysCC -> INFO 011 deploying system chaincode 'cscc'

30. 2020-03-30 09:00:24.490 UTC [sccapi] DeploySysCC -> INFO 012 deploying system chaincode 'qscc'

31. 2020-03-30 09:00:24.490 UTC [sccapi] DeploySysCC -> INFO 013 deploying system chaincode '_lifecycle'

32. 2020-03-30 09:00:24.490 UTC [nodeCmd] serve -> INFO 014 Deployed system chaincodes

33. 2020-03-30 09:00:24.490 UTC [peer] Initialize -> INFO 015 Loading chain mychannel

34. 2020-03-30 09:00:24.490 UTC [ledgermgmt] OpenLedger -> INFO 016 Opening ledger with id = mychannel

35. 2020-03-30 09:00:24.491 UTC [fsblkstorage] newBlockfileMgr -> INFO 017 Getting block information from block storage

36. 2020-03-30 09:00:24.540 UTC [fsblkstorage] syncIndex -> INFO 018 Start building index from block [0] to last block [35356]

37. 2020-03-30 09:00:24.542 UTC [fsblkstorage] syncIndex -> INFO 019 Indexed block number [0]

38. 2020-03-30 09:00:35.837 UTC [fsblkstorage] syncIndex -> INFO 01a Indexed block number [10000]

39. 2020-03-30 09:00:47.392 UTC [fsblkstorage] syncIndex -> INFO 01b Indexed block number [20000]

40. 2020-03-30 09:01:00.008 UTC [fsblkstorage] syncIndex -> INFO 01c Indexed block number [30000]

41. 2020-03-30 09:01:06.764 UTC [fsblkstorage] syncIndex -> INFO 01d Finished building index. Last block indexed [35356]

42. 2020-03-30 09:01:06.764 UTC [kvledger] recommitLostBlocks -> INFO 01e Recommitting lost blocks - firstBlockNum=0, lastBlockNum=35356, recoverables=[]kvledger.recoverable{(*lockbasedtxmgr.LockBasedTxMgr)(0xc00021cfa0), (*history.DB)(0xc005fda980)}

43. 2020-03-30 09:01:06.765 UTC [lockbasedtxmgr] CommitLostBlock -> INFO 01f Recommitting block [0] to state database

44. 2020-03-30 09:01:06.766 UTC [history] CommitLostBlock -> INFO 020 Recommitting block [0] to history database

45. 2020-03-30 09:01:06.772 UTC [cceventmgmt] HandleStateUpdates -> INFO 021 Channel [mychannel]: Handling deploy or update of chaincode [chaincode]

46. 2020-03-30 09:01:06.778 UTC [valimpl] preprocessProtoBlock -> WARN 022 Channel [mychannel]: Block [4] Transaction index [0] TxId [b5199e1b5d1f4522eca11680757652ae2882ebce5b66d4b534e5a5ccfcd3562d] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]

47. 2020-03-30 09:01:09.088 UTC [lockbasedtxmgr] CommitLostBlock -> INFO 023 Recommitting block [1000] to state database

48. 2020-03-30 09:01:09.090 UTC [history] CommitLostBlock -> INFO 024 Recommitting block [1000] to history database

49. 2020-03-30 09:01:11.437 UTC [lockbasedtxmgr] CommitLostBlock -> INFO 025 Recommitting block [2000] to state database

50. 2020-03-30 09:01:11.438 UTC [history] CommitLostBlock -> INFO 026 Recommitting block [2000] to history database

51. 2020-03-30 09:01:13.755 UTC [lockbasedtxmgr] CommitLostBlock -> INFO 027 Recommitting block [3000] to state database

52. 2020-03-30 09:01:13.756 UTC [history] CommitLostBlock -> INFO 028 Recommitting block [3000] to history database

53. 2020-03-30 09:01:16.122 UTC [lockbasedtxmgr] CommitLostBlock -> INFO 029 Recommitting block [4000] to state database

54. 2020-03-30 09:01:16.123 UTC [history] CommitLostBlock -> INFO 02a Recommitting block [4000] to history database

55. 2020-03-30 09:01:16.836 UTC [valimpl] preprocessProtoBlock -> WARN 02b Channel [mychannel]: Block [4297] Transaction index [2] TxId [8a17e87c38c6c8f99e59166695feae179cf5ca99494a6167fe23e7ff23c104e9] marked as invalid by committer. Reason code [MVCC_READ_CONFLICT]

56. 2020-03-30 09:01:16.836 UTC [valimpl] preprocessProtoBlock -> WARN 02c Channel [mychannel]: Block [4297] Transaction index [3] TxId [c78daa54b1c61f6c54d330af34649137d719374bf43a7a8189ae5d09dc1f31ad] marked as invalid by committer. Reason code [MVCC_READ_CONFLICT]

 

 

 

 

 

After this, still I got error below

 

2020-03-30 11:33:03.108 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00a DB is empty Setting db format as 2.0

2020-03-30 11:33:03.195 UTC [kvledger] func1 -> ERRO 00b Please execute the 'peer node upgrade-dbs' command to upgrade the database format: unexpected format. db info = [CouchDB for state database], data format = [], expected format = [2.0]

2020-03-30 11:33:03.195 UTC [gossip.gossip] Stop -> INFO 00c Stopping gossip

2020-03-30 11:33:03.195 UTC [gossip.discovery] Stop -> INFO 00d Stopping

2020-03-30 11:33:03.195 UTC [gossip.discovery] Stop -> INFO 00e Stopped

2020-03-30 11:33:03.195 UTC [gossip.comm] Stop -> INFO 00f Stopping

2020-03-30 11:33:03.195 UTC [gossip.comm] Stop -> INFO 010 Stopped

panic: Error in instantiating ledger provider: unexpected format. db info = [CouchDB for state database], data format = [], expected format = [2.0]

goroutine 1 [running]:

 

 

 

 

Does anyone any idea what happen here?

 

 

Thanks,

Jungil.

 

 

 

 

 

This message has been sent by ABN AMRO Bank N.V., which has its seat at Gustav Mahlerlaan 10 (1082 PP) Amsterdam, the Netherlands, and is registered in the Commercial Register of Amsterdam under number 34334259.

Join fabric@lists.hyperledger.org to automatically receive all group messages.