What I want to do
I am trying to use pydgraph client over a private ingress on kubernetes to talk to a self-hosted dgraph (based on the tutorial on how to host dgraph in kubernetes).
So I have definitely verified that things work over graphql with a private ingress. But when I try to create a client with pydgraph and query my graph, it throws the following error:
---------------------------------------------------------------------------
_InactiveRpcError
...
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1637784489.545899000","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3009,"referenced_errors":[{"created":"@1637784489.545897000","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}"
>
What I did
-
Since pydgraph seems to talk to dgraph over grpc, I created a separate grpc ingress (https://dgraph-grpc.hostname.com), and tried calling it with that, and I get that error but I can definitely make graphql queries on the http ingress (https://dgraph.hostname.com)
-
I tried creating a client from within k8s with the IP and port and it worked fine, which makes me wonder if there’s something that I am missing with TLS.
-
I also tried to create a dgraph client with my free dgraph cloud and I still get similar RPC errors.
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1637785094.658682000","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3009,"referenced_errors":[{"created":"@1637785094.658679000","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}"
>
- But if I try to create a pydgraph client with
pydgraph.DgraphClientStub.from_cloud(host, api_key)
, it works for dgraph-cloud. Does this mean I need to set an api_key somewhere in my own private ingress?
Any help here would be deeply appreciated!