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

[Consul]: Service check fails when running apps without Docker #24377

Open
mraible opened this issue Nov 28, 2023 · 10 comments
Open

[Consul]: Service check fails when running apps without Docker #24377

mraible opened this issue Nov 28, 2023 · 10 comments

Comments

@mraible
Copy link
Contributor

mraible commented Nov 28, 2023

Overview of the issue

I tested my micro frontends demo script with JHipster 8 tonight. I found that when I ran Consul (via Docker Compose), and all the apps with ./gradlew, service checks fail. Everything still works; it's just kinda weird to see indicators that it might not work.

consul-services consul-service-checkfail

Everything works as expected when running all apps with docker compose up.

Motivation for or Use Case

I don't think this happened with v7.

Reproduce the error

Follow this demo script and you'll see the problem at "Verify everything is started using Consul at http://localhost:8500".

Suggest a Fix

Not sure.

JHipster Version(s)

8.0.0 and spring-boot-3.2 branch.

@mraible
Copy link
Contributor Author

mraible commented Nov 29, 2023

@deepu105 Any ideas?

@mshima
Copy link
Member

mshima commented Nov 29, 2023

The consul container doesn't have access to the service using the published address.
The address should use the domain host.docker.internal so it can be accessible by containers.

My guess is to use:

SERVER_ADDRESS="host.docker.internal" ./gradlew

@mraible
Copy link
Contributor Author

mraible commented Nov 29, 2023

What I'm trying to say is this is a regression since 7.9.3. If you look at my blog post and search for "You can verify everything is started using Consul", you'll see that all instances are healthy.

image

When I tried the same steps with v8, it results in the screenshot in this issue's description.

@deepu105
Copy link
Member

deepu105 commented Nov 30, 2023 via email

@bassyrlakh
Copy link

Try checking the Docker network for the Consul stack and make sure that exchange to service has been checked health

@mraible
Copy link
Contributor Author

mraible commented Mar 19, 2024

This is now fixed on the main branch.

@mraible mraible closed this as completed Mar 19, 2024
@deepu105 deepu105 added this to the 8.2.0 milestone Mar 20, 2024
@mraible
Copy link
Contributor Author

mraible commented Jun 24, 2024

This issue has returned again on the main branch.

@mraible mraible reopened this Jun 24, 2024
Copy link
Contributor

github-actions bot commented Jun 24, 2024

JHipster has completed the sample check
.yo-rc.json: blank
Entities JDL: blank
Application: successfully generated
Frontend check: skipped
Backend check: skipped
E2E check: skipped

This check uses jhipster info output from the issue description to generate the sample.
Bug report that does not contain this information will be marked as invalid.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
@hfsoares
Copy link

This issue is present on version 8.7.1

@mraible
Copy link
Contributor Author

mraible commented Oct 12, 2024

I can confirm this happens as well. I've seen it twice during my presentations this month. I'll reopen.

@mraible mraible reopened this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants