Skip to content

Fix Eureka registering unreachable hostname on Windows (prefer-ip-address)#512

Closed
moimenta84 wants to merge 0 commit intospring-petclinic:mainfrom
moimenta84:fix/eureka-prefer-ip-address
Closed

Fix Eureka registering unreachable hostname on Windows (prefer-ip-address)#512
moimenta84 wants to merge 0 commit intospring-petclinic:mainfrom
moimenta84:fix/eureka-prefer-ip-address

Conversation

@moimenta84
Copy link
Copy Markdown

@moimenta84 moimenta84 commented Mar 23, 2026

Fixes #487 …efer-ip-address

Add eureka.instance.prefer-ip-address: true to all microservices so they register their IP address instead of the system hostname in Eureka. This fixes issue #487 where services deployed on Windows register an unresolvable hostname, causing routing failures when other services try to communicate via the gateway.

Affected services: api-gateway, customers-service, vets-service, visits-service, admin-server, genai-service.

@arey
Copy link
Copy Markdown
Member

arey commented Mar 23, 2026

Hi @moimenta84 did you reproduce the same issue on your Windows system?
Have you considered factoring this configuration out to the configuration server?

@moimenta84 moimenta84 closed this Mar 23, 2026
@moimenta84 moimenta84 force-pushed the fix/eureka-prefer-ip-address branch from cc4235d to 17cad88 Compare March 23, 2026 21:21
@sonarqubecloud
Copy link
Copy Markdown

@moimenta84
Copy link
Copy Markdown
Author

Following your suggestion, I've moved `eureka.instance.prefer-ip-address: true` to the shared config server instead of repeating it in each microservice's
`application.yml`. The fix is here: spring-petclinic/spring-petclinic-microservices-config#32"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Gateway Registers Unreachable/Wrong Hostname in Eureka on Windows, Causing 405 and Timeout Errors

2 participants