简体   繁体   English

Spring Boot Admin客户端状态为关闭

[英]Spring Boot Admin client status is down

I have a SpringAdminServer(1.5.0), an EurekaServer, and an EurekaClient. 我有一个SpringAdminServer(1.5.0),一个EurekaServer和一个EurekaClient。

The SpringAdminServer uses @EnableDiscoveryClient way to host. SpringAdminServer使用@EnableDiscoveryClient方式进行托管。 I can see both SpringAdminServer and EurekaClient registering to EurekaServer normally. 我可以看到SpringAdminServer和EurekaClient都正常注册到EurekaServer。 However, the status of EurekaClient shown on SpringAdminServer is always "DOWN".(SpringAdminServer show 404 error to requesting EurekaClient's /info or /metric path...) 但是,SpringAdminServer上显示的EurekaClient的状态始终为“ DOWN”。(SpringAdminServer显示404错误,要求EurekaClient的/ info或/ metric路径...)

I tried another way of including spring-boot-admin-starter-client into the client's POM, which will make the client's status UP on the SpringAdminServer and thus no errors found to request the /info or /metric path... 我尝试了另一种方式,将spring-boot-admin-starter-client包含在客户端的POM中,这将使客户端在SpringAdminServer上的状态变为UP,因此未发现请求/ info或/ metric路径的错误...

Anyone knows what happened? 有人知道发生了什么吗? Thanks. 谢谢。

Here are the content of my client's POM: 这是我客户的POM的内容:

<modelVersion>4.0.0</modelVersion>

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

<groupId>nickeurekaclient</groupId>
<artifactId>nickeurekaclient</artifactId>
<version>1.0-SNAPSHOT</version>

<dependencies>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.7.4</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.7.4</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>2.7.4</version>
    </dependency>

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



</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Camden.BUILD-SNAPSHOT</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <start-class>eurekademo.EurekaApplication</start-class>
    <java.version>1.7</java.version>
    <docker.image.prefix>springcloud</docker.image.prefix>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>com.spotify</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>0.2.3</version>
            <configuration>
                <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                <dockerDirectory>src/main/docker</dockerDirectory>
                <resources>
                    <resource>
                        <targetPath>/</targetPath>
                        <directory>${project.build.directory}</directory>
                        <include>${project.build.finalName}.jar</include>
                    </resource>
                </resources>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <!-- defined in spring-cloud-starter-parent pom (as documentation hint),
                but needs to be repeated here -->
            <configuration>
                <requiresUnpack>
                    <dependency>
                        <groupId>com.netflix.eureka</groupId>
                        <artifactId>eureka-core</artifactId>
                    </dependency>
                </requiresUnpack>
            </configuration>
        </plugin>

        <plugin>
            <!--skip deploy (this is just a test module) -->
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
    </plugins>
</build>

<repositories>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/libs-snapshot-local</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/libs-milestone-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-releases</id>
        <name>Spring Releases</name>
        <url>https://repo.spring.io/libs-release-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/libs-snapshot-local</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/libs-milestone-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

ADD

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

to POM will do the trick. 到POM就能解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM