【问题标题】:Spring Boot Admin 2.0.0 Eureka 1.9.2 Not Displaying Any AppsSpring Boot Admin 2.0.0 Eureka 1.9.2 不显示任何应用程序
【发布时间】:2018-06-06 18:11:01
【问题描述】:

我在 Eureka 服务器上运行并注册了 3 个应用程序,当我转到 http://localhost:8761/eureka/apps 时,我可以看到它们全部:

<applications>
  <versions__delta>1</versions__delta>
  <apps__hashcode>UP_3_</apps__hashcode>
  <application>
    <name>ARSIICLOUD-SERVER</name>
    <instance>
      <instanceId>arsiicloud-server</instanceId>
      <hostName>localhost</hostName>
      <app>ARSIICLOUD-SERVER</app>
      <ipAddr>10.34.2.105</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>10</renewalIntervalInSecs>
        <durationInSecs>90</durationInSecs>
        <registrationTimestamp>1528307815989</registrationTimestamp>
        <lastRenewalTimestamp>1528308446108</lastRenewalTimestamp>
        <evictionTimestamp>0</evictionTimestamp>
        <serviceUpTimestamp>1528307786859</serviceUpTimestamp>
      </leaseInfo>
      <metadata>
        <management.context-path>/manage</management.context-path>
        <management.port>8761</management.port>
        <configPath>/config</configPath>
      </metadata>
      <homePageUrl>http://localhost:8761/</homePageUrl>
      <statusPageUrl>http://localhost:8761/manage/info</statusPageUrl>
      <healthCheckUrl>http://localhost:8761/manage/health</healthCheckUrl>
      <vipAddress>arsiicloud-server</vipAddress>
      <secureVipAddress>arsiicloud-server</secureVipAddress>
      <isCoordinatingDiscoveryServer>true</isCoordinatingDiscoveryServer>
      <lastUpdatedTimestamp>1528307815989</lastUpdatedTimestamp>
      <lastDirtyTimestamp>1528307785964</lastDirtyTimestamp>
      <actionType>ADDED</actionType>
    </instance>
  </application>
  <application>
    <name>ARSIICLOUD-CLIENT</name>
    <instance>
      <instanceId>arsiicloud-client</instanceId>
      <hostName>localhost</hostName>
      <app>ARSIICLOUD-CLIENT</app>
      <ipAddr>10.34.2.105</ipAddr>
      <status>UP</status>
      <overriddenstatus>UNKNOWN</overriddenstatus>
      <port enabled="true">7777</port>
      <securePort enabled="false">443</securePort>
      <countryId>1</countryId>
      <dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo">
        <name>MyOwn</name>
      </dataCenterInfo>
      <leaseInfo>
        <renewalIntervalInSecs>10</renewalIntervalInSecs>
        <durationInSecs>90</durationInSecs>
        <registrationTimestamp>1528308331840</registrationTimestamp>
        <lastRenewalTimestamp>1528308441830</lastRenewalTimestamp>
        <evictionTimestamp>0</evictionTimestamp>
        <serviceUpTimestamp>1528308331840</serviceUpTimestamp>
      </leaseInfo>
      <metadata>
        <management.context-path>/manage</management.context-path>
        <management.port>7777</management.port>
      </metadata>
      <homePageUrl>http://localhost:7777/</homePageUrl>
      <statusPageUrl>http://localhost:7777/manage/info</statusPageUrl>
      <healthCheckUrl>http://localhost:7777/manage/health</healthCheckUrl>
      <vipAddress>arsiicloud-client</vipAddress>
      <secureVipAddress>arsiicloud-client</secureVipAddress>
      <isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer>
      <lastUpdatedTimestamp>1528308331840</lastUpdatedTimestamp>
      <lastDirtyTimestamp>1528308331813</lastDirtyTimestamp>
      <actionType>ADDED</actionType>
    </instance>
  </application>
  <application>
    <name>ARSIICLOUD-ADMIN</name>
    <instance>
      <instanceId>arsiicloud-admin</instanceId>
      <hostName>localhost</hostName>
      <app>ARSIICLOUD-ADMIN</app>
      <ipAddr>10.34.2.105</ipAddr>
      <status>UP</status>
      <overriddenstatus>UNKNOWN</overriddenstatus>
      <port enabled="true">8888</port>
      <securePort enabled="false">443</securePort>
      <countryId>1</countryId>
      <dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo">
        <name>MyOwn</name>
      </dataCenterInfo>
      <leaseInfo>
        <renewalIntervalInSecs>10</renewalIntervalInSecs>
        <durationInSecs>90</durationInSecs>
        <registrationTimestamp>1528308338880</registrationTimestamp>
        <lastRenewalTimestamp>1528308448999</lastRenewalTimestamp>
        <evictionTimestamp>0</evictionTimestamp>
        <serviceUpTimestamp>1528307793010</serviceUpTimestamp>
      </leaseInfo>
      <metadata>
        <management.context-path>/manage</management.context-path>
        <management.port>8888</management.port>
      </metadata>
      <homePageUrl>http://localhost:8888/</homePageUrl>
      <statusPageUrl>http://localhost:8888/manage/info</statusPageUrl>
      <healthCheckUrl>http://localhost:8888/manage/health</healthCheckUrl>
      <vipAddress>arsiicloud-admin</vipAddress>
      <secureVipAddress>arsiicloud-admin</secureVipAddress>
      <isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer>
      <lastUpdatedTimestamp>1528308338880</lastUpdatedTimestamp>
      <lastDirtyTimestamp>1528308338844</lastDirtyTimestamp>
      <actionType>ADDED</actionType>
    </instance>
  </application>
