6

I'm trying running up Fabric samples that is provided here: https://github.com/hyperledger/fabric-samples/tree/release-1.2/first-network

I followed all the instructions of Fabric docs from: https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html , but encountered an error "FAILED to execute End-2-End Scenario". Following is the output after I entered ./byfn.sh up in terminal.

I didn't even find any similar problems on google and stackoverflow

./byfn.sh up
Starting for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
LOCAL_VERSION=1.2.0
DOCKER_IMAGE_VERSION=1.2.0
Starting peer1.org1.example.com ... done
Starting orderer.example.com    ... done
Starting peer0.org2.example.com ... done
Starting peer1.org2.example.com ... done
Starting peer0.org1.example.com ... done
Starting cli                    ... done

 ____    _____      _      ____    _____ 
/ ___|  |_   _|    / \    |  _ \  |_   _|
\___ \    | |     / _ \   | |_) |   | |  
 ___) |   | |    / ___ \  |  _ <    | |  
|____/    |_|   /_/   \_\ |_| \_\   |_|  

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

Channel name : mychannel
+ 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
Creating channel...
+ res=1
+ set +x
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

ERROR !!!! Test failed

What's the root of the problem and how should I fixed?

陈梓泉
  • 145
  • 2
  • 9

5 Answers5

4
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded

This error indicates that peer is not able to resolve / connect to orderer.example.com:7050 . Try checking all containers by

docker ps -a

this will show you all the running containers and the containers which have exited you can check container logs by

docker logs your_container_name

it can also happen if your previous container are running or stopped in same network and you have forgotten to remove it so you can try to bring down whole network and then start again.

./byfn.sh down
./byfn.sh up
mohammed
  • 383
  • 4
  • 15
3

I m using windows 10 for solving above error

Firstly run command docker ps -a
then run these two 
./byfn.sh down
./byfn.sh up

Successfully able to resolved.
1

In case of Linux:

$./byfn.sh down
$sudo systemctl daemon-reload
$sudo systemctl restart docker
$./byfn.sh –m up
0

i also got this error. A similar one. The below error was noted from the docker logs.

panic: [channel byfn-sys-channel] config requires unsupported orderer capabilities: Orderer capability V1_4_2 is required but not supported: Orderer capability V1_4_2 is required but not supported

Here i noted that i've downloaded binaries for version 1.4.0. I chose this version since it is a long term support version. I noted that the binaries for a fabric 1.4.2 is not available.

Running git checkout v1.4.0 inside the fabric-samples directory solved this for me.

I referred to this: eye_opener

After this run the script again. It should work! Sometimes you might end up with errors that the ports are already allocated.

Run docker rm -f $(docker ps -aq)

The above command will free the required ports. Running the script again should solve the issues. In case you have any permission denied errors. Use sudo.

Abel
  • 11
  • 4
0

Most of the time this happens due to conflict in images. Please delete the existing fabric images and try pulling again (byfn will download new images for you).

To delete images:

docker rmi $(docker images -a)

then try

./byfn up

Shahid Hussain
  • 1,599
  • 1
  • 20
  • 24