嘟嘟社区

[疑问] grpc怎么测试是否正常工作


docker 里跑了个grpc程序,监听2002端口,curl命令返回如下
  1. curl localhost:2002
  2. Warning: Binary output can mess up your terminal. Use "–output -" to tell
  3. Warning: curl to output it to your terminal anyway, or consider "–output
  4. Warning: <FILE>" to save to a file.

复制代码

nginx 里 grpc_pass grpc://127.0.0.1:2002; 老是返回这个错误

  1. [error] 13105#0: *116 upstream rejected request with error 0 while reading response header from upstream

复制代码

我应该怎么确定grpc程序正常工作?