0

I have a created a config server and enabled discovery client on it but my problem is on my eureka server GUI it is not showing under applications tab.

My code is:

@EnableEurekaServer
@SpringBootApplication
public class EurekaServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(EurekaServerApplication.class, args);
    }
}

Application.yml

server:
  port: 8761

eureka:
  instance:
    hostname: discovery
  client:
    registerWithEureka: false
    fetchRegistry: false
    serviceUrl:
      defaultZone: http://discovery:${server.port}/eureka/

spring.cloud.config.discovery.enabled: true

Config server as eureka client

@Configuration
@EnableAutoConfiguration
@EnableDiscoveryClient
@EnableConfigServer
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

Application.yml

server:
  port: 8888

eureka:
  instance:
    hostname: configserver
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://discovery:8761/eureka/

spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/kbastani/spring-boot-microservice-config

After running the Eureka server first and then config server every thing works fine and there is no exception but under Instance tab no application is listed please find the screen shot below:

expecting config server instance here

Can some one help me understand this ?

Filburt
  • 17,626
  • 12
  • 64
  • 115
T-Bag
  • 10,916
  • 3
  • 54
  • 118

0 Answers0