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

+2 votes

I started the Orderer:

export ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
export ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
export ORDERER_GENERAL_LOCALMSPID=OrdererMSP
export ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
export ORDERER_GENERAL_LISTENADDRESS=192.168.2.103
export ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
export ORDERER_GENERAL_LOGLEVEL=debug
export ORDERER_GENERAL_GENESISMETHOD=file
export ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
export FABRIC_CFG_PATH=/etc/hyperledger/fabric
export ORDERER_GENERAL_TLS_ENABLED=true
orderer

Then I am trying to start the fabric peer using this command.

 export CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
 export CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
 export CORE_PEER_GOSSIP_ORGLEADER=false
 export CORE_PEER_PROFILE_ENABLED=true
 export CORE_PEER_LOCALMSPID=Org1MSP
 export CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
 export CORE_PEER_TLS_ENABLED=true
 export CORE_PEER_ID=peer0.org1.example.com
 export CORE_LOGGING_LEVEL=DEBUG
 export CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
 export FABRIC_CFG_PATH=/etc/hyperledger/fabric
 export CORE_PEER_ADDRESS=peer0.org1.example.com:7051
 export CORE_PEER_GOSSIP_USELEADERELECTION=true

I get this error:

2017-12-26 18:22:47.613 IST [deliveryClient] connect -> DEBU 32e Connected to 2017-12-26 18:22:47.613 IST [deliveryClient] connect -> ERRO 32f Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] 2017-12-26 18:22:47.614 IST [deliveryClient] try -> WARN 330 Got error: Could not connect to any of the endpoints: [orderer.example.com:7050] ,at 8 attempt. Retrying in 2m8s

Error on orderer side:

2017-12-26 18:24:55.617 IST [grpc] Printf -> DEBU 191 grpc: Server.Serve failed to complete security handshake from "192.168.2.103:56580": EOF

Can anyone tell me what is wrong?

Nov 13, 2018 in Blockchain by slayer
• 29,370 points
• 6,002 views

3 answers to this question.

+2 votes
Best answer

 You can extend your /etc/hosts file and make orderer.example.com domain name to point on your localhost or you can change ordering service endpoint within config transaction like this:

Addresses:
        - PUT_HERE_CORRECT_IP_ADDRESS:7050

Next you need to run configtxgen tool to get updated configuration transaction block.

answered Nov 13, 2018 by Omkar
• 69,180 points

selected May 7, 2019 by slayer
+1 vote

The problem was just that grpc was missing. This command worked for me:

$ npm install grpc

answered May 7, 2019 by George
+1 vote

Pass these options with the docker command while running hyperledger, it will work:

-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
answered May 7, 2019 by Killian

Related Questions In Blockchain

+4 votes
2 answers

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

Hey @gujiwork, Try making the following changes: docker-compose-base.yaml and ...READ MORE

answered Nov 5, 2018 in Blockchain by Omkar
• 69,180 points
• 27,008 views
0 votes
2 answers
+1 vote
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
• 16,730 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
• 4,402 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
• 3,145 views
+1 vote
1 answer
+2 votes
3 answers
0 votes
1 answer

Hyperledger Fabric:Promise is rejected:Error:Failed to deserialize creator identity,The supplied identity is not valid.

 This error happens because basic-network/docker-compose.yaml has CA ...READ MORE

answered Nov 14, 2018 in Blockchain by Omkar
• 69,180 points
• 3,590 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