Spring eureka dashboard returns XML on wildfly

I am trying to deploy my eureka service from wildfly but when I try to access the dashboard I get the following xml as a response:

<com.netflix.eureka.util.StatusInfo>
<generalStats>
<environment>test</environment>
<num-of-cpus>4</num-of-cpus>
<total-avail-memory>3525mb</total-avail-memory>
<current-memory-usage>736mb (20%)</current-memory-usage>
<server-uptime>00:01</server-uptime>
</generalStats>
<applicationStats>
<registered-replicas>http://localhost:8761/eureka/</registered-replicas>
<available-replicas/>
<unavailable-replicas>http://localhost:8761/eureka/,</unavailable-replicas>
</applicationStats>
<instanceInfo>
<instanceId>note:eureka-service:8761</instanceId>
<hostName>note</hostName>
<app>EUREKA-SERVICE</app>
<ipAddr>192.168.1.36</ipAddr>
<status>UP</status>
<overriddenstatus>UNKNOWN</overriddenstatus>
<port enabled="true">8761</port>
<securePort enabled="false">443</securePort>
<countryId>1</countryId>
<dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo">
<name>MyOwn</name>
</dataCenterInfo>
<leaseInfo>
<renewalIntervalInSecs>30</renewalIntervalInSecs>
<durationInSecs>90</durationInSecs>
<registrationTimestamp>0</registrationTimestamp>
<lastRenewalTimestamp>0</lastRenewalTimestamp>
<evictionTimestamp>0</evictionTimestamp>
<serviceUpTimestamp>0</serviceUpTimestamp>
</leaseInfo>
<metadata class="java.util.Collections$EmptyMap"/>
<homePageUrl>http://note:8761/</homePageUrl>
<statusPageUrl>http://note:8761/info</statusPageUrl>
<healthCheckUrl>http://note:8761/health</healthCheckUrl>
<vipAddress>eureka-service</vipAddress>
<secureVipAddress>eureka-service</secureVipAddress>
<isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer>
<lastUpdatedTimestamp>1491796603178</lastUpdatedTimestamp>
<lastDirtyTimestamp>1491796615476</lastDirtyTimestamp>
</instanceInfo>
</com.netflix.eureka.util.StatusInfo>

      

Does anyone know how to get control panel deployment on wildfly?

+3


source to share


3 answers


In my case, the other two solutions didn't help.

I have searched for hours and found a solution while debugging spring code. ViewResolver for freemarker did not find templates in spring-cloud-netflix-eureka-server-1.3.1.RELEASE.jar.



Actually I just needed to set one simple property to accomplish all of this:

spring.freemarker.prefer filesystem access = false

+2


source


For me the problem was that I had an empty folder, src / main / resources / templates. When this folder exists, FreeMarkerView does not see the built-in templates contained in spring-cloud-netflix-eureka-server. I don't remember where this folder came from, but I suspect it is in the online sample. Removal fixed.



0


source


I had the same problem using the following pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>eureka</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>eureka</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.3.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-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

      

It was the pom.xml of the auto-generated page https://start.spring.io/ . It turns out I had to change the version number of the spring-boot-starter-parent artifact to a lower version in order to display the eureka bar correctly.

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

      

0


source







All Articles