Re: Peer cannot discover orderer when node.js application is used to invoke chaincode #fabric-sdk-node #fabric-orderer #hyperledger-fabric #fabric-peer
My guess has something to do with the TLS certs. In order to access your peers by the HL Fabric client, you need to configure the certificates properly.
If you access them by IP instead of FQDN, you should create your network with all TLS certificates for each peer IP.
Also check if the ports between the client and peer, that may cause connection fail as well.
Hope it helps.
Marcos Sarres | CEO | +55 61 98116 7866
De: fabric@... <fabric@...> Em nome de h.dungca via lists.hyperledger.org
I've been running into a problem with a Hyperledger Fabric network that I’ve deployed non-locally and I would like to ask for some insights or assistance regarding this problem.
I deployed a simple network to AWS, using separate VM instances for an orderer, two peers, and their respective CAs. So I have one VM instance for the orderer, one instance for the orderer CA, and so on.
I was able to start the network, create a channel, and deploy the sample fabcar chaincode. I can also query and invoke the chaincode from inside any of the two peers using peer chaincode query/invoke. The problem I’m experiencing happens when I use a node.js application (that is outside of the network and is using the fabric-network module) to query or invoke the chaincode. Whenever I try to query/invoke the chaincode using the application, I get the following error:
error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: xxx.xxx.xxx.xxx:7050, url:grpcs://xxx.xxx.xxx.xxx:7050, connected:false, connectAttempted:true
error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server xxx.xxx.xxx.xxx:7050 url:grpcs://xxx.xxx.xxx.xxx:7050 timeout:3000
error: [DiscoveryService]: _buildOrderer[channel1] - Unable to connect to the discovered orderer xxx.xxx.xxx.xxx:7050 due to Error: Failed to connect before the deadline on Committer- name: xxx.xxx.xxx.xxx:7050, url:grpcs://xxx.xxx.xxx.xxx:7050, connected:false, connectAttempted:true
I tried editing the /etc/hosts/ of each VM instance and the machine running the application (my own computer) to include the IP addresses of the orderer and the peers. It looks something like:
Am I missing something or is there anything else I should change so that the peer can see the orderer through discovery when using the node.js application? Any help is appreciated. Thank you so much!