前言
在进行区块链配置时,遇到些许问题进行相关记录
区块链配置参考链接
1.openssl libssl-dev安装失败
解决方案
2.github拉取源码速度缓慢
如:git clone https://github.com/hyperledger/fabric.git
解决方案:
在.com后增加cnpmjs.org,使用镜像网站拉取源码
如:git clone https://github.com.cnpms.org/hyperledger/fabric.git
3.拉取源码失败重试
值得注意的是,在我们拉取源码过程中如果ctrl+c中断后重新开始拉取,会更改原压缩包的名字,所以在解压时要注意不能解压下载失败那一个
4.运行./byfn.sh up失败
失败情况:
=================== WARNING ===================
Local fabric binaries and docker images are
out of sync. This may cause problems.
===============================================
解决方法:
要使用sudo命令运行
5.运行./byfn.sh up依旧失败
失败情况:
Error: error getting endorser client for channel: endorser client failed to connect to peer1.org1.example.com:8051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup peer1.org1.example.com: no such host"
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
解决方法:
使用如下命令:
sudo gedit base/docker-compose-base.yaml
在各environment下加 - GODEBUG=netdns=go
如:
正确运行后: