Fabric 1.0安装链代码失败:认可者客户端无法连接到org1.example.com:7051

时间:2020-05-18 07:19:32

标签: hyperledger-fabric blockchain hyperledger-chaincode

我正在使用fabric 1.0,将链码安装到org1.example.com中时出现以下错误

我用于安装链码的命令是:

docker exec cli peer chaincode install -n mycc -v 1 -p github.com/chaincode/sacc

我得到的错误是:

Error: error getting endorser client for install: endorser client failed to connect to org1.example.com:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup org1.example.com on 127.0.0.11:53: no such host"

我已经在/ etc / hosts上进行了IP到域的映射

知道为什么吗?

谢谢!

1 个答案:

答案 0 :(得分:0)

安装命令中缺少链码语言标记。如果它是节点js链码,则添加-l node或go语言,然后添加-l go

docker exec cli peer chaincode install -n mycc -v 1.0 -l node -p github.com/chaincode/sacc