Empty reply from server
See original GitHub issueI’m trying to run the gateway in a Docker container, following the instructions in the Dockerfile itself. I’ve pulled the repo down, and here the relevant excerpt from my Compose file.
grpc-web:
build:
context: grpc-web
dockerfile: net/grpc/gateway/docker/ubuntu_16_04/Dockerfile
ports:
- "9091:9091"
links:
- app-server:localhost
command: sh -c "cd /github/grpc-web/gConnector && ./nginx.sh"
When the container starts, I get the following output:
grpc-web_1 | nginx: [alert] could not open error log file: open() "./logs/error.log" failed (2: No such file or directory)
grpc-web_1 | 2018/02/27 22:07:58 [notice] 7#0: using the "epoll" event method
grpc-web_1 | 2018/02/27 22:07:58 [notice] 7#0: nginx/1.11.13
grpc-web_1 | 2018/02/27 22:07:58 [notice] 7#0: built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)
grpc-web_1 | 2018/02/27 22:07:58 [notice] 7#0: OS: Linux 4.9.60-linuxkit-aufs
grpc-web_1 | 2018/02/27 22:07:58 [notice] 7#0: getrlimit(RLIMIT_NOFILE): 1048576:1048576
grpc-web_1 | I0227 22:07:58.939213904 7 grpc_event_queue.cc:44] GRPC event thread started: 1
But when I make a request like this:
$ curl 'http://localhost:9091/helloworld.Greeter/SayHello' -H 'content-type: application/grpc-web+proto' -H 'x-grpc-web: 1' -H 'authority: localhost:9091' --data-binary $'\x00\x00\x00\x00\x04\n\x02yo' --insecure -v
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9091 (#0)
> POST /helloworld.Greeter/SayHello HTTP/1.1
> Host: localhost:9091
> User-Agent: curl/7.54.0
> Accept: */*
> content-type: application/grpc-web+proto
> x-grpc-web: 1
> authority: localhost:9091
> Content-Length: 0
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
As you can see, I get no response. And nothing shows up in the console. My gRPC server is running and listening on port 9090. Is there an issue with my config?
Issue Analytics
- State:
- Created 6 years ago
- Comments:15
Top Results From Across the Web
What is the curl error 52 "empty reply from server"?
This is likely the wrong approach to troubleshooting. Empty reply means it was able to connect to the IP/port, but the server returned...
Read more >What does "empty reply from server" mean? - HTTP Request
The "empty reply from server" error indicates that a zero length response was received - no HTTP headers or content, simply a closed...
Read more >cURL error 52: Empty reply from server - WordPress.org
The underlying problem could be one of a number of server issues. Perhaps the server is configured to not respond to loopback requests,...
Read more >How to troubleshoot connectivity when curl gets an *empty ...
One possible reason you are getting an empty reply is that you're trying to hit a website that is a name-based virtual host....
Read more >T2499E - Empty reply from server - Amcrest Forum
It seems to work most all the time using a browser UI. But using the android app, it fails to connect about half...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@fengli79 That makes sense. I think this has to do with bash strings using null bytes as the ending character.
https://unix.stackexchange.com/questions/174016/how-do-i-use-null-bytes-in-bash
I found a workaround in bash to avoid ever storing the request body in a bash string:
I’m still not getting any console output from my backend server, so it seems like the gateway isn’t talking to it.
@stanley-cheung PR #155 added, thanks very much.