Spring-cloud-config: /bus/refresh causes instances registered in Eureka Server disappeared

Created on 9 May 2017  路  11Comments  路  Source: spring-cloud/spring-cloud-config

Hi, everyone.
I deploy an Eureka Server, a Config Server and RabbitMQ Server on localhost.
The Config Server work on port 8888. It will register in Eureka Server, and will connect to Spring Cloud Bus.
Now I send a POST request to http://localhost:8888/bus/refresh.
Then refresh http://localhost:8761.
The table of "Instances currently registered with Eureka" display "No instances available".
That's why?
May somebody help me?
Thank you!
Attachments are java, yml and pom files with suffix modified.

EurekaServiceApplication.java.txt
EurekaService.yml.txt
pom.xml.EurekaService.txt
ConfigServiceApplication.java.txt
ConfigService.yml.txt
pom.xml.ConfigService.txt

Most helpful comment

Thanks for all, Help me with this problem銆侷 solved the problem with the latest Spring Cloud package

<dependency>  
           <groupId>org.springframework.cloud</groupId>
           <artifactId>spring-cloud-dependencies</artifactId>
           <version>Dalston.SR1</version>
           <type>pom</type>
           <scope>import</scope>
</dependency>

All 11 comments

Sounds similar to spring-cloud/spring-cloud-netflix#1857. Can you try Dalston.BUILD-SNAPSHOT to confirm?

I concur

Thank you! I will try Dalston.BUILD-SNAPSHOT!

I import the Dalston.BUILD-SNAPSHOT like this:

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

<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/release</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

But came out errors:
[ERROR] Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Dalston.BUILD-SNAPSHOT in http://10.100.31.71:8080/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of mirror1 has elapsed or updates are forced @ line 46, column 16
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-eureka-server:jar is missing. @ line 28, column 15

Please tell me how to try Dalston.BUILD-SNAPSHOT, thanks!

You should just need this repository

<repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/libs-snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>

From the log it doesn't look like maven is looking in the right repo though Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Dalston.BUILD-SNAPSHOT in http://10.100.31.71:8080/nexus/content/groups/public/

Hi, RyanjBaxter:
I follow your advice: just use the snapshot repository, but still has the same problem:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Dalston.BUILD-SNAPSHOT in http://10.100.31.71:8080/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of mirror1 has elapsed or updates are forced @ line 52, column 16
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-eureka-server:jar is missing. @ line 34, column 15

Like I said it looks like your app is not looking in the right repo, where is http://10.100.31.71:8080/nexus/content/groups/public/ configured in your maven environment? I think it is a problem with your local environment.

Thanks for all, Help me with this problem銆侷 solved the problem with the latest Spring Cloud package

<dependency>  
           <groupId>org.springframework.cloud</groupId>
           <artifactId>spring-cloud-dependencies</artifactId>
           <version>Dalston.SR1</version>
           <type>pom</type>
           <scope>import</scope>
</dependency>

well done.

Thanks for all

me too

Was this page helpful?
0 / 5 - 0 ratings