Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring cloud config retry #13809

Merged
merged 6 commits into from
Feb 2, 2021

Conversation

pascalgrimaud
Copy link
Member

Fix #13800


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mraible
Copy link
Contributor

mraible commented Feb 2, 2021

@pascalgrimaud I tested this using the following technique:

  1. Pulled your branch, ran npm link, then jhipster jdl reactive-ms.
  2. I started Keycloak using jhkeycloakup.
  3. I navigated to the gateway app and ran ./gradlew.
  4. The app spits out errors, but stays up, until I run jhregistryup, then it connects.

So yes, your branch works. Then, I tried the main branch with the same steps and it works too. Do you have steps to reproduce the issue so I can compare main to this PR?

@pascalgrimaud
Copy link
Member Author

Can you try with prod profile instead of Dev ?

@mraible
Copy link
Contributor

mraible commented Feb 2, 2021

I tried with the prod profile on the main branch (that uses spring.config.import). It fails:

Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for 
"http://localhost:8761/config/gateway/prod/main": Connection refused (Connection refused); 
nested exception is java.net.ConnectException: Connection refused (Connection refused)
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:784)
        at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:710)
        at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:601)
        at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.getRemoteEnvironment(ConfigServerConfigDataLoader.java:252)
        at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.doLoad(ConfigServerConfigDataLoader.java:102)
        ... 25 common frames omitted

If I try with this PR, it works was as expected, and waits for the JHipster Registry to start.

:: JHipster 🤓  :: Running Spring Boot 2.4.2 ::
:: https://www.jhipster.tech ::

<===========--> 90% EXECUTING [1m 45s]

FYI... @spencergibb. We're using org.springframework.cloud:spring-cloud-config-client:3.0.1.

@DanielFran DanielFran merged commit f8e66b9 into jhipster:main Feb 2, 2021
@pascalgrimaud pascalgrimaud added this to the v7.0.0-beta.2 milestone Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spring Cloud Config: no retry and failed to start
3 participants