资源管理器3.7和结构版本1.2.0出现一个错误。
控制台显示错误:
Sync process is started for the network : [dev] and client : [client] >>>>>>>>>>>>>>>>>>>> Error : [ 'Failed to connect client peer, please check the configuration and peer status' ] >>>>>>>>>>>>>>>>>>>>
blockchain-explorer / logs / sync / app / app.log显示错误
[2018-09-28 13:41:10.692] [DEBUG] FabricClient - Channel genesis hash for channel [mychannel] >> e520121a6edb2794eb85505d5f5319d29286acb43d0280e0f0f75a130e79889c [2018-09-28 13:41:10.692] [DEBUG] FabricClient - Initialized channel >> mychannel [2018-09-28 13:41:10.723] [DEBUG] FabricClient - Set client [client-1] default orderer as >> grpcs://orderer.yx.com:7050 [2018-09-28 13:41:10.724] [DEBUG] FabricClient - Admin peer Not found for grpcs://peer0.org1.yx.com:7051 [2018-09-28 13:49:22.980] [DEBUG] Sync - Start synchronizer
我的config.json文件是:
{ "network-configs": { "dev": { "version": "1.0", "clients": { "client": { "tlsEnable": true, "organization": "Org1MSP", "channel": "mychannel", "credentialStore": { "path": "./tmp/credentialStore_Org1/credential", "cryptoStore": { "path": "./tmp/credentialStore_Org1/crypto" } } } }, "channels": { "mychannel": { "peers": { "peer0.org1.yx.com": {} }, "connection": { "timeout": { "peer": { "endorser": "6000", "eventHub": "6000", "eventReg": "6000" } } } } }, "organizations": { "Org1MSP": { "mspid": "Org1MSP", "fullpath": false, "adminPrivateKey": { "path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/Admin@org1.yx.com/msp/keystore" }, "signedCert": { "path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/Admin@org1.yx.com/msp/signcerts" } }, "OrdererMSP": { "mspid": "OrdererMSP", "adminPrivateKey": { "path": "/root/blockchain-explorer/examples/dockerConfig/crypto/ordererOrganizations/yx.com/users/Admin@yx.com/msp/keystore" } } }, "peers": { "peer0.org1.yx.com": { "tlsCACerts": { "path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/peers/peer0.org1.yx.com/tls/ca.crt" }, "url": "grpcs://peer0.org1.yx.com:7051", "eventUrl": "grpcs://peer0.org1.yx.com:7053", "grpcOptions": { "ssl-target-name-override": "peer0.org1.yx.com" } } }, "orderers": { "orderer.yx.com": { "url": "grpcs://orderer.yx.com:7050" } } }, "configtxgenToolPath": "/root/blockchain-explorer/bin", "license": "Apache-2.0" } }
CentOS7中的主机文件是
192.168.2.220 orderer.yx.com 192.168.2.221 cli.yx.com 192.168.2.222 peer0.org1.yx.com 192.168.2.223 peer1.org1.yx.com 192.168.2.224 peer0.org2.yx.com
答案 0 :(得分:0)
确保您的docker compose文件中存在CORE_PEER_GOSSIP_EXTERNALENDPOINT,该文件适用于对等端,并且grpc和grpcs配置正确。
答案 1 :(得分:0)
您可以尝试将url,对等方的eventUrl,订购者更改为ip地址,例如:
"peer0.org1.yx.com": {
"tlsCACerts": {
"path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/peers/peer0.org1.yx.com/tls/ca.crt"
},
"url": "grpcs://192.168.2.222:7051",
"eventUrl": "grpcs://192.168.2.222:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.yx.com"
}
}