spring-cloud-config
spring-cloud-config copied to clipboard
Using fail-fast, the retry functionality does not wait. It seems not to use a Backoff policy (Spring Boot 4, Spring Cloud 2025.1.0)
Using fail-fast the retry functionality does not wait, it seems not to use a Backoff policy.
I'm using Spring Boot 4 and Spring Cloud 2025.1.0.
This is the application.yml:
spring:
application:
name: '@project.artifactId@'
config:
import: ["optional:configtree:/run/secrets/", "configserver:"]
cloud:
config:
uri: ${CONF_SERVER_URL}
username: ${CONF_CLIENT_USERNAME}
password: ${CONF_CLIENT_PASSWORD}
fail-fast: true
retry:
max-attempts: 10
max-interval: 5000
initial-interval: 1000
multiplier: 2.0
This is an excerpt from the pom.xml:
<?xml version='1.0' encoding='utf-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.0.0</version>
<relativePath/>
</parent>
<groupId>com.xyz.abc</groupId>
<artifactId>bff</artifactId>
<version>1.0.0</version>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
<properties>
<maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud.version>2025.1.0</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
</dependencies>
This is the log:
2025-12-05T12:11:09.889+01:00 INFO 1 --- [bff] [ main] c.m.atms.commons.bff.BffApplication : Starting BffApplication v1.0.0 using Java 25.0.1 with PID 1 (/opt/app.jar started by spring in /opt)
2025-12-05T11:11:09.890829521Z 2025-12-05T12:11:09.890+01:00 INFO 1 --- [bff] [ main] c.m.atms.commons.bff.BffApplication : The following 1 profile is active: "develop"
2025-12-05T11:11:09.927975934Z 2025-12-05T12:11:09.927+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=0
2025-12-05T11:11:09.928217935Z 2025-12-05T12:11:09.927+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=0
2025-12-05T11:11:09.928226727Z 2025-12-05T12:11:09.927+01:00 INFO 1 --- [bff] [ main] o.s.c.c.c.ConfigServerConfigDataLoader : Fetching config from server at : https://conf.lan:8443
2025-12-05T11:11:09.928229394Z 2025-12-05T12:11:09.928+01:00 INFO 1 --- [bff] [ main] o.s.c.c.c.ConfigServerConfigDataLoader : Exception on Url - https://conf.lan:8443:org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://conf.lan:8443/bff/default": Connection refused. Will be trying the next url if available
2025-12-05T11:11:09.928232185Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Checking for rethrow: count=1
2025-12-05T11:11:09.928234269Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=1
2025-12-05T11:11:09.928236352Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=1
2025-12-05T11:11:09.928238435Z 2025-12-05T12:11:09.928+01:00 INFO 1 --- [bff] [ main] o.s.c.c.c.ConfigServerConfigDataLoader : Fetching config from server at : https://conf.lan:8443
2025-12-05T11:11:09.928240602Z 2025-12-05T12:11:09.928+01:00 INFO 1 --- [bff] [ main] o.s.c.c.c.ConfigServerConfigDataLoader : Exception on Url - https://conf.lan:8443:org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://conf.lan:8443/bff/default": Connection refused. Will be trying the next url if available
2025-12-05T11:11:09.928282686Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Checking for rethrow: count=2
2025-12-05T11:11:09.928288061Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=2
2025-12-05T11:11:09.928403103Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=2
2025-12-05T11:11:09.928425311Z 2025-12-05T12:11:09.928+01:00 INFO 1 --- [bff] [ main] o.s.c.c.c.ConfigServerConfigDataLoader : Fetching config from server at : https://conf.lan:8443
2025-12-05T11:11:09.928428312Z 2025-12-05T12:11:09.928+01:00 INFO 1 --- [bff] [ main] o.s.c.c.c.ConfigServerConfigDataLoader : Exception on Url - https://conf.lan:8443:org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://conf.lan:8443/bff/default": Connection refused. Will be trying the next url if available
2025-12-05T11:11:09.928431020Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Checking for rethrow: count=3
2025-12-05T11:11:09.928454520Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=3
2025-12-05T11:11:09.928457687Z 2025-12-05T12:11:09.928+01:00 DEBUG 1 --- [bff] [ main] c.ConfigServerConfigDataLocationResolver : Retry: count=3