Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ConfigWatch scheduled refresh throws errors after initial Consul config load

Aperta
#951 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java, spring, spring-boot
Ambito
backend, cloud

Direzione di ricerca

Inizia da ConfigWatch.watchConfigKeyValues e riproduci il problema con l’esempio WebFlux, la voce Consul KV e application.yaml descritti qui. Confronta il comportamento dell’aggiornamento pianificato con WebMVC, verificando al contempo le ReadTimeoutException e ResourceAccessException segnalate. Il lavoro è completato quando l’aggiornamento pianificato funziona senza errori con WebFlux e l’importazione iniziale di Consul continua a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Java
Stelle
821
Fork
539
Merge medio
5h 34m
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di spring-cloud/spring-cloud-consul

Tutte le issue di spring-cloud/spring-cloud-consul

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.