Error: error getting broadcast client: orderer client failed to connect to orderer.example.com:7050:

Error: error getting broadcast client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded

超级账本实例化链代码时报错 , 

应该是连接order失败了 , 通过docker ps 命令查看order服务正常启动没啥问题 , 再查看一下自己的命令

 peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n faceccd -v 1.0 -c '{"Args":["init"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')"

发现问题所在 , 我在启动网络的时候是没有使用TLS的 , 这里加上了--tis参数 以及 --cafile , 然后我把这两个参数去掉

peer chaincode instantiate -o orderer.example.com:7050  -C mychannel -n faceccd -v 1.0 -c '{"Args":["init"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')"

实例化链代码成功! 

你可能感兴趣的:(报错记录)