Hyperledger Fabric issue orderer client failed to connect to orderer xxx net 7050 failed to create new connection

+4 votes

Docker-composer -base.yaml configuration file, where the domain name I marked Mosaic

Cli error log orderer client failed to connect to orderer. XXX: xx:7050: failed to create new connection: context deadline exceeded

peer-base.yaml

docker-compose-orderer.yaml

docker-compose-peer0.yaml

I can communicate with Orderer in cli

The orderer error message log

Yun is running fine, but an error occurred while creating the channel bothered me for a few days, asking the guys for help.

Nov 2, 2018 in Blockchain by gujiwork
• 200 points
19,898 views
Hey @gujiwork! Are you doing this on VM? Could you mention the steps you followed (preferably with the commands)?

I deployed fabric on vm, and I broke all the services up and deployed them independently to each vm.

I started an orderer node, four Peer nodes, and encountered an error when I executed the create channel in the peer0 cli container

The command to create the channe

docker exec -it cli bash

ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/
example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/mychannel.tx --tls --cafile $ORDERER_CA

2 answers to this question.

+3 votes
Best answer

Hey @gujiwork,

Try making the following changes:
docker-compose-base.yaml and docker-compose-orderer:

working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer

volumes:
- ./config/:/etc/hyperledger/configtx 
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer
- ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1

docker-compose-peer0.yaml:

Under cli:

command: /bin/bash

And also, the command you are using to create channel is:

peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/mychannel.tx --tls --cafile $ORDERER_CA

You have mentioned in your question

where the domain name I marked Mosaic

so I am guessing your domain name is not orderer.example.com but you are using orderer.example.com:7050 in your command. Try replacing it with your domain.

answered Nov 5, 2018 by Omkar
• 69,220 points

selected Nov 8, 2018 by gujiwork
Have you tried echoing $CORE_PEER_ADDRESS in the container without any output? Or you can set CORE_PEER_ADDRESS = peer0.org1.xxxx.net:7051 directly in the cli container.
Hey.. How did you make the network ping Telnet Communication through hosts? I am not able to find the right steps
You can check if /etc/hosts has the corresponding IP hostname, or you can set docker to the same network, that is, cross-host communication so that they can communicate with each other. The reason I encounter the inability to communicate is usually that the firewall blocks them. Can you post your log information so that I can know the reason more clearly
Thanks @gujiwork! I had followed the same steps but I missed out disabling firewall. Your answer saved me a lot of time. I disabled the firewall and was able to ping. Thanks a ton!!
Hello Sir. Can you please explain what will happen when you echo $CORE_PEER_ADDRESS without any output? I am new to hyperledger and not understanding the logic behind this. Please
+1 vote

Could be due to docker conflicts, remove docker containers with the following command:

$ docker rm -f $(docker ps -aq) && docker rmi -f $(docker images | grep dev | awk '{print $3}') && docker volume prune

Then restart the network:

./byfn.sh down
./byfn.sh generate
./byfn.sh up
answered Apr 24, 2019 by Nick
Hey. This helped solve the error but now I am getting some error related to binaries.
Hey @Guru, could you please mention the error logs?

You can install the binaries as follows @Guru:

Open a terminal and go to the fabric-samples directory and the below command:

curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.0
You're the man...!!

Thanks Nick

Related Questions In Blockchain

+2 votes
3 answers

Hyperledger Fabric: Peer Connection error: Failed obtaining connection: Could not connect to any of the endpoints.

 You can extend your /etc/hosts file and make orderer.example.com domain name ...READ MORE

answered Nov 13, 2018 in Blockchain by Omkar
• 69,220 points
3,886 views
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,451 views
+1 vote
1 answer
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
1,003 views
0 votes
2 answers
+2 votes
4 answers

"failed to create new connection context deadline exceeded." error in Hyperledger Fabric

Try remove previous docker containers(have mentioned the ...READ MORE

answered Apr 24, 2019 in Blockchain by Kiran
12,876 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