I have up and running eureka server, on my development server, and I am trying to connect a client, running on my localhost machine, while specifying the url for eureka server, the client continues to register to eureka on localhost which is not found. I am not sure what is wrong. However if i run the service client on the same server, it connect successfully, which in production, each service will be deployed on different instances.
Eureka Server properties file:
server.port=8761
spring.application.name=elyvium-eurka-server
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.server.enableSelfPreservation=false
Service properties file:
spring.application.name=ORDER_FLOW_MANAGEMENT
server.port=8084
eureka.instance.prefer-ip-address=true
eureka.client.service-url.defaultzone=http://my-server-url:8761/eureka
@SpringBootApplication
@EnableFeignClients
@EnableDiscoveryClient
public class OrderFlowManagementApplication {
}
And here is the error I get,
Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/}, exception=I/O error on GET request for "http://localhost:8761/eureka/apps/": Connect to http://localhost:8761 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused stacktrace=.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8761/eureka/apps/": Connect to http://localhost:8761 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused
I actually didn't find any solution after too many search,
What I expect is a solution, whether it is a network problem, or eureka configuration I need.