===================== Channel 'mychannel' created =====================
Having all peers join the channel...
+ peer channel join -b mychannel.block
2019-03-09 13:16:07.975 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: proposal failed (err: rpc error: code = Unavailable desc = transport is closing)
+ res=1
+ set +x
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
+ res=1
+ set +x
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
+ res=1
+ set +x
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
+ res=1
+ set +x
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
+ res=1
+ set +x
!!!!!!!!!!!!!!! After 5 attempts, peer0.org1 has failed to join channel 'mychannel' !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
遇到这个问题,看起来是Peer节点尝试加入通道(channel)时失败了,具体原因是无法与endorser建立连接,报错信息中提到了“transport is closing”和"context deadline exceeded”。这通常意味着网络配置问题、防火墙限制、服务未正确启动或者TLS证书配置错误。以下是一些排查和解决的建议:
检查网络配置:确保所有组件之间的网络通信畅通无阻,包括peer节点之间、peer与orderer节点之间的连接。在阿里云ECS上,需要检查安全组规则是否允许必要的端口通信,例如7051(用于gRPC通信)。
重启Fabric组件:有时候,服务可能没有完全启动或运行异常。尝试重启peer节点和orderer节点的服务,确保它们都处于正常运行状态。
检查TLS配置:Hyperledger Fabric使用TLS进行安全通信,如果TLS证书或密钥不正确,可能会导致连接失败。确认core.yaml
中的TLS配置是否正确,包括CA根证书、服务器证书和私钥等,并且这些文件路径在系统中是可访问的。
查看日志:深入分析peer节点和orderer节点的日志文件,这些日志通常位于每个组件的数据目录下(如/var/hyperledger/production/logs
),可以提供更详细的错误信息,帮助定位问题。
防火墙设置:确认ECS实例上的防火墙以及阿里云的安全组策略没有阻止必要的端口通信。你需要开放包括但不限于7051、7053(gRPC)、7050(orderer)等端口。
时间同步:确保所有参与Fabric网络的节点(包括ECS实例)的时间同步准确。时间不同步也可能导致TLS握手失败或签名验证问题。
Docker网络:在使用Docker容器部署时,检查Docker网络配置是否正确,确保容器间能够相互通信。
版本兼容性:虽然你提到的是Fabric 1.2,但请确认你的所有组件(包括Fabric二进制文件、链码、依赖库等)版本相互兼容,有时版本不匹配也会引起这类问题。
逐一排查上述方面,应该能帮助你找到问题所在并解决。如果问题依旧,考虑在Hyperledger Fabric的官方社区或论坛寻求帮助,那里有更多专业人士可以提供针对性的解决方案。您可以复制页面截图提供更多信息,我可以进一步帮您分析问题原因。