hyperledger-fabric - 连接客户端peer失败,请检查配置和peer状态
问题描述
Explorer 3.7 和fabric 版本1.2.0 有一个错误。
控制台显示错误:
为网络启动同步过程:[dev] 和客户端:[client] >>>>>>>>>>>>>>>>>>>>>> 错误:['连接客户端对等失败,请检查配置和对等状态'] >>>>>>>>>>>>>>>>>>>>>>
blockchain-explorer/logs/sync/app/app.log 显示错误
[2018-09-28 13:41:10.692] [DEBUG] FabricClient - 通道 [mychannel] >> e520121a6edb2794eb85505d5f5319d29286acb43d0280e0f0f75a130e79889c 的通道创世哈希 [2018-09-28 13:41:10.692] [DEBUG] FabricClient - 初始化通道>> mychannel [2018-09-28 13:41:10.723] [DEBUG] FabricClient - 将客户端 [client-1] 默认排序器设置为 >> grpcs://orderer.yx.com:7050 [2018-09-28 13:41:10.724] [DEBUG] FabricClient - 管理员对等未找到 grpcs://peer0.org1.yx.com:7051 [2018-09-28 13:49:22.980] [DEBUG] 同步 - 启动同步器
我的 config.json 文件是:
{ “网络配置”:{ “开发”:{ “版本”:“1.0”, “客户”:{ “客户”: { “tlsEnable”:是的, “组织”:“Org1MSP”, “频道”:“我的频道”, “凭据存储”:{ "路径": "./tmp/credentialStore_Org1/credential", “加密商店”:{ “路径”:“./tmp/credentialStore_Org1/crypto” } } } }, “渠道”:{ “我的频道”:{ “同行”:{ “peer0.org1.yx.com”:{} }, “联系”: { “暂停”: { “同行”:{ “背书人”:“6000”, "eventHub": "6000", “事件注册”:“6000” } } } } }, “组织”:{ “组织1MSP”:{ "mspid": "Org1MSP", “全路径”:假, “adminPrivateKey”:{ “小路”: “/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/Admin@org1.yx.com/msp/keystore” }, “签名证书”:{ “小路”: “/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/Admin@org1.yx.com/msp/signcerts” } }, “订购者MSP”:{ "mspid": "OrdererMSP", “adminPrivateKey”:{ “路径”:“/root/blockchain-explorer/examples/dockerConfig/crypto/ordererOrganizations/yx.com/users/Admin@yx.com/msp/keystore” } } }, “同行”:{ “peer0.org1.yx.com”:{ “tlsCACerts”:{ “路径”:“/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", “grpc选项”:{ “ssl 目标名称覆盖”:“peer0.org1.yx.com” } } }, “订购者”:{ “orderer.yx.com”:{ “网址”:“grpcs://orderer.yx.com:7050” } } }, "configtxgenToolPath": "/root/blockchain-explorer/bin", “许可证”:“Apache-2.0” } }
CentOS7 中的 hosts 文件是
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
解决方案
您可以尝试将 url、peer 的 eventUrl、orderer 更改为 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"
}
}
推荐阅读
- asp.net-core - 如何在 IdentityServer4 中配置多个 Oidc 提供程序
- android - 在 RecyclerView 的 CardView 中打开多个项目的不同活动
- c# - C# 中的嵌套 HTTPWEBREQUESTS
- ios - 如何实现 Apple Wallet 应用程序界面?
- javascript - 我试图创建一个包含三个 Javascript 对象的网页
- powershell - Powershell:将多行字符串通过管道传递到解析路径的 -LiteralPath
- python - 在 Python 3 中异步等待方法完成
- vb.net - 在类外调用函数
- c# - 由于不同的上下文缺少 PK,Entity Framework Core 迁移失败
- javascript - 使用复选框显示/隐藏多个
我想用一个按钮在一页上显示和隐藏几个表格。不幸的是,我的脚本一次只能显示和隐藏一个表格。
我有一个包含很多查询的页面。表格中还有文本字段。为了更好地概览,带有文本字段的表格应仅在选中复选框时显示。不应在开始时单击该复选框。