Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Spring Cloud Consul config watch keeps generating warning messages

未关闭
#950 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
java, spring
领域
backend, cloud

调研方向

从附带的 gateway.zip 复现程序和针对 config/application/ 与 config/gateway/ 上下文的 ConfigWatch 警告开始。复现 issue 中所示的 Consul KV 设置,然后跟踪为什么 watch 请求在数据已存在的情况下仍会遇到 ReadTimeoutException。只有当 watches 能够获取所提供的配置且不再反复输出警告消息时,才算完成。

由索引模型根据 Issue 内容生成。

描述

waiting-for-triage

Describe the bug
Spring Cloud Consul config 5.0.0 keeps giving us warnings messages when enabling config watches for configuration, and the config data can be found with config/application/data(data is the key).

[
{
"key": "config/",
"flags": 0,
"value": ""
},
{
"key": "config/application/",
"flags": 0,
"value": ""
},
{
"key": "config/application/data",
"flags": 0,
"value": "bG9nZ2luZzoKICBsZXZlbDoKICAgIG9yZy5zcHJpbmdmcmFtZXdvcmsuY29yZS5lbnY6IERFQlVH"
},
{
"key": "config/gateway/",
"flags": 0,
"value": ""
},
{
"key": "config/gateway/data",
"flags": 0,
"value": ""
}
]

Sample

gateway.zip

The logs are as below. and if set fail fast, It will produce errors. and actually, we had provided the config items in consul KV.

2026-01-26T18:44:20.470+08:00 WARN 36468 --- [gateway] [TaskScheduler-1] o.s.cloud.consul.config.ConfigWatch : Error querying consul Key/Values for context 'config/gateway/'. Message: I/O error on GET request for "http://localhost:8500/v1/kv/config/gateway/": null
2026-01-26T18:44:30.475+08:00 WARN 36468 --- [gateway] [ctor-http-nio-5] r.netty.http.client.HttpClientConnect : [74757339-1, L:/127.0.0.1:62403 - R:localhost/127.0.0.1:8500] The connection observed an error

io.netty.handler.timeout.ReadTimeoutException

2026-01-26T18:44:30.475+08:00 WARN 36468 --- [gateway] [TaskScheduler-1] o.s.cloud.consul.config.ConfigWatch : Error querying consul Key/Values for context 'config/application/'. Message: I/O error on GET request for "http://localhost:8500/v1/kv/config/application/": null
2026-01-26T18:45:10.488+08:00 WARN 36468 --- [gateway] [ctor-http-nio-7] r.netty.http.client.HttpClientConnect : [61d86986-1, L:/127.0.0.1:62448 - R:localhost/127.0.0.1:8500] The connection observed an error

io.netty.handler.timeout.ReadTimeoutException

2026-01-26T18:45:10.489+08:00 WARN 36468 --- [gateway] [TaskScheduler-1] o.s.cloud.consul.config.ConfigWatch : Error querying consul Key/Values for context 'config/gateway/'. Message: I/O error on GET request for "http://localhost:8500/v1/kv/config/gateway/": null
2026-01-26T18:45:20.504+08:00 WARN 36468 --- [gateway] [ctor-http-nio-2] r.netty.http.client.HttpClientConnect : [df3e3ad3-25, L:/127.0.0.1:62388 - R:localhost/127.0.0.1:8500] The connection observed an error

io.netty.handler.timeout.ReadTimeoutException

主要语言
Java
星标
821
派生
539
平均合并
5 小时 34 分钟
30 天内合并 PR
13

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

spring-cloud/spring-cloud-consul 的其他 Issue

查看 spring-cloud/spring-cloud-consul 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。