Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ConfigWatch scheduled refresh throws errors after initial Consul config load

オープン
#951 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java, spring, spring-boot
領域
backend, cloud

調査の方向性

ConfigWatch.watchConfigKeyValues から始め、ここで説明されている WebFlux のサンプル、Consul KV エントリ、application.yaml を使って問題を再現します。報告されている ReadTimeoutException と ResourceAccessException を確認しながら、スケジュールされた更新の動作を WebMVC と比較します。WebFlux でスケジュールされた更新がエラーなしで動作し、初期の Consul インポートも引き続き動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

waiting-for-triage

Describe the bug
Spring Cloud Consul Сonfig 5.0.0

When starting a project, the initial initialization of properties with consul occurs correctly.

But each subsequent scheduled call to the ConfigWatch::watchConfigKeyValues ​​method generates an error

2026-01-27T16:04:49.322+02:00 WARN 21920 --- [gateway] [ctor-http-nio-4] r.netty.http.client.HttpClientConnect : [0fd22999-1, L:/127.0.0.1:49984 - R:localhost/127.0.0.1:8500] The connection observed an error

io.netty.handler.timeout.ReadTimeoutException

2026-01-27T16:04:49.325+02:00 ERROR 21920 --- [gateway] [TaskScheduler-1] o.s.cloud.consul.config.ConfigWatch : Fail fast is set and there was an error reading configuration from consul.
2026-01-27T16:04:49.325+02:00 ERROR 21920 --- [gateway] [TaskScheduler-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task

org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8500/v1/kv/config/gateway,default/": null

I want to say once again that the initial initialization via spring.config.import: 'consul:' was successful. Also, if you disable watch config, there are no errors. All of the above suggests that the problem is not in Consul, but in the functionality of the ConfigWatch::watchConfigKeyValues ​​method.

I tested the project with both WebMVC and WebFlux. I found that errors occur only when using WebFlux.
When using WebMVC, everything works correctly.

Sample
Create Spring Boot project with webflux and spring-cloud-starter-consul-config starter.

Your project will start on port 8082 since the initial initialization was successful. But later on, errors will start to be generated due to ConfigWatch::watchConfigKeyValues.

application.yaml

spring:
  application:
    name: gateway
  config:
    import: 'consul:'
  cloud:
    consul:
      host: localhost
      port: 8500

Consul KV

Key: config/gateway,default/server.port
Value: 8082
主要言語
Java
スター
821
フォーク
539
平均マージ
5時間 34分
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

spring-cloud/spring-cloud-consul のほかの issue

spring-cloud/spring-cloud-consul の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。