Describe the bug The config server is refusing to start, I am using Spring Boot version 2.4.5. I am trying to pull the configurations from AWS Param Store. I don't need it to be connected to git.
aws.paramstore.prefix=/config
aws.paramstore.name=tonyparam
spring.application.name= tonyparam
aws.paramstore.enabled=false
aws.paramstore.profileSeparator=_
'@SpringBootApplication' & '@EnableConfigServer' are the 2 annotations present in the main class. its funny but when i comment out the '@EnableConfigServer' it works but i need it for the dynamic configuration.
I get
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _ | \ \ \ \
\/ )| |)| | | | | || (_| | ) ) ) )
' || .__|| ||| |_, | / / / /
=========|_|==============|/=///_/
:: Spring Boot :: (v2.4.5)
2021-06-14 08:49:19.163 INFO 3848 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-/config/tonyparam/'}, BootstrapPropertySource {name='bootstrapProperties-/config/application/'}] 2021-06-14 08:49:19.181 INFO 3848 --- [ main] d.a.s.SpringCloudConfigServerApplication : No active profile set, falling back to default profiles: default 2021-06-14 08:49:20.189 INFO 3848 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=df714bbf-cd8e-3960-9e9f-f9253d18ef40 2021-06-14 08:49:20.495 INFO 3848 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8880 (http) 2021-06-14 08:49:20.508 INFO 3848 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2021-06-14 08:49:20.508 INFO 3848 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.45] 2021-06-14 08:49:20.663 INFO 3848 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021-06-14 08:49:20.663 INFO 3848 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1459 ms 2021-06-14 08:49:21.056 INFO 3848 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2021-06-14 08:49:21.438 WARN 3848 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.config.server.config.CompositeConfiguration': Unsatisfied dependency expressed through method 'setEnvironmentRepos' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/DefaultRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: You need to configure a uri for the git repository. 2021-06-14 08:49:21.439 INFO 3848 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' 2021-06-14 08:49:21.443 INFO 3848 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2021-06-14 08:49:21.466 INFO 3848 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2021-06-14 08:49:21.487 ERROR 3848 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
Invalid config server configuration.
Action:
If you are using the git profile, you need to set a Git URI in your configuration. If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.
Process finished with exit code 1 `
Comment From: ryanjbaxter
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
Comment From: inamjr
Hope this help https://github.com/inamjr/spring-server-and-client/tree/main/Spring%20Cloud%20Config%20Server
Comment From: inamjr
And if you are free i can arrange for a time to do a quick 5 min zoom call. And show you what i am talking about
Comment From: ryanjbaxter
That URL gives me a 404
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.