Welcome to the Linux Foundation Forum!

Lab06: context deadline exceeded inside CLI container

Hello everyone,

I think it is a common problem but I dont just want to look for on NEt and get the question, I want to know why it is getting this problem.

When I am inside of CLI container with docker-compose ENV-s and I use this command:

"peer channel fetch config blockFetchedConfig.pb -o orderer.example.com:7050 --tls --cafile $ORDERER_TLS_CA -c allarewelcome"

I get this error:

"Error: failed to create deliver client for orderer: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded"

Could someone help me please?

Thank you.


  • Bobbijn
    Bobbijn Posts: 186

    Hello @gorkao2, let's try to identify the issue you're facing. The error message suggests that the system is having trouble retrieving the latest configuration definition or block from the channel. This may be due to version mismatches. As a potential solution, I suggest restarting Docker and checking if it resolves the problem. Please keep me updated on the outcome. Best regards, Bobbi.

  • gorkao2
    gorkao2 Posts: 6

    First of all, Thank you @Bobbijn for helping.

    I got the fault of modifying manually the docker-compose.yaml file, my volume of Peer1.org2 (cert of CA and TLS) were bad defined:

    " - ./crypto-config/peerOrganizations/org2.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp
    - ./crypto-config/peerOrganizations/org2.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls
    So I had the cert of peer1.org2 in CLI instead of peer1.org1's. For that reason "Context deadline inside" error could be for two reasons:

    1. A misconfiguration of ChannelIDs. Make sure the ChannelIDs match and that you are attempting to join the peer to the correct channel.
    2. Using the wrong root certificate file for TLS. Make sure the root certificate file and root certificate path are correct


    When I changed (correctly) the docker-compose.yaml and make the process of "teardown, generate and start" the network, now it is solved.

    Thank you for all and I hope this post could be helpful for other students


Upcoming Training