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




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
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


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

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+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

- ./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


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
• 65,850 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
0 votes

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 23 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

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
• 65,850 points
+2 votes
2 answers
0 votes
1 answer
+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
• 27,620 points
+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 23 in Blockchain by Kiran

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.