Spring Boot Admin 2.0.0 Eureka 1.9.2不显示任何应用程序

时间:2018-06-06 18:11:01

标签: spring-boot-admin

我在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网页时,它显示为空: Empty 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  

知道什么是错的?

谢谢!

约翰

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题。我能够通过将管理服务器升级到2.0.1快照来修复

所以添加

<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>