Hello
I'm following the reference guide to setup the admin server with eureka, my server app class looks like this :
@EnableAdminServer
@EnableEurekaServer
@SpringBootApplication
@EnableDiscoveryClient
public class EurekaServer {
public static void main(String[] args) {
SpringApplication.run(EurekaServer.class,args);
}
}
with config :
server:
port: 8761
eureka:
instance:
hostname: localhost
client:
registerWithEureka: false
fetchRegistry: false
spring:
boot:
admin:
context-path: /admin
dependencies {
compile('org.springframework.cloud:spring-cloud-starter-eureka-server')
compile('org.springframework.cloud:spring-cloud-starter-eureka')
compile('de.codecentric:spring-boot-admin-server:1.3.2')
compile('de.codecentric:spring-boot-admin-server-ui:1.3.2')
}
The client is simple config server :
@SpringBootApplication
@EnableConfigServer
@EnableEurekaClient
public class ConfigServer {
public static void main(String[] args) {
SpringApplication.run(ConfigServer.class, args);
}
}
with config :
spring:
application:
name: config-server
eureka:
instance:
nonSecurePort: ${server.port:8888}
client:
serviceUrl:
defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/
dependencies {
compile('org.springframework.cloud:spring-cloud-config-server')
compile('org.springframework.cloud:spring-cloud-starter-eureka')
}
The problem is that I don't see any applications at http://localhost:8761/admin, but http://localhost:8761 shows me the registered config-server.
There are no any errors in both log files, what am I doing wrong ?
Thanks
The Spring Boot Admin Server you are including is a DiscoveryClient to itself so you have to set fetchRegistry: true.
And then just wait... it took 1,5 minutes with the default config until the config-app showed up in my test...
Most helpful comment
The Spring Boot Admin Server you are including is a DiscoveryClient to itself so you have to set
fetchRegistry: true.And then just wait... it took 1,5 minutes with the default config until the config-app showed up in my test...