Consul kv get - Connection reset by peer

现象

获取 consul kv 时抛出异常:connection reset by peer

排查

  • 观察 8500 端口 ESTABLISHED 数量,达到 201
  • 查询 consul 官网配置,GitHub issues,发现 http_max_conns_per_client 默认值是 200
    • http_max_conns_per_client - Configures a limit of how many concurrent TCP connections a single client IP address is allowed to open to the agent’s HTTP(S) server. This affects the HTTP(S) servers in both client and server agents. Default value is 200.

Consul client not listening to localhost randomly · Issue #7668 · hashicorp/consul
https://github.com/hashicorp/consul/issues/7668

Consul Agent Configuration Reference | Consul by HashiCorp
https://www.consul.io/docs/agent/config/config-files#http_max_conns_per_client

Consul kv get - Connection reset by peer

https://1.not.icu/Consul-kv-get-Connection-reset-by-peer/

作者

Sony Dog

发布于

2022-09-08

更新于

2023-12-26

许可协议

CC BY-NC-SA 4.0