我正在尝试在k8s上部署Hyperledger fabric 1.0.5,并使用余额转移对其进行测试。实例化链代码之前一切都正确,我明白了:
[2019-01-02 23:23:14.392] [ERROR] instantiate-chaincode - Failed to send instantiate transaction and get notifications within the timeout period. undefined
[2019-01-02 23:23:14.393] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined
我使用kubectl logs
来获取peer0的日志,如下所示:
[ConnProducer] NewConnection -> ERRO 61a Failed connecting to orderer2.orderer1:7050 , error: context deadline exceeded
[ConnProducer] NewConnection -> ERRO 61b Failed connecting to orderer1.orderer1:7050 , error: context deadline exceeded
[ConnProducer] NewConnection -> ERRO 61c Failed connecting to orderer0.orderer1:7050 , error: context deadline exceeded
[deliveryClient] connect -> DEBU 61d Connected to
[deliveryClient] connect -> ERRO 61e Failed obtaining connection: Could not connect to any of the endpoints: [orderer2.orderer1:7050 orderer1.orderer1:7050 orderer0.orderer1:7050]
我检查了orderer0:7050
的连通性,没发现问题。
接下来我该怎么办?
谢谢帮助!
答案 0 :(得分:1)
您没有描述部署Hyperledger Fabric遵循的运行手册,但看起来您的Pod无法彼此找到through DNS。如果您遵循Kubernetes标准,则您的Pod应该位于orderer1
命名空间中,希望orderer0
,orderer1
和orderer2
拥有Kubernetes services。 / p>
您可以在“光纤网组件之间的通信”部分中了解有关光纤网组件here之间的通信的更多信息。另外,请阅读“解决链码沙箱”,其中显示了--dns-search
的变通办法。
答案 1 :(得分:0)
这似乎是防火墙问题。
如果要在k8s上运行hlf,我禁用了防火墙服务。