I get the following error while i run the command byfn sh up I have tried removing all the containers and updated every required version but still the same error

+1 vote
____    _____      _      ____    _____
/ ___|  |_   _|    / \    |  _ \  |_   _|
\___ \    | |     / _ \   | |_) |   | |  
 ___) |   | |    / ___ \  |  _ <    | |  
|____/    |_|   /_/   \_\ |_| \_\   |_|  

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-11 16:12:50.764 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-11 16:12:51.045 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: Temporary failure in name resolution"
peer0.org1 failed to join the channel, Retry after 3 seconds
+ 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: Temporary failure in name resolution"
!!!!!!!!!!!!!!! After 10 attempts, peer0.org1 has failed to join channel 'mychannel'  !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

ERROR !!!! Test failed
Jun 11, 2019 in Blockchain by Lelouch

edited Jun 11, 2019 by Omkar 4,436 views

2 answers to this question.

+1 vote

Hey @Lelouch! 

The error says that there was a problem in and resolution which means the system couldn't find the node it was trying to connect to. To solve, open the hosts file:

$ gedit /etc/hosts

And add the IP address of the system than contains the channel. Save and exit the file and then run your command. It worked for me.

answered Jun 11, 2019 by Richard
which one should i change localhost ip address or debian ip address

127.0.0.1    localhost
127.1.1.1    Lelouch

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

what am i supposed to change here

Find the IP address of the system that contains the cli container. In the terminal of the system that has the cli container use the below command:

$ ifconfig

Then open the /etc/hosts file in the system that you are getting this error:

$ gedit /etc/hosts

and then add the IP address in that file.

This was supposed to be done like this

127.0.0.1    localhost 
127.1.1.1    Lelouch

# The following lines are desirable for IPv6 capable hosts 
::1     ip6-localhost ip6-loopback 
fe00::0 ip6-localnet 
ff00::0 ip6-mcastprefix 
ff02::1 ip6-allnodes 
ff02::2 ip6-allrouters

<your_public_ip> <your_username> 
#so for example:
#192.168.0.189 smahara

 

<your_public_ip> <your_username>

# so for example:

#192.168.0.19 smahara

+1 vote
Not sure if this is still relevant to you, but cleaning up and restarting docker worked for me.

$./byfn.sh down
$docker volume prune
$sudo systemctl daemon-reload
$sudo systemctl restart docker
$cd <path of download>/fabric-samples/first-network
$./byfn.sh generate
$./byfn.sh up
answered Aug 22, 2019 by Shailaja
• 160 points

Related Questions In Blockchain

0 votes
1 answer

Getting error when i execute ./byfn.sh -m up command.

The error is caused because you're trying ...READ MORE

answered Jul 12, 2018 in Blockchain by slayer
• 29,370 points
1,029 views
0 votes
0 answers
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,400 views
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
919 views
+1 vote
1 answer
0 votes
1 answer
+1 vote
2 answers

Hyperledger - Can I have some instances on one network while on a Virtual Box?

Yes, you can connect multiple instances to ...READ MORE

answered Aug 1, 2018 in Blockchain by Omkar
• 69,230 points
861 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP