Search code examples
javaspring-bootmicroservicesnetflix-eurekaamazon-app-runner

Eureka Discovery Server not registering client


We have few microservices using Eureka discovery server. In local, everything works fine but when we deploy it on AWS App Runner, it is not registering any of the microservices. Any suggestions what could be wrong here?

Below is the sample config file that we have in our microservices-

`eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/(we are replacing this with      the discovery service URL)
eureka.instance.prefer-ip-address=true
eureka.instance.prefer-ip-address=true
spring.cloud.gateway.discovery.locator.enabled=true
spring.cloud.gateway.discovery.locator.lowerCaseServiceId=true
spring.cloud.discovery.enabled=true
eureka.instance.hostname=localhost(this is being replaced with discovery service domain during deployment)`

Here is our discovery service app's sample config file-

`server.port=8761
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.server.waitTimeInMsWhenSyncEmpty=0
eureka.instance.hostname=localhost`

We tried updating the config files as mentioned in the attached sample code but still the discovery service app is not registering any of the instances of microservices.


Solution

  • This has been resolved, apparently the issue was resolved when we applied correct security group configuration for our services.