I am using Spring Cloud Eureka Server and Config Server, as Discovery First, and my problem is:
When a service registry it self in the eureka server the Config Server URL it returns is http://LOCALHOST:8888 intead of the http://{HOST_NAME}}:8888 and them all the other services hosted in another servers cannot find its configuration.
Log line:
Fetching config from server at: http://localhost:8888
Is there any configuration I can do to fix it?
The application.yml of configuration server is like that:
server:
port: 8888
spring:
application:
name: configserver
profiles:
active: native
cloud:
config:
server:
native:
searchLocations: /opt/config_dir
eureka:
client:
serviceUrl:
defaultZone: http://10.111.22.33:8761/eureka,http://10.111.33.44:8761/eureka
The config client bootstrap.yml is like this:
spring:
application:
name: show-service
profiles:
active: dev
cloud:
discovery:
enabled: true
eureka:
client:
serviceUrl:
defaultZone: http://10.111.22.33:8761/eureka,http://10.111.33.44:8761/eureka