spring-cloud / spring-cloud/spring-cloud-config

Spring Cloud Config Server warn: EnvironmentNotFoundException: Profile Not found

Open
#2,331 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
2k
Forks
1.3k
Avg merge
2d 59m
Merged PRs (30d)
16

Description

Describe the bug
Spring cloud config is using version 2021.0.3 with spring-boot 2.7.14. When spring cloud config server starting up, it is healthy, but in a while it starts to throw warning message.
Please see the trailing message, and really appreciate with some assistance
Thanks
Sample
2023-09-22 20:27:11.326 WARN [,] [https-jsse-nio-8084-exec-3] [org.springframework.cloud.config.server.environment.EnvironmentController] [getEnvironment] [org.springframework.cloud.config.server.environment.EnvironmentController.getEnvironment(EnvironmentController.java:141)] - **Error getting the Environment with name=v3 profiles=api-docs label=null includeOrigin=false org.springframework.cloud.config.server.environment.EnvironmentNotFoundException: Profile Not found at org.springframework.cloud.config.server.environment.EnvironmentController.getEnvironment(EnvironmentController.java:136**) [spring-cloud-config-server-3.1.4.jar!/:3.1.4] at org.springframework.cloud.config.server.environment.EnvironmentController.defaultLabel(EnvironmentController.java:110) [spring-cloud-config-server-3.1.4.jar!/:3.1.4] at jdk.internal.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) [spring-core-5.3.29.jar!/:5.3.29] at org.springframework.cloud.context.scope.GenericScope$LockedScopedProxyFactoryBean.invoke(GenericScope.java:485) [spring-cloud-context-3.1.4.jar!/:3.1.4] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.3.29.jar!/:5.3.29] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) [spring-aop-5.3.29.jar!/:5.3.29] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) [spring-aop-5.3.29.jar!/:5.3.29] at org.springframework.cloud.config.server.environment.EnvironmentController$$EnhancerBySpringCGLIB$$ae6616f8.defaultLabel(<generated>) [spring-cloud-config-server-3.1.4.jar!/:3.1.4] at jdk.internal.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-5.3.29.jar!/:5.3.29] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) [spring-web-5.3.29.jar!/:5.3.29] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) [spring-webmvc-5.3.29.jar!/:5.3.29] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) [spring-webmvc-5.3.29.jar!/:5.3.29]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at EnvironmentController.getEnvironment and defaultLabel in the stack trace, then reproduce the request for name=v3 and profile=api-docs using the reported Spring Cloud Config and Spring Boot versions. Done means identifying the cause of the warning and verifying a fix or documented resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.