spring-cloud / spring-cloud/spring-cloud-netflix

Wrong status and health check urls if random management port

Open
#4,130 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting for votes
Dominant language
Java
Stars
5k
Forks
2.5k
Avg merge
1d 2h
Merged PRs (30d)
10

Description

If I configure a random management port (management.server.port=0) in the eureka client's spring boot application properties, eureka calculates the statusPageUrl and healthCheckUrl with the incorrect port, i.e. not the actual management port, but the one for the default server.

I think that this is an unintended consequence of the fix for https://github.com/spring-cloud/spring-cloud-netflix/issues/2732, as the management web server initialization event is being disregarded, which it shouldn't for determining these specific urls.

I'm using the latest spring boot (2.7.5) and spring cloud (2021.0.4)

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 by reproducing the Eureka client configuration with management.server.port=0 and inspect how the management web server initialization event is handled when statusPageUrl and healthCheckUrl are calculated. Done means both URLs use the actual random management port rather than the default server port.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.