DGraph Go gRPC client throwing error “Error while dialing dial tcp xx.xx.xxx.xxx:0: connect: connection timed out”

Hello,

I have deployed my app on K8. I am able to call DGraph through HTTP client from that K8 pod but when I am trying to connect the same dGraph server using Go gRPC client on gRPC port (9080) I am getting the following error. “Error while dialing dial tcp xx.xx.xxx.xxx:0: connect: connection timed out.”
This setup is working fine if I deploy my app on my local machine. Am I missing any settings?

Any help will be appreciated.

Share the YAML from your deploy. So we can take a look and find anything.

YAML for DGraph deployment or for my app?

Anything you can share publicly. But especially the YAML from your deployment. You mentioned K8s.

owner: me
applicationName: app
componentName: testapi
releaseFromMaster: true
containerAppDir: /app
hostingEnvironmentVarName: HOSTING_ENVIRONMENT

applications:
  - name: api
    path: api
    dockerfile: api/Dockerfile
    containerPort: 8001
    livenessProbePath: /health/check
    readinessProbePath: /health/ready
    appConfigTemplate: api/appsetting.template.json
    appConfigTargetFilename: appsetting.json
    ingressPath: /testapi
    ingressFQDN:
      Dev:
        - dev.abc.com
      QA:
        - uat.abc.com
      Stage:
        - stg.abc.com
      Prod:
        - abc.com

This is the YAML file for my app.
One correction - DGraph is deployed on direct VM’s not on K8 pods.

1 Like

Have you checked if the pods are able to reach out to the Dgraph instances? The gRPC ports at least.
If it works locally, it should work on K8s. If your pods are able to reach Dgraph.
Check your network configuration(firewall, port forwarding and so on).

1 Like

Ok, Let me check

@sandeepkangude Adding on to this thread, is the client that is deployed in a Kubernetes reaching the VMs (dgraph managed by systemd) directly, or through a load balancer or reverse-proxy like Nginx that sends traffic to one of the three Alphas? If something like Nginx is used, is this L4 TCP or L7 HTTP/S?

Do the VMs have any sort of firewall and is port 9080 open (e.g. Configure Firewall for Alpha Ports)?

1 Like

Hello. This was resolved correct?