Search code examples
spring-bootspring-cloudnetflix-eurekaspring-cloud-netflix

Spring Eureka Dashboard not loading


I am trying to start a Eureka server with basic configuration, but the dashboard will not load. Instead, below XML is being returned. enter image description here

Please find the below code.

In application.yml file

eureka:
  environment: qa
  client:
    fetch-registry: false
    register-with-eureka: false
  dashboard:
    enabled: true

spring:
  application:
    name: eureka-server    

server:
  port: 8761

Main class:

@SpringBootApplication
@EnableEurekaServer
public class MygynecologistEurekaServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(MygynecologistEurekaServerApplication.class, args);
    }
}

pom.xml

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.4.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-eureka-server</artifactId>
    </dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

A similar question was asked here, but it was resolved. Thanks for reading.

UPDATE: with the same code I was able to load the eureka dashboard in a windows machine(windows 8.1) . But it doesn't work in my macbook pro. Should we have to add any extra settings for mac?


Solution

  • I finally found a solution. The issue has got something to do with the versions I used. I made the following changes to fix it

    1. Updated the spring-boot-starter-parent version to 2.0.2.RELEASE
    2. Updated the spring-cloud-dependencies version to Finchley.RC1
    3. Changed the Artifact ID to spring-cloud-starter-netflix-eureka-server