</applications>

问题是,当我检查 Spring Boot Admin 网页时,它显示为空:

激活 StatusUpdateTrigger 和 DiscoveryClient 的跟踪日志我可以看到 DiscoveryClient 正在成功检索应用程序信息,但由于某种原因它们没有反映在 Spring Boot Admin 中:

de.codecentric.boot.admin.server.services.StatusUpdateTrigger trace onNext(3) 
de.codecentric.boot.admin.server.services.StatusUpdateTrigger updateStatusForAllInstances Updating status for all instances 
de.codecentric.boot.admin.server.services.StatusUpdateTrigger trace request(1) 
com.netflix.discovery.DiscoveryClient renew DiscoveryClient_ARSIICLOUD-ADMIN/arsiicloud-admin - Heartbeat status: 200 
com.netflix.discovery.DiscoveryClient getAndUpdateDelta Got delta update with apps hashcode UP_3_ 
com.netflix.discovery.DiscoveryClient updateDelta Added instance arsiicloud-client to the existing apps in region null 
com.netflix.discovery.DiscoveryClient updateDelta Added instance arsiicloud-admin to the existing apps in region null 
com.netflix.discovery.DiscoveryClient updateDelta The total number of instances fetched by the delta processor : 2 
com.netflix.discovery.DiscoveryClient logTotalInstances The total number of all instances in the client now is 3 
com.netflix.discovery.DiscoveryClient refreshRegistry Completed cache refresh task for discovery. All Apps hash code is Local region apps hashcode: UP_3_, is fetching remote regions? false  
com.netflix.discovery.DiscoveryClient getAndUpdateDelta Got delta update with apps hashcode UP_3_ 
com.netflix.discovery.DiscoveryClient updateDelta Added instance arsiicloud-client to the existing apps in region null 
com.netflix.discovery.DiscoveryClient updateDelta Added instance arsiicloud-admin to the existing apps in region null 
com.netflix.discovery.DiscoveryClient updateDelta The total number of instances fetched by the delta processor : 2 
com.netflix.discovery.DiscoveryClient logTotalInstances The total number of all instances in the client now is 3 
com.netflix.discovery.DiscoveryClient refreshRegistry Completed cache refresh task for discovery. All Apps hash code is Local region apps hashcode: UP_3_, is fetching remote regions? false  

知道哪里出了问题吗?

谢谢!

约翰

【问题讨论】:

    标签: spring-boot-admin


    【解决方案1】:

    我遇到了同样的问题。我可以通过将管理服务器升级到 2.0.1-snapshot 来修复

    所以添加

    <dependency>
        <groupId>de.codecentric</groupId>
        <artifactId>spring-boot-admin-starter-server</artifactId>
        <version>2.0.1-SNAPSHOT</version>
    </dependency>
    

    然后还要添加快照仓库

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>
    

    【讨论】:

    • 谢谢,会检查的。我现在改变了客户端使用管理客户端向管理服务器发送信息的方式
    猜你喜欢
    • 1970-01-01
    • 2021-04-16
    • 2018-06-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-23
    • 1970-01-01
    • 2021-01-05
    相关资源
    最近更新 更多