Closed AnaitBI closed 5 years ago
Hello @AnaitBI I have the same error running on Windows 10 while running the helloworld example. Does grpc-web example work out for you?
Here's the command with curl I'm using (my envoy server listens on 8080):
curl -skv 'http://localhost:8080/helloworld.Greeter/SayHello' -H ' content-type: application/grpc-web+proto' -H 'x-grpc-web: 1' -H 'accept: application/grpc-web-text' --data-binary 'AAAAAAA='
Which outputs:
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> POST /helloworld.Greeter/SayHello HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.55.1
> content-type: application/grpc-web+proto
> x-grpc-web: 1
> accept: application/grpc-web-text
> Content-Length: 8
>
* upload completely sent off: 8 out of 8 bytes
< HTTP/1.1 200 OK
< content-type: application/grpc-web-text+proto
< grpc-status: 14
< grpc-message: upstream connect error or disconnect/reset before headers
< date: Sat, 01 Dec 2018 21:53:35 GMT
< server: envoy
< content-length: 0
<
* Connection #0 to host localhost left intact
Same result as you have.
Running the echo example with docker-compose runs fine though.
@jdebarochez Yes, also did not work
I don't fully understand how your servers are setup, but if you are using docker for windows to run the envoy container, and your gRPC server is listening on localhost in your windows machine, then envoy cannot talk to it.
In the clusters entry of envoy.yaml, instead of address: 0.0.0.0
try address: host.docker.internal
@alce All are on one windows machine the docker, the image and the gRPC. What address exactly should be changed to' host.docker.internal', what does it mean?
@alce All are on one windows machine the docker, the image and the gRPC. What address exactly should be changed to' host.docker.internal', what does it mean?
In the clusters entry of envoy.yaml instead of address: 0.0.0.0 try address: host.docker.internal
@longfellowone @AnaitBI
Changing the address as I explain above is a potential potential fix for connection failures only when:
What host.docker.internal
does is explained here for Windows users and here for Mac users. In a nutshell, this change allows your envoy container to connect to an gRPC server running directly on your development machine (as opposed to the virtual machine docker uses to run your containers).
Thanks for your help everyone! Indeed it works with host.docker.internal
. Now I understand my mistake.
My code is hosted here.
Hi,
my grpc client is react js, server grpc in csharp Docker on windows 10 with envoy proxy running.
I run this command and generated my js files (on linux ubuntu 16):
Now in the client side:
Tried to add metaadata to the request with so many types of metadata, nothing worked
And the result is: POST http://127.0.0.1:8085/ProtocolProtos.ProtocolService/Connect 503 (Service Unavailable) And receive back a gRPC error code 14 => upstream connect error or disconnect/reset before headers
What am I missing? Please help me, I'm a struggling with this for a very long time.
Here is my envoy.yaml file:
And here is my Dockerfile:
To run the image I did:
Any help figuring out why it doesn't work will be highly appreciated.