Enthusiast Coder
Enthusiast Coder

Reputation: 1

Hyperledger fabric gateway is not able to get network

I am developing a Fabric application, and I am facing the issue where gateway is not able to get the network

366 | await gateway.connect(ccp, gatewayOpts);

367 | const network = await gateway.getNetwork(channelName); | ^ 368 | const contract = network.getContract(chaincodeName); In Line number 367 I am facing an error

Following is the error :-

2021-07-24T13:39:03.866Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://localhost:7051, connected:false, connectAttempted:true 2021-07-24T13:39:03.867Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org1.example.com url:grpcs://localhost:7051 timeout:3000 2021-07-24T13:39:03.893Z - info: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0.org1.example.com due to Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://localhost:7051, connected:false, connectAttempted:true at checkState (/home/user/Documents/Learnings/aries-learning/aries-javascript/aries-framework-javascript/node_modules/@grpc/grpc-js/src/client.ts:169:18) at Timeout._onTimeout (/home/user/Documents/Learnings/aries-learning/aries-javascript/aries-framework-javascript/node_modules/@grpc/grpc-js/src/channel.ts:579:9) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) { connectFailed: true } 2021-07-24T13:39:07.452Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Discoverer- name: peer0.org1.example.com, url:grpcs://localhost:7051, connected:false, connectAttempted:true 2021-07-24T13:39:07.452Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.org1.example.com url:grpcs://localhost:7051 timeout:3000 2021-07-24T13:39:07.453Z - error: [ServiceEndpoint]: ServiceEndpoint grpcs://localhost:7051 reset connection failed :: Error: Failed to connect before the deadline on Discoverer- name: peer0.org1.example.com, url:grpcs://localhost:7051, connected:false, connectAttempted:true 2021-07-24T13:39:07.453Z - error: [DiscoveryService]: send[mychannel] - no discovery results

Can anyone help me in resolving this? Thanks

Upvotes: 0

Views: 637

Answers (1)

jworthington
jworthington

Reputation: 723

That can be many things, but is quite often a TLS issue. Check the peer logs. You may see a Bad TLS message, etc. Or notice that it does not have an attempt to contact it, so it might be dns, or more general connectivity issues.

Upvotes: 0

Related Questions