问题
I am trying to run the byfn network in Hyperledger Fabric for version 1.4. I have started the containers, the crypto materials are setup, configuration is setup and the channel is created. However when it comes to the peer joining step i get the following error
+ peer channel join -b mychannel.block
+ res=1
+ set +x
2020-02-12 07:53:23.356 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2020-02-12 07:53:23.395 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2020-02-12 07:53:25.695 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
Error: proposal failed (err: rpc error: code = Unavailable desc = transport is closing)
peer0.org1 failed to join the channel, Retry after 3 seconds
One of the peers (three in which i setup stops running) , here are its logs
> 2020-02-12 17:30:58.077 UTC [msp] getMspConfig -> INFO 001 Loading
> NodeOUs 2020-02-12 17:30:58.159 UTC [nodeCmd] serve -> INFO 002
> Starting peer: Version: 1.1.0 Go version: go1.9.2 OS/Arch:
> linux/amd64 Experimental features: false Chaincode: Base Image
> Version: 0.4.6 Base Docker Namespace: hyperledger Base Docker
> Label: org.hyperledger.fabric Docker Namespace: hyperledger
>
> 2020-02-12 17:30:58.160 UTC [ledgermgmt] initialize -> INFO 003
> Initializing ledger mgmt 2020-02-12 17:30:58.160 UTC [kvledger]
> NewProvider -> INFO 004 Initializing ledger provider 2020-02-12
> 17:30:58.189 UTC [couchdb] handleRequest -> WARN 005 Retrying couchdb
> request in 125ms. Attempt:1 Error:Get http://couchdb0:5984/: dial tcp
> 172.20.0.4:5984: getsockopt: connection refused 2020-02-12 17:30:58.326 UTC [couchdb] handleRequest -> WARN 006 Retrying couchdb
> request in 250ms. Attempt:2 Error:Get http://couchdb0:5984/: dial tcp
> 172.20.0.4:5984: getsockopt: connection refused 2020-02-12 17:30:58.580 UTC [couchdb] handleRequest -> WARN 007 Retrying couchdb
> request in 500ms. Attempt:3 Error:Get http://couchdb0:5984/: dial tcp
> 172.20.0.4:5984: getsockopt: connection refused 2020-02-12 17:30:59.083 UTC [couchdb] handleRequest -> WARN 008 Retrying couchdb
> request in 1s. Attempt:4 Error:Get http://couchdb0:5984/: dial tcp
> 172.20.0.4:5984: getsockopt: connection refused 2020-02-12 17:31:00.084 UTC [couchdb] handleRequest -> WARN 009 Retrying couchdb
> request in 2s. Attempt:5 Error:Get http://couchdb0:5984/: dial tcp
> 172.20.0.4:5984: getsockopt: connection refused 2020-02-12 17:31:02.245 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00a
> Created state database _users 2020-02-12 17:31:02.284 UTC [couchdb]
> CreateDatabaseIfNotExist -> INFO 00b Created state database
> _replicator 2020-02-12 17:31:02.327 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00c Created state database
> _global_changes 2020-02-12 17:31:02.333 UTC [kvledger] NewProvider -> INFO 00d ledger provider Initialized 2020-02-12 17:31:02.333 UTC
> [ledgermgmt] initialize -> INFO 00e ledger mgmt initialized 2020-02-12
> 17:31:02.334 UTC [peer] func1 -> INFO 00f Auto-detected peer address:
> 172.20.0.7:7051 2020-02-12 17:31:02.334 UTC [peer] func1 -> INFO 010 Returning peer0.nh.state.com:7051 2020-02-12 17:31:02.334 UTC [peer]
> func1 -> INFO 011 Auto-detected peer address: 172.20.0.7:7051
> 2020-02-12 17:31:02.334 UTC [peer] func1 -> INFO 012 Returning
> peer0.nh.state.com:7051 2020-02-12 17:31:02.339 UTC [nodeCmd] serve ->
> INFO 013 Starting peer with TLS enabled 2020-02-12 17:31:02.342 UTC
> [eventhub_producer] start -> INFO 014 Event processor started
> 2020-02-12 17:31:02.342 UTC [nodeCmd] computeChaincodeEndpoint -> INFO
> 015 Entering computeChaincodeEndpoint with peerHostname:
> peer0.nh.state.com 2020-02-12 17:31:02.342 UTC [nodeCmd]
> computeChaincodeEndpoint -> INFO 016 Exit with ccEndpoint:
> peer0.nh.state.com:7052 2020-02-12 17:31:02.342 UTC [nodeCmd]
> createChaincodeServer -> WARN 017 peer.chaincodeListenAddress is not
> set, using peer0.nh.state.com:7052 2020-02-12 17:31:02.346 UTC
> [chaincode] NewChaincodeSupport -> INFO 018 Chaincode support using
> peerAddress: peer0.nh.state.com:7052 2020-02-12 17:31:02.346 UTC
> [sccapi] registerSysCC -> INFO 019 system chaincode
> cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
> 2020-02-12 17:31:02.346 UTC [sccapi] registerSysCC -> INFO 01a system
> chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
> 2020-02-12 17:31:02.346 UTC [sccapi] registerSysCC -> INFO 01b system
> chaincode escc(github.com/hyperledger/fabric/core/scc/escc) registered
> 2020-02-12 17:31:02.347 UTC [sccapi] registerSysCC -> INFO 01c system
> chaincode vscc(github.com/hyperledger/fabric/core/scc/vscc) registered
> 2020-02-12 17:31:02.347 UTC [sccapi] registerSysCC -> INFO 01d system
> chaincode qscc(github.com/hyperledger/fabric/core/chaincode/qscc)
> registered 2020-02-12 17:31:02.349 UTC [gossip/service] func1 -> INFO
> 01e Initialize gossip with endpoint peer0.nh.state.com:7051 and
> bootstrap set [peer0.nh.state.com:7051] 2020-02-12 17:31:02.350 UTC
> [msp] DeserializeIdentity -> INFO 01f Obtaining identity 2020-02-12
> 17:31:02.352 UTC [gossip/discovery] NewDiscoveryService -> INFO 020
> Started {peer0.nh.state.com:7051 [] [132 124 63 60 202 190 244 162 49
> 157 13 175 168 77 64 35 99 214 142 61 34 68 67 29 120 171 58 42 212
> 114 86 2] peer0.nh.state.com:7051 <nil>} incTime is
> 1581528662352046555 2020-02-12 17:31:02.352 UTC [gossip/gossip]
> NewGossipService -> INFO 021 Creating gossip service with self
> membership of {peer0.nh.state.com:7051 [] [132 124 63 60 202 190 244
> 162 49 157 13 175 168 77 64 35 99 214 142 61 34 68 67 29 120 171 58 42
> 212 114 86 2] peer0.nh.state.com:7051 <nil>} 2020-02-12 17:31:02.353
> UTC [gossip/gossip] start -> INFO 022 Gossip instance
> peer0.nh.state.com:7051 started 2020-02-12 17:31:02.354 UTC [cscc]
> Init -> INFO 023 Init CSCC 2020-02-12 17:31:02.354 UTC [sccapi]
> deploySysCC -> INFO 024 system chaincode
> cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed 2020-02-12
> 17:31:02.355 UTC [sccapi] deploySysCC -> INFO 025 system chaincode
> lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed 2020-02-12
> 17:31:02.356 UTC [escc] Init -> INFO 026 Successfully initialized ESCC
> 2020-02-12 17:31:02.356 UTC [sccapi] deploySysCC -> INFO 027 system
> chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
> 2020-02-12 17:31:02.357 UTC [sccapi] deploySysCC -> INFO 028 system
> chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
> 2020-02-12 17:31:02.357 UTC [qscc] Init -> INFO 029 Init QSCC
> 2020-02-12 17:31:02.357 UTC [sccapi] deploySysCC -> INFO 02a system
> chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc)
> deployed 2020-02-12 17:31:02.357 UTC [nodeCmd] initSysCCs -> INFO 02b
> Deployed system chaincodes 2020-02-12 17:31:02.358 UTC [nodeCmd] serve
> -> INFO 02c Starting peer with ID=[name:"peer0.nh.state.com" ], network ID=[dev], address=[peer0.nh.state.com:7051] 2020-02-12
> 17:31:02.358 UTC [nodeCmd] serve -> INFO 02d Started peer with
> ID=[name:"peer0.nh.state.com" ], network ID=[dev],
> address=[peer0.nh.state.com:7051] 2020-02-12 17:31:02.359 UTC
> [nodeCmd] func7 -> INFO 02e Starting profiling server with
> listenAddress = 0.0.0.0:6060 2020-02-12 17:31:02.631 UTC [ledgermgmt]
> CreateLedger -> INFO 02f Creating ledger [cdcchannel] with genesis
> block 2020-02-12 17:31:02.635 UTC [fsblkstorage] newBlockfileMgr ->
> INFO 030 Getting block information from block storage 2020-02-12
> 17:31:02.688 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 031
> Created state database cdcchannel_ 2020-02-12 17:31:02.712 UTC
> [kvledger] CommitWithPvtData -> INFO 032 Channel [cdcchannel]:
> Committed block [0] with 1 transaction(s) 2020-02-12 17:31:02.730 UTC
> [couchdb] CreateCouchDatabase -> ERRO 033 Error during CouchDB
> CreateDatabaseIfNotExist() for dbName: cdcchannel_ error: json:
> cannot unmarshal string into Go struct field DBInfo.purge_seq of type
> int panic: Error during commit to txmgr:json: cannot unmarshal string
> into Go struct field DBInfo.purge_seq of type int
>
> goroutine 155 [running]:
> github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).CommitWithPvtData(0xc420141dc0,
> 0xc421525710, 0x0, 0x0)
> /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger.go:251
> +0x921 github.com/hyperledger/fabric/core/ledger/kvledger.(*Provider).Create(0xc42017a300,
> 0xc4215f4180, 0x27, 0xc4215d7850, 0x1, 0x1)
> /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger_provider.go:107
> +0x37f github.com/hyperledger/fabric/core/ledger/ledgermgmt.CreateLedger(0xc4215f4180,
> 0x0, 0x0, 0x0, 0x0)
> /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledger_mgmt.go:88
> +0x1ac github.com/hyperledger/fabric/core/peer.CreateChainFromBlock(0xc4215f4180,
> 0x40000000000, 0x10)
> /opt/gopath/src/github.com/hyperledger/fabric/core/peer/peer.go:433
> +0x64 github.com/hyperledger/fabric/core/scc/cscc.joinChain(0xc4215cefc0,
> 0xa, 0xc4215f4180, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
> /opt/gopath/src/github.com/hyperledger/fabric/core/scc/cscc/configure.go:212
> +0x65 github.com/hyperledger/fabric/core/scc/cscc.(*PeerConfiger).Invoke(0x169e160,
> 0x166f740, 0xc4214befa0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
> /opt/gopath/src/github.com/hyperledger/fabric/core/scc/cscc/configure.go:140
> +0xa1e github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc4201cc4d0,
> 0xc4214f5ce0)
> /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:329
> +0x4f3 created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction
> /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:295
> +0x49
any idea how to fix this ? thanks
来源:https://stackoverflow.com/questions/60183574/rpc-error-proposal-failed-when-peer-joins-channel-in-fabric