javaspring-cloudconsulhystrixturbine

Spring consul turbine error - Could not initiate connection to host, giving up: []


I want to read services registered at consul from my turbine application. I have configured turbine for that as :

Bootstrap.yml

 server:
 port: 8050

spring:
 cloud:
  consul:
   discovery:
  prefer-ip-address: true
 host: *****hostName where consul reside****
 port: 8500

turbine:
 aggregator:
   clusterConfig: dm-geo
 appConfig: dm-geo

Have dependencies -

 <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
 </dependency>

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-netflix-turbine</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-consul-discovery</artifactId>
</dependency>

on main application class -

  @EnableTurbine
  @EnableHystrixDashboard
  @EnableDiscoveryClient

These all configuration are done on turbine application.

Now each service which is registered on consul , has dependencies -

    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-hystrix</artifactId>
    </dependency>

    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-consul-discovery</artifactId>
   </dependency>

and @EnableHystrix @EnableDiscoveryClient on application class with HystrixCommand at our rest calling method to other services with proper fallback logic.

application.properties:-

  spring.application.name=dm-geo

Now our python script with required configuration discover these service and register on consul. When I try to get each hystrix.stream , I am able to get hystrix dashboard for that.

but from my turbine application , error is logged as

"timestamp":"2016-07-27T17:33:14.406+05:30","message":"Could not initiate connection to host, giving up,"logger_name":"com netflix turbine monitor instance InstanceMonitor","thread_name":"InstanceMonitor"

can somebody help in this regard???


Solution

  • It is resolved now as for our application turbine. Basically the stream was authenticated via URL so I have to skip this which then worked perfectly to show the turbine stream and dashboard. For example:

    security.ignored = /turbine.stream
    

    in spring boot application.