spring-cloud / spring-cloud/spring-cloud-consul
Springboot application restarting after getting warning -Error querying consul Key/Values for context
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
Springboot app in production restarts after below warning occurs. This happens after the application has been running for sometime due to which all the nodes restarts.
WARN o.s.c.c.c.ConfigWatch [ConfigWatch.java:206] Error querying consul Key/Values for context .Message: Error creating bean with name 'getDataSource': Could not bind properties to 'DataSource' : prefix=spring.datasource, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.datasource' to javax.sql.DataSource
This is happening continuously. Tried to stop restart by setting fail-fast as false but didn't work. Now i have disabled the watch to not keep looking for updates in consul. But that doesn't solve the problem.
I have been using springboot 2.2.0 and dependency spring-cloud-starter-consul-al
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ConfigWatch.java:206 and trace how the Consul configuration refresh handles the DataSource binding failure shown in the warning. Reproduce the production restart if possible and identify why fail-fast=false does not prevent it; done means the application remains running when this warning occurs and the relevant behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, 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