SpringBoot 2.7 SpringCloud 2020.0.3

Describe the bug Application use config server client with discovery first bootstrap (Eureka). When sending a request on /actuator/refresh, the url of configserver is lost

Sample https://github.com/guerricm/config-server-pbrefresh

start eureka on port 8761 start configserver on port 9999 start service A : configserver use the good url call http://localhost:8080/actuator/refresh configserver client use the default localhost:8888 url


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.4.7)

2021-06-23 18:46:55.061  INFO 21780 --- [           main] o.s.b.context.config.ConfigDataLoader    : Fetching config from server at : http://pc-11455.huge.ad.hcuge.ch:9999/
2021-06-23 18:46:55.063  WARN 21780 --- [           main] o.s.b.context.config.ConfigDataLoader    : Could not locate PropertySource ([ConfigServerConfigDataResource@2687f956 uris = array<String>['http://pc-11455.huge.ad.hcuge.ch:9999/'], optional = true, profiles = list['default']]): None of labels [] found
2021-06-23 18:47:02.958  INFO 21780 --- [oundedElastic-1] o.s.b.context.config.ConfigDataLoader    : Fetching config from server at : http://localhost:8888
2021-06-23 18:47:03.961  INFO 21780 --- [oundedElastic-1] o.s.b.context.config.ConfigDataLoader    : Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available
2021-06-23 18:47:03.963  WARN 21780 --- [oundedElastic-1] o.s.b.context.config.ConfigDataLoader    : Could not locate PropertySource ([ConfigServerConfigDataResource@82da5ef uris = array<String>['http://localhost:8888'], optional = true, profiles = list['default']]): I/O error on GET request for "http://localhost:8888/service-a/default": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect

Comment From: ryanjbaxter

This sounds similar to https://github.com/spring-cloud/spring-cloud-commons/issues/968

Can you try using 2020.0.4-SNAPSHOT and see if the problem still occurs?

Comment From: guerricmerleHUG

@ryanjbaxter I update my sample with serviceC : SpringBoot 2.5.3-SNAPSHOT and SpringCloud 2020.0.4-SNAPSHOT.

Same issue :


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v2.5.3-SNAPSHOT)

2021-07-01 20:42:22.281  INFO 17336 --- [           main] o.s.b.context.config.ConfigDataLoader    : Fetching config from server at : http://pc-11455.huge.ad.hcuge.ch:9999/
2021-07-01 20:42:22.285  WARN 17336 --- [           main] o.s.b.context.config.ConfigDataLoader    : Could not locate PropertySource ([ConfigServerConfigDataResource@5486887b uris = array<String>['http://pc-11455.huge.ad.hcuge.ch:9999/'], optional = true, profiles = list['default']]): None of labels [] found
2021-07-01 20:42:57.387  INFO 17336 --- [oundedElastic-1] o.s.b.context.config.ConfigDataLoader    : Fetching config from server at : http://localhost:8888
2021-07-01 20:42:58.408  INFO 17336 --- [oundedElastic-1] o.s.b.context.config.ConfigDataLoader    : Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available
2021-07-01 20:42:58.411  WARN 17336 --- [oundedElastic-1] o.s.b.context.config.ConfigDataLoader    : Could not locate PropertySource ([ConfigServerConfigDataResource@54113be7 uris = array<String>['http://localhost:8888'], optional = true, profiles = list['default']]): I/O error on GET request for "http://localhost:8888/service-c/default": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect