My problem is:
1 - I can not connect the instance via gRPC to the path host_url/grpc/.
2 - I can only connect via host_url with the port of any instance. Which sounds like a bug to me.
3 - Even being able to access an instance via host_url + PORT yet there is no balancing.
That’s weird, it’s like Traefik was just redirecting my instance to the URL it administers. It does not balance or anything.
You gonna need to edit the ClientStub from "localhost:9001" to www.local.dgraph.com/grpc/
So, it won't work. But, if you put www.local.dgraph.com:9081 it works. 9081 is the Dgraph's GRPC port. This means that Traefik is passing the Port directly and there is no balancing.
curl -v --insecure http://grpc.dgraph.me
* Rebuilt URL to: http://grpc.dgraph.me/
* Trying 192.168.10.86...
* TCP_NODELAY set
* Connected to grpc.dgraph.me (192.168.10.86) port 80 (#0)
> GET / HTTP/1.1
> Host: grpc.dgraph.me
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Date: Wed, 26 Feb 2020 10:41:31 GMT
< Content-Length: 21
< Content-Type: text/plain; charset=utf-8
<
* Connection #0 to host grpc.dgraph.me left intact
Internal Server Error%
And from a JS client I got
node index.js
(node:23320) UnhandledPromiseRejectionWarning: Error: 1 CANCELLED: Received http2 header with status: 404
Inside the cluster I got
curl -v --insecure 10.42.0.21:9080
* Trying 10.42.0.21:9080...
* TCP_NODELAY set
* Connected to 10.42.0.21 (10.42.0.21) port 9080 (#0)
> GET / HTTP/1.1
> Host: 10.42.0.21:9080
> User-Agent: curl/7.67.0
> Accept: */*
>
* Received HTTP/0.9 when not allowed
* Closing connection 0
curl: (1) Received HTTP/0.9 when not allowed
Apparently, internally it works. But not externally.
What am I missing?
Cheers.
PS. I have used the HELM installation. Traefik 2.1.3
Logs
time="2020-02-26T10:15:49Z" level=info msg="Configuration loaded from flags."
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha" ingress=dgraph-http-ingress providerName=kubernetescrd namespace=default
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha-grpc" ingress=dgraph-grpc-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha" namespace=default providerName=kubernetescrd ingress=dgraph-http-ingress
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha" namespace=default providerName=kubernetescrd ingress=dgraph-http-ingress
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="endpoints not found for default/dgraph-alpha" namespace=default providerName=kubernetescrd ingress=dgraph-http-ingress
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha" namespace=default providerName=kubernetescrd ingress=dgraph-http-ingress
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-alpha-grpc" ingress=dgraph-grpc-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="kubernetes service not found: default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="endpoints not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="endpoints not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha-grpc" namespace=default providerName=kubernetescrd ingress=dgraph-grpc-ingress
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="endpoints not found for default/dgraph-ratel" providerName=kubernetescrd namespace=default ingress=dgraph-ratel-ingress
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:16:58Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:00Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:17:00Z" level=error msg="subset not found for default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:17:00Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:17:02Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:17:02Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:02Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:17:04Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:04Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:17:04Z" level=error msg="subset not found for default/dgraph-alpha-grpc" namespace=default providerName=kubernetescrd ingress=dgraph-grpc-ingress
time="2020-02-26T10:17:06Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:06Z" level=error msg="subset not found for default/dgraph-alpha" ingress=dgraph-http-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:17:06Z" level=error msg="subset not found for default/dgraph-alpha-grpc" ingress=dgraph-grpc-ingress providerName=kubernetescrd namespace=default
time="2020-02-26T10:17:08Z" level=error msg="subset not found for default/dgraph-alpha-grpc" namespace=default providerName=kubernetescrd ingress=dgraph-grpc-ingress
time="2020-02-26T10:17:08Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:08Z" level=error msg="subset not found for default/dgraph-alpha" ingress=dgraph-http-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:17:10Z" level=error msg="subset not found for default/dgraph-ratel" ingress=dgraph-ratel-ingress providerName=kubernetescrd namespace=default
time="2020-02-26T10:17:10Z" level=error msg="subset not found for default/dgraph-alpha" ingress=dgraph-http-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:17:10Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:17:12Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:12Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd namespace=default ingress=dgraph-http-ingress
time="2020-02-26T10:17:12Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:17:14Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:17:14Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:14Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:17:16Z" level=error msg="subset not found for default/dgraph-ratel" ingress=dgraph-ratel-ingress namespace=default providerName=kubernetescrd
time="2020-02-26T10:17:16Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:17:16Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:17:18Z" level=error msg="subset not found for default/dgraph-ratel" providerName=kubernetescrd ingress=dgraph-ratel-ingress namespace=default
time="2020-02-26T10:17:18Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd namespace=default ingress=dgraph-http-ingress
time="2020-02-26T10:17:18Z" level=error msg="subset not found for default/dgraph-alpha-grpc" namespace=default providerName=kubernetescrd ingress=dgraph-grpc-ingress
time="2020-02-26T10:17:19Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:17:19Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
time="2020-02-26T10:17:20Z" level=error msg="subset not found for default/dgraph-alpha" providerName=kubernetescrd ingress=dgraph-http-ingress namespace=default
time="2020-02-26T10:17:20Z" level=error msg="subset not found for default/dgraph-alpha-grpc" providerName=kubernetescrd ingress=dgraph-grpc-ingress namespace=default
I have done some progress, but nothing too substantial.
I did a test by adding a nodejs pod, and executing a GRPC client to 10.42.0.12:9080 and it works. That means, inside the cluster, it works just fine. But outside, no sign of light.
outside:
node index.js
(node:9584) UnhandledPromiseRejectionWarning: Error: 1 CANCELLED: Received http2 header with status: 404
I think I got at the same point that I was before. This feels like the same issue. Traefik can't load balance all GRPC programs out there. And maybe, this would work if I expose the 9080 port (to the world outside the cluster - Update: I have tested it, don't work...). So there's no reverse proxying here for GRPCs.
I really like Traefik, but it's kind of frustrating all this. Don't have a clue of what is happening, just have assumptions and no one really cares.