Hyperledger fabric 链码实例化以静默方式失败

Hyperledger fabric 链码实例化以静默方式失败,hyperledger-fabric,hyperledger-chaincode,Hyperledger Fabric,Hyperledger Chaincode,我尝试在我通过修改来自的byfn脚本创建的网络上安装并实例化chaincode\u Example2 chaincode。我使用2个Org,每个Org有1个对等点。我重新命名了orgs 对等容器即将出现,我能够在两个组织的对等上安装链码。当我实例化时,会出现chaincode容器。该命令不返回任何错误 但我无法查询链码。我无法在对等链码列表-实例化-C mychannel中找到链码 我已经尝试在没有任何修改的情况下运行byfn脚本,并且我能够完成端到端测试 对等日志 2019-08-22 08:

我尝试在我通过修改来自的byfn脚本创建的网络上安装并实例化chaincode\u Example2 chaincode。我使用2个Org,每个Org有1个对等点。我重新命名了orgs

对等容器即将出现,我能够在两个组织的对等上安装链码。当我实例化时,会出现chaincode容器。该命令不返回任何错误

但我无法查询链码。我无法在对等链码列表-实例化-C mychannel中找到链码

我已经尝试在没有任何修改的情况下运行byfn脚本,并且我能够完成端到端测试

对等日志

2019-08-22 08:46:29.062 UTC [ConnProducer] NewConnection -> ERRO 038 Failed connecting to {localhost:7050 [OrdererMSP]} , error: context deadline exceeded
2019-08-22 08:46:29.063 UTC [ConnProducer] NewConnection -> ERRO 039 Could not connect to any of the endpoints: [{localhost:7050 [OrdererMSP]}]
2019-08-22 08:46:29.063 UTC [deliveryClient] connect -> ERRO 03a Failed obtaining connection: could not connect to any of the endpoints: [{localhost:7050 [OrdererMSP]}]
2019-08-22 08:46:29.064 UTC [deliveryClient] try -> WARN 03b Got error: could not connect to any of the endpoints: [{localhost:7050 [OrdererMSP]}] , at 1 attempt. Retrying in 1s
2019-08-22 08:46:30.099 UTC [endorser] callChaincode -> INFO 03c [][276fe51c] Entry chaincode: name:"lscc"
2019-08-22 08:46:30.103 UTC [lscc] executeInstall -> INFO 03d Installed Chaincode [mycc] Version [1.0] to peer
2019-08-22 08:46:30.103 UTC [endorser] callChaincode -> INFO 03e [][276fe51c] Exit chaincode: name:"lscc"  (4ms)
2019-08-22 08:46:30.103 UTC [comm.grpc.server] 1 -> INFO 03f unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=192.168.0.5:54174 grpc.code=OK grpc.call_duration=5.100738ms
2019-08-22 08:46:30.200 UTC [endorser] callChaincode -> INFO 040 [ssidchannel][293c34bf] Entry chaincode: name:"lscc"
2019-08-22 08:46:30.220 UTC [chaincode.platform.golang] GenerateDockerBuild -> INFO 041 building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
2019-08-22 08:46:33.066 UTC [ConnProducer] NewConnection -> ERRO 042 Failed connecting to {localhost:7050 [OrdererMSP]} , error: context deadline exceeded
2019-08-22 08:46:33.066 UTC [ConnProducer] NewConnection -> ERRO 043 Could not connect to any of the endpoints: [{localhost:7050 [OrdererMSP]}]
2019-08-22 08:46:33.066 UTC [deliveryClient] connect -> ERRO 044 Failed obtaining connection: could not connect to any of the endpoints: [{localhost:7050 [OrdererMSP]}]
订购者日志

2019-08-22 08:46:16.512 UTC [orderer.commmon.multichannel] newChain -> INFO 00b Created and starting new chain ssidchannel
2019-08-22 08:46:16.518 UTC [common.deliver] Handle -> WARN 00c Error reading from 192.168.0.5:47044: rpc error: code = Canceled desc = context canceled
2019-08-22 08:46:16.518 UTC [comm.grpc.server] 1 -> INFO 00d streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.0.5:47044 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=55.824801ms
2019-08-22 08:46:23.203 UTC [orderer.common.broadcast] Handle -> WARN 00e Error reading from 192.168.0.5:47060: rpc error: code = Canceled desc = context canceled
2019-08-22 08:46:23.203 UTC [comm.grpc.server] 1 -> INFO 00f streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=192.168.0.5:47060 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=22.774639ms
链码容器日志

Aval = 100, Bval = 200
2019-08-22 08:20:10.458 UTC [shim] chatWithPeer -> ERRO 001 Received error from server, ending chaincode stream: rpc error: code = Unavailable desc = transport is closing
receive failed
github.com/hyperledger/fabric/core/chaincode/shim.chatWithPeer
        /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:362
github.com/hyperledger/fabric/core/chaincode/shim.Start
        /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:156
main.main
        /chaincode/input/src/fabric-samples/chaincode/chaincode_example02/go/chaincode_example02.go:195
runtime.main
        /opt/go/src/runtime/proc.go:201
runtime.goexit
        /opt/go/src/runtime/asm_amd64.s:1333
Error starting Simple chaincode: receive failed: rpc error: code = Unavailable desc = transport is closing

它清楚地表明对等方无法连接订购方

[OrderMsp]>>为什么这会出现在订购方端点列表中? 我想你做错了什么


[{localhost:7050[ordermsp]}]生成后的链码容器连接到与对等方和订购方不同的网络。我更改了peer-base.yaml文件中的CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE属性,以匹配DOCKER-compose-cli.yaml文件中的网络,从而解决了此问题

ERRO 044 Failed obtaining connection: could not connect to any of the endpoints: [{localhost:7050 [OrdererMSP]}]