首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在fabric first-网络示例中,热修复错误:"transport: error while dial :dial tcp: lookup peer0.org1.example.com: no such“

在fabric first-网络示例中,热修复错误:"transport: error while dial :dial tcp: lookup peer0.org1.example.com: no such“
EN

Stack Overflow用户
提问于 2019-06-28 06:29:05
回答 3查看 2.8K关注 0票数 1

无法运行fabric first-网络示例

这是我运行时的日志:./byfn up

代码语言:javascript
复制
/ ___|  |_   _|    / \    |  _ \  |_   _|
\___ \    | |     / _ \   | |_) |   | |  
 ___) |   | |    / ___ \  |  _ <    | |  
|____/    |_|   /_/   \_\ |_| \_\   |_|  

Build your first network (BYFN) end-to-end test

Channel name : mychannel
Creating channel...
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2019-06-27 22:22:11.117 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-27 22:22:12.361 UTC [cli.common] readBlock -> INFO 002 Received block: 0
===================== Channel 'mychannel' created ===================== 

Having all peers join the channel...
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup peer0.org1.example.com: no such host"
peer0.org1 failed to join the channel, Retry after 9 seconds

我的环境:

代码语言:javascript
复制
Ubuntu 18.04
Docker version 18.06.1-ce, build e68fc7a
docker-compose version 1.24.0, build 0aa59064
go version go1.11.11 linux/amd64

echo $GOPATH results in /usr/local/go/bin

对等点应该能够加入通道

EN

回答 3

Stack Overflow用户

发布于 2019-06-28 12:11:33

这是一个众所周知的问题,这是由于对文件resolv.conf的更改而导致的,Hyperledger Fabric中的容器间域名解析从纯Go解析器切换到cgo解析器,由已知的静态链接cgo引起的SIGSEGV错误被触发,因此Hyperledger Fabric的部署失败。要了解更多信息,请访问此link

票数 4
EN

Stack Overflow用户

发布于 2019-06-30 13:12:17

这是常见的问题,停止网络,删除所有以前的容器并修剪docker的卷,然后重新启动docker,最后重新运行网络:

代码语言:javascript
复制
$./byfn.sh down
$docker stop $(docker ps -a -q)
$docker rm $(docker ps -a -q)
$docker volume prune
$sudo systemctl daemon-reload
$sudo systemctl restart docker
$cd .....fabric-samples/first-network
$./byfn.sh -m generate
$./byfn.sh -m up
票数 0
EN

Stack Overflow用户

发布于 2019-07-01 21:33:58

通过运行Ubuntu 16.04 LTS中的示例解决了这个问题。之前我在Ubuntu 18.04上尝试过,但Hyperledger Fabric开发的目标操作系统是Ubuntu 16,而不是全新的18,所以它在Ubuntu 16上运行顺畅是有道理的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56799114

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档