I am implementing micro service Netflix stack using spring cloud. Everything was going well but here is one problem.
My discovery server is hosted on digital ocean droplet. All of my eureka client from digital ocean are responding well. But one of my client is hosted in aws ec2 midium instance. After running my client it is connected with eureka server successfully. Eureka server showing my instance in dashboard but it's status is showing private DNS instead of public DNS or public IP. For this reason my zuul gateway is not connecting with that aws instance.
My question is:
- How can my eureka client connect using public IP or public DNS with my eureka discovery server
Here is my eureka client's application.yml file:
# Spring properties
spring:
application:
name: product-service
# HTTP Server
server:
port: 9090
servlet:
context-path: /product-service
my_message:server 5050
# Discovery Server Access
eureka:
client:
serviceUrl:
defaultZone: http://xx.xx.xx.xx:8080/discovery-server/eureka/
instance:
leaseRenewalIntervalInSeconds: false
management:
security:
enabled: false