Search code examples
spring-bootspring-cloudhystrixturbinespring-cloud-netflix

hystrix.stream, management.port and Spring Cloud Turbine


My microservice with @EnableTurbine config:

turbine:
  clusterNameExpression: new String('default')
  appConfig: bestallning

bestallning is a @SpringCloudApplication, hystrix.stream is enabled. It registers in eureka and turbine app can find it. But it has management.port set to 8092 and server.port 8082. hystrix.stream binds to management.port

Turbine now tries to fetch hystrix.stream from server.port of bestallning, not management.port that hystrix.stream is bound to.

   Fetching instance list for apps: [bestallning]
   Fetching instances for app: bestallning
   Received instance list for app: bestallning, size=1
   Retrieved hosts from InstanceDiscovery: 1
   Found hosts that have been previously terminated: 0
   Hosts up:1, hosts down: 0
   Url for host: http://143.237.21.196:8082/hystrix.stream default
   Could not initiate connection to host, giving up: [{"timestamp":1460035761979,"status":404,"error":"Not Found","message":"No message available","path":"/hystrix.stream"}]
   Stopping InstanceMonitor for: 143.237.21.196 default

Is it possible to have turbine look for hystrix.stream using the correct port?


Solution

  • I think you'd have to write your own InstanceDiscovery (and create a @Bean of that type). Might be a useful feature in the existing implementations though, so please open an issue in Spring Cloud Netflix.