Quantcast
Channel: "Eureka-Server" doesn't see its properties from running "Spring Cloud Config Server" - Stack Overflow
Viewing all articles
Browse latest Browse all 2

"Eureka-Server" doesn't see its properties from running "Spring Cloud Config Server"

$
0
0

In "Eureka-Server" the "application.properties" file contains the following properties:

spring.config.import=configserver:http://localhost:8888spring.application.name=eserver

My "Spring Cloud Config Server" has the following properties in its application.properties file:

server.port=8888spring.application.name=spring-cloud-config-serverspring.cloud.config.server.git.uri=file:///D:/<path-to-folder>/config-repospring.cloud.config.server.git.default-label=mainspring.profiles.active=native

The "config-repo" folder contains a "server" folder containing an "application.properties" file with the following properties:

server.port=8761spring.application.name=eservereureka.client.service-url.defaultZone=http://localhost:8761/eurekaeureka.client.register-with-eureka=falseeureka.client.fetch-registry=false

So, when i run "spring-cloud-config-server" (config-server) everything is just OK, i don't see the errors or warnings.But when i try to run my "Eureka-Server" (eserver) it starts on port 8080 and throws the error like:

Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/}, exception=java.net.ConnectException: Connection refused: no further information stacktrace=jakarta.ws.rs.ProcessingException: java.net.ConnectException: Connection refused: no further information

So, eureka-server cannot not read its own properties from config-server. What i do wrong?

P.S. If I put all the properties from "config-repo\eserver\application.properties" back into eureka-server's "application.properties" then everything is fine. But I want to extract the configuration to config-server.

P.S. "spring-boot version" is 3.2.1, "spring-cloud version" is 2023.0.0


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images