SCS Configuration Help Needed
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 15/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- java, kubernetes, spring-boot
- Domaine
- backend
Piste de recherche
Start with the environment post-processor ordering the reporter compared: BindingSpecificEnvironmentPostProcessor.ORDER versus ConfigDataEnvironmentPostProcessor.ORDER, and the log line 'Creating binding-specific PropertySource from Kubernetes Service Bindings'. Reproduce the startup sequence where the config server fetch at localhost:8888 runs before bindings load. Done means bindings are applied before the config server lookup, confirmed by the startup log order and a test.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Hi,
We are experiencing problem integrating scs by using spring-cloud-bindings. Whatever we have tried, we could not bind scs to our app.
We have the below argument set to true on bootstrap.yml
org:
springframework:
cloud:
bindings:
boot:
enable: true
We have added the below dependency to pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
We provided the necessary scs configuration parameters to the pod via a servicebinding secret, and we can see they are mounted to spring bindings root inside the container.
When we start the application, scs is being processed before cloud bindings processor. It is trying to connect config server over localhost:8888 and fails, then bindings are being processed and application is starting. We can inspect the properties after application has started successfully by checking actuator/configprops, all binding properties are being displayed correctly, however the app is not integrated with config server.
Our spring boot version is 2.7, spring cloud version is 2021.0.6 and cloud-bindings version is 1.14.0.
Startup logs are as follows.
:: Spring Boot :: (v2.7.11)
2024-01-26 09:50:41.343
INFO [main:getRemoteEnvironment] org.springframework.cloud.config.client.ConfigServicePropertySourceLocator : **Fetching config from server at : http://localhost:8888/**
2024-01-26 09:50:41.545
INFO [main:getRemoteEnvironment] org.springframework.cloud.config.client.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://localhost:8888/. Will be trying the next url if available
2024-01-26 09:50:41.545
WARN [main:locate] org.springframework.cloud.config.client.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/DEVOPS.APPS.devops-pas-sandbox1/default": Connection refused; nested exception is java.net.ConnectException: Connection refused
2024-01-26 09:50:41.547
INFO [main:logStartupProfileInfo] org.springframework.boot.SpringApplication : No active profile set, falling back to 1 default profile: "default"
2024-01-26 09:50:41.558
INFO [main:logTo] org.springframework.boot.logging.DeferredLog : **Creating binding-specific PropertySource from Kubernetes Service Bindings**
2024-01-26 09:50:43.467
INFO [main:setSerializationId] org.springframework.cloud.context.scope.GenericScope : BeanFactory id=404a518b-3bec-3cba-b9b1-c91c9daa50e9
2024-01-26 09:50:44.456
INFO [main:initialize] org.springframework.boot.web.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
As per the logs, bindings are being processed after config server property fetching has finished, so we thought there is a problem with beanprocessing orderings, we checked the code, and compared the ordering values between ConfigDataEnvironmentPostProcessor.ORDER and BindingSpecificEnvironmentPostProcessor.ORDER and found that the latter is "ConfigDataEnvironmentPostProcessor.ORDER - 1;" so it should be processed with a higher precedence. However the logs shown above behaves like vice versa.
- Langage dominant
- Java
- Étoiles
- 50
- Forks
- 33
- Merge moyen
- 6 j 2 h
- PR mergées (30 j)
- 2
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de spring-cloud/spring-cloud-bindings
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 45/100
spring-cloud/spring-cloud-bindings#116 · 2 commentaires · 1 réaction ·
-
Difficulté 2/5 Une demi-journée Accessibilité débutants 55/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
-
Make bindings enabled by defaultOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
Toutes les issues de spring-cloud/spring-cloud-bindings
Issues similaires
-
area:cpan-port area:performance bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fglock/PerlOnJava#2230 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
federicoiosue/Omni-Notes#1044 ·
-
Industrial Center Text TypoOuverteBug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour