Connection profile for hyperledger fabric client app #fabric
I have got the hyperledger fabric blockchain deployed on kubernetes in namespace: hfl-fabric and the client app using fabric-sdk-go is in another namespace: hlf-app. I am using the gateway api to connect and invoke the chaincode. I am able to connect to the gateway, but while invoking the transactions and getting the network using gateway.GetNetwork("channel_name"), I am getting the error:
Failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: QueryBlockConfig failed: queryChaincode failed: Multiple errors occurred: - Transaction processing for endorser [peer1-myorg.hlf-fabric:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer1-myorg.hlf-fabric:7051]: connection is in TRANSIENT_FAILURE - Transaction processing for endorser [peer2-myorg.hlf-fabric:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer2-myorg.hlf-fabric:7051]: connection is in TRANSIENT_FAILUREThe connection-profile used by the client app is:
I am able to invoke the chaincode using the cli (in the same namespace as the fabric blockchain namespace: hlf-fabric).
I guess this issue is related to cross namespace communication in k8s? For this I have used grpcs://<svc-name>.<namespace>:<port>
The last resort, would be to deploy the fabric blockchain and the app in the same namespace. But I would appreciate if anyone could guide me setting up the connection-profile for the client app which can facilitate the cross namespace communications to the blockchain.