Hyperledger Composer: Adding a new peer: failed to create a new connection: context deadline exceeded.

0 votes

I have set the yaml files but when I try to add a new peer, i get the following error:

Error getting endorser client channel: endorser client failed to connect to peer1.org1.example.com:8051: failed to create a new connection: context deadline exceeded.
Nov 9, 2018 in Blockchain by slayer
• 29,050 points
873 views

2 answers to this question.

0 votes

The right code should look like this. Please see what you are missing out:

# Create the channel
docker exec peer0.org1.example.com peer channel create -o 
orderer.example.com:7050 -c composerchannel -f 
/etc/hyperledger/configtx/composer-channel.tx

# Join peer0.org1.example.com to the channel.
docker exec -e "CORE_PEER_MSPCONFIGPATH= 
/etc/hyperledger/msp/users/Admin@org1.example.com/msp 
peer0.org1.example.com peer channel join -b composerchannel.block

# Create the channel
docker exec -e "CORE_PEER_MSPCONFIGPATH= 
/etc/hyperledger/msp/users/Admin@org1.example.com/msp" 
peer1.org1.example.com peer channel fetch config -o orderer.example.com:7050 
-c composerchannel

# Join peer1.org1.example.com to the channel.
docker exec -e "CORE_PEER_MSPCONFIGPATH= 
/etc/hyperledger/msp/users/Admin@org1.example.com/msp 
peer1.org1.example.com peer channel join -b composerchannel_config.block
answered Nov 9, 2018 by Omkar
• 67,380 points
0 votes

Seems like peer address problem. Set the peer address as follows and I think it should solve the error:

CORE_PEER_ADDRESS=peer0.org1.example.com:7051
answered May 6 by Tina
Hey @Tina, where should I add this?

Hi @Raj, You have to add this in the docker-compose-base.yaml file.

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

HyperLedger Composer: Failed to load connector module “composer-connector-embedded” for connection profile “testprofile”

First, update your devDependencies in package.json "devDependencies": { ... "composer-admin": ...READ MORE

answered Nov 2, 2018 in Blockchain by Omkar
• 67,380 points
76 views
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,640 points
67 views
+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
2,804 views
+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
• 67,380 points
3,419 views