【问题标题】:Meaning of curl responsecurl响应的含义
【发布时间】:2016-07-19 15:40:40
【问题描述】:

我已经下载了官方的 consul 镜像,并在 nginx 负载均衡器后面运行它。 当我使用 curl 发送任何 http 请求时

curl my-consul-http-endpoint:8500/v1/catalog/nodes我得到以下回复

*   Trying 172.29.225.62...
* Connected to my-consul-http-endpoint.com (172.29.225.62) port 80 (#0)
> GET /v1/session/list HTTP/1.1
> Host: my-consul-http-endoint
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 502 Bad Gateway
< Server: nginx
< Date: Tue, 19 Jul 2016 15:32:55 GMT
< Content-Type: text/html
< Content-Length: 18633
< Connection: keep-alive
< ETag: "56f72a9b-48c9"


    Connection #0 to host my-consul-http-endpoint left intact

回复说明了什么?我连接到领事服务器了吗?服务器是否返回错误并反过来 nginx 负载均衡器返回 502?

【问题讨论】:

  • 我认为这个问题来自你的 nginx 服务器。再次尝试配置。
  • 能否详细说明
  • 很抱歉,我知道当你配置 nginx 错误时,你会得到 502 Bad Gateway。我不知道你的案子有什么问题。对不起
  • 请发布您的 nginx 配置

标签: http curl nginx consul


【解决方案1】:

部署 consul 客户端并使用http://localhost:8500 连接到它

【讨论】:

    猜你喜欢
    • 2019-11-18
    • 2016-04-19
    • 2023-03-17
    • 1970-01-01
    • 1970-01-01
    • 2013-05-04
    • 1970-01-01
    • 2011-12-14
    • 1970-01-01
    相关资源
    最近更新 更多