douquanzhan0315 2019-02-24 23:07
浏览 347

无法在Hyperledger First Network设置中将对等方加入通道

I am following a tutorial on the Hyperledger fabric site and after installing all the perquisites (latest versions) on a Linux 18.04 installation I run into an error.

I am trying to run the given ./byfn script to "Build Your First Network". After a fresh install I run the commands as follows:

./byfn generate
./byfn up

At which point everything performs as expected untill the following error occurs 5 times in a row (after which the run exits with an Error):

+ 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: context deadline exceeded
peer0.org1 failed to join the channel, Retry after 3 seconds

I have tried various things like:

  • Increasing the timeout to allow for longer connection times
  • I have down-ed the network and upped it again
  • Full re-installations of required packages and the fabric-samples
  • Removed all docker volumes/images/containers

I came across some sources mentioning that it might have to do with the peers not being able to connect to each other. Which I tried to fix with a manual docker connect of each peer to the byfn docker network, no success there. I can see the orderer running but the peers that attempted to join the network exited with an error:

docker container ls -a
CONTAINER ID        IMAGE                               COMMAND             CREATED             STATUS                      PORTS                    NAMES
99570e191542        hyperledger/fabric-tools:latest     "/bin/bash"         24 seconds ago      Up 23 seconds                                        cli
340d1225a913        hyperledger/fabric-peer:latest      "peer node start"   30 seconds ago      Exited (2) 24 seconds ago                            peer0.org1.example.com
fabe017751a0        hyperledger/fabric-peer:latest      "peer node start"   30 seconds ago      Exited (2) 25 seconds ago                            peer1.org2.example.com
f81a639f29f6        hyperledger/fabric-peer:latest      "peer node start"   30 seconds ago      Exited (2) 26 seconds ago                            peer1.org1.example.com
0f91080db681        hyperledger/fabric-peer:latest      "peer node start"   30 seconds ago      Exited (2) 27 seconds ago                            peer0.org2.example.com
c491adc91320        hyperledger/fabric-orderer:latest   "orderer"           30 seconds ago      Up 28 seconds               0.0.0.0:7050->7050/tcp   orderer.example.com

This shows that the nodes exited with an error code, they all look the same, look below for a docker logs of the peer node.

So my final question is: How do I get the "First Network" Hyperledger sample peers to successfully join the channel?

Thanks in advance!

Update 1

I chose a bad code dump! Please use these links for logs/outputs.

Update 2

So I have been trying various things, it seems to not be a go related error but simply a "connection" error where go crashes upon trying to connect a peer to the channel. So the main question at hand is: Why are my docker instances not properly connecting to the channel?

Update 3

I have used Amazon Web Services to launch a Linux instance and re-created all my installation steps on this "fresh" instance. Everything worked on the first go (pun intended). Therefore I must conclude that it had to do with either my network settings or personal setup as these are the only parameters that changed.

As this works for me for now I will work with that. I am still open to suggestions and will keep an eye on this post!

Package versions

  • Hyperledger Fabric 1.4.0

  • Docker version 18.09.2, build 6247962

  • docker-compose version 1.13.0, build 1719ceb

  • go version go1.11 linux/amd64

  • npm: '6.4.1',

  • node -v: v8.15.0

  • 写回答

1条回答 默认 最新

  • doumalu9257 2019-02-25 06:53
    关注

    I will suggest you to check two things: the memory available and the permissions in the "first-network" directory.

    评论

报告相同问题?

悬赏问题

  • ¥20 关于多单片机模块化的一些问题
  • ¥30 seata使用出现报错,其他服务找不到seata
  • ¥35 引用csv数据文件(4列1800行),通过高斯-赛德尔法拟合曲线,在选取(每五十点取1点)数据,求该数据点的曲率中心。
  • ¥20 程序只发送0X01,串口助手显示不正确,配置看了没有问题115200-8-1-no,如何解决?
  • ¥15 Google speech command 数据集获取
  • ¥15 vue3+element-plus页面崩溃
  • ¥15 像这种代码要怎么跑起来?
  • ¥15 安卓C读取/dev/fastpipe屏幕像素数据
  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection