Hyper Fabric Error CONNECTION FAILED Description dialing connection timed out

0 votes

 This is my code:

    ctxCh := sdk.ChannelContext("mychannel", fabsdk.WithUser("user1"))
    chClient, err := channel.New(ctxCh)
    if err != nil {
        log.Fatalln("error from New channel", err)
    }

    req := channel.Request{
        ChaincodeID: "fabcar",
        Fcn:         "createCar",
        Args:        [][]byte{[]byte("CAR10"), []byte("Honda"), []byte("Accord"), []byte("Black"), []byte("Tom")},
    }
    resp, err := chClient.Execute(req)
    if err != nil {
        log.Fatalln("error from Execute =", err)
    }

I get this error:

calling orderer 'orderer.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [orderer.example.com:7050]

my config.yaml

channels:
  # name of the channel
  mychannel:
    orderers:
      - orderer.example.com

orderers:
  orderer.example.com:
    url: grpc://localhost:7050

    # these are standard properties defined by the gRPC library
    # they will be passed in as-is to gRPC client constructor
    grpcOptions:
      ssl-target-name-override: orderer.example.com

    tlsCACerts:
      # Certificate location absolute path
      path: ./crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem

Any ideas?

Nov 9, 2018 in Blockchain by digger
• 26,740 points
2,464 views

1 answer to this question.

0 votes

The mapping is not set up right. Add to config.yaml

entityMatchers:
 orderer:
   - pattern: (\w+).example.(\w+)
     urlSubstitutionExp: grpc://localhost:7050
     sslTargetOverrideUrlSubstitutionExp: orderer.example.com
     mappedHost: orderer.example.com

to map grpc://localhost:7050 to orderer.example.com

answered Nov 9, 2018 by Omkar
• 69,210 points
It does not work for me.

Hi, @There,

Could you please post your workaround here so that it will be easy for us to resolve your query asap? What error you are facing? Kindly post that!

Related Questions In Blockchain

0 votes
1 answer

sendProposal - timed out after:45000, sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT

You could simply replace --net=bridge with --net=artifacts_default in your DockerFile.  I used ...READ MORE

answered Jul 26, 2018 in Blockchain by Perry
• 17,100 points
1,722 views
0 votes
1 answer
+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,038 views
0 votes
1 answer

Error while running make command using Fabric 1.0.6

It's a known issue in go 1.9.4: https://github.com/golang/go/issues/23739 While ...READ MORE

answered Jun 27, 2018 in Blockchain by Perry
• 17,100 points
781 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,215 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
708 views
+1 vote
1 answer
0 votes
2 answers
+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,210 points
3,483 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