1
votes

I am having an issue in the Hyperledger fabric Node SDK.

Network Details:

  1. The network consists of 4 organisations each deployed on different Kubernetes cluster.
  2. Each organisation has 2 peers which joined a single channel say mychannel.
  3. Each organisation has 1 CA running.
  4. Ordering service is Raft.
  5. CouchDB is used as statedb.
  6. The invokes from the CLI are also working fine and the data is being synced between all the 8 peers.
  7. Hypelredger explorer is up and running with the one organisation details and is able to list all the other 6 peers in the dashboard.

Now back to issue, I tried to deploy the Node.js SDK for Org1. I created a connection profile having the details of the Org1 Peers, Orderer and CA.

The users are enrolled (Admin and user1).

Now when I try to invoke transaction there are two cases:

  1. Service discovery enabled: In this case, the SDK tries to communicate with the other peers in the network and creator org peers but all returns the context deadline exceed error.

  2. Service discovery disabled: Invokes successful.

I have no idea why the invoke transactions are failed when the service discovery is enabled.

2
Can you add your core.yaml/docker compose file? Would help to resolve your issue. - Risabh Sharma
Actually it is deployed on 4 Kubernetes clusters - Sahil

2 Answers

0
votes

The above issue is resolved when I added the host aliases into my /etc/hosts file.

I need to add the host names and IP for each peer in the /etc/hosts files.

After adding the host names, the SDK started working.

Thanks

-1
votes

Could be your anchor peers are configured incorrectly, since discovery reports those, and some clients will use them.