Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

ConfigWatch scheduled refresh throws errors after initial Consul config load

Đang mở
#951 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java, spring, spring-boot
Lĩnh vực
backend, cloud

Hướng nghiên cứu

Bắt đầu tại ConfigWatch.watchConfigKeyValues và tái hiện sự cố với mẫu WebFlux, mục Consul KV và application.yaml được mô tả ở đây. So sánh hành vi làm mới theo lịch với WebMVC, đồng thời kiểm tra các ReadTimeoutException và ResourceAccessException đã được báo cáo. Được xem là hoàn tất khi làm mới theo lịch hoạt động không có lỗi trên WebFlux và quá trình import Consul ban đầu vẫn tiếp tục hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Java
Star
821
Fork
539
Merge trung bình
5 giờ 34 phút
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của spring-cloud/spring-cloud-consul

Tất cả issue của spring-cloud/spring-cloud-consul

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.