Reputation: 127
I have followed the instructions from: https://cloud.spring.io/spring-cloud-static/Dalston.SR5/multi/multi_spring-cloud-eureka-server.html
With no success, not sure what can be missing.
I have some code demo at: https://github.com/dbranco/eureka-server
I was expecting to run: gradlew bootRun and be able to navigate into http://localhost:8761, but I am getting a
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Jul 09 00:13:18 BST 2019 There was an unexpected error (type=Not Found, status=404). No message available
And when starting the server I am getting some connection refused. Can someone pinpoint what is missing?
I have tried the post from here without success: I got a "Whitelabel Error Page" when using Eureka server
Upvotes: 3
Views: 12263
Reputation: 1732
Make sure Spring Cloud Version and Spring Version is supposed to work together, for newer versions there is a incompatibility warning implemented, this was not the case for older versions. You can check the compatible versions here: https://spring.io/projects/spring-cloud
Upvotes: 1
Reputation: 57
try including bootstrap dependency on service project if you are running config server on different port and renamed service project's properties file to bootstrap.properties
.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
Upvotes: 1
Reputation: 1490
Eureka server itself has no web pages except the dashboard page. Since your server starts successfully, I guess your problem is, why you can't access the dashboard page. Also after looking at your Github application.properties
file, I would suggest below configs,
spring.application.name=demo-eureka-server
server.port=8761
eureka.instance.hostname=localhost
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.dashboard.path=/dashboard
After these configurations, you should able to access the dashboard via http://localhost:8761/dashboard
url. Also, if your client services have configured correctly, you should see each of the connecting service in this dashboard.
EDIT
Although, eureka.dashboard.path=/dashboard
and eureka.instance.hostname=localhost
would not be mandatory, eureka.client.register-with-eureka=false
is required. This property avoid Eureka
server to register with itself as a client and make it act as a server. This eureka.client.fetch-registry=false
property also required, if there are no other registry nodes available at the moment. It tells, Eureka
server to don't search for other registry nodes.
And, yes. If the eureka.dashboard.path=/dashboard
not defined, dashboard would available at the root (http://localhost:8761/
).
Upvotes: 7