These are chat archives for spring-cloud/spring-cloud

5th
Oct 2015
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:31
looking for some help with turbine
I have defined a cluster with 2 services in it
when i enter the turbine url for the cluster turbine goes off an looks like it polls eureka for the right services
but i am not seeing anything in the dashboard
and i am also seeing a broken pipe exception from turbine
Spencer Gibb
@spencergibb
Oct 05 2015 20:33
sounds like they go together
maybe
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:34
015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Fetching instance list for apps: [web, races]
2015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Fetching instances for app: web
2015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Received instance list for app: web, size=1
2015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Fetching instances for app: races
2015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Received instance list for app: races, size=1
2015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] c.n.t.discovery.InstanceObservable       : Retrieved hosts from InstanceDiscovery: 0
2015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] c.n.t.discovery.InstanceObservable       : Found hosts that have been previously terminated: 0
2015-10-05 16:31:35.155  INFO 27960 --- [        Timer-0] c.n.t.discovery.InstanceObservable       : Hosts up:0, hosts down: 0
2015-10-05 16:32:35.157  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Fetching instance list for apps: [web, races]
2015-10-05 16:32:35.157  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Fetching instances for app: web
2015-10-05 16:32:35.158  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Received instance list for app: web, size=1
2015-10-05 16:32:35.158  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Fetching instances for app: races
2015-10-05 16:32:35.158  INFO 27960 --- [        Timer-0] o.s.c.n.turbine.EurekaInstanceDiscovery  : Received instance list for app: races, size=1
2015-10-05 16:32:35.158  INFO 27960 --- [        Timer-0] c.n.t.discovery.InstanceObservable       : Retrieved hosts from InstanceDiscovery: 0
2015-10-05 16:32:35.158  INFO 27960 --- [        Timer-0] c.n.t.discovery.InstanceObservable       : Found hosts that have been previously terminated: 0
2015-10-05 16:32:35.158  INFO 27960 --- [        Timer-0] c.n.t.discovery.InstanceObservable       : Hosts up:0, hosts down: 0
if i then refresh the page

i get
```
2015-10-05 16:32:42.607 ERROR 27960 --- [nio-8383-exec-2] c.n.t.s.TurbineStreamingConnection : Got exception when writing to response stream

org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:342)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:317)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:510)
at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:318)
at com.netflix.turbine.streaming.servlet.SynchronizedHttpServletResponse.flushBuffer(SynchronizedHttpServletResponse.java:79)
at com.netflix.turbine.streaming.servlet.TurbineStreamServlet$ServletStreamHandler.noData(TurbineStreamServlet.java:226)
at com.netflix.turbine.streaming.TurbineStreamingConnection.waitOnConnection(TurbineStreamingConnection.java:214)
at com.netflix.turbine.streaming.servlet.TurbineStreamServlet.streamFromCluster(TurbineStreamServlet.java:136)
at com.netflix.turbine.streaming.servlet.TurbineStreamServlet.doGet(TurbineStreamServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1526)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1482)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Socket

although i wonder if the broken pipe is just from me refreshing the page….
Spencer Gibb
@spencergibb
Oct 05 2015 20:35
yeah
what is your turbine config?
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:36
turbine:
  appConfig: web,races
  aggregator:
    clusterConfig: hystrix
  clusterNameExpression: metadata['cluster']
Spencer Gibb
@spencergibb
Oct 05 2015 20:36
where did you get clusterNameExpression: metadata['cluster’]?
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:37
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
  instance:
    metadatMap:
      cluster: hystrix
for example that is my service config
Spencer Gibb
@spencergibb
Oct 05 2015 20:37
and why did you do that?
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:38
i am getting the feeling i am doing something wrong ;)
bc that seemed like the only option based on the documentation :)
Spencer Gibb
@spencergibb
Oct 05 2015 20:38
Ok, this is what I would do:
turbine:
  aggregator:
    clusterConfig: WEB,RACES
  appConfig: web,races
it needs to be cleared up. I get more questions about this config than anything else. Those are advanced options.
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:39
what is the cluster name then? is it web,races?
Spencer Gibb
@spencergibb
Oct 05 2015 20:39
no need for instance, metadatMap, cluster: hystrix
those are lists
WEB or RACES
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:40
i think i tried this last week but it didnt work
i will give it a shot again
Spencer Gibb
@spencergibb
Oct 05 2015 20:41
and you can only view ONE cluster at a time
the clustername and appConfig have to match
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:41
oh i thought the point of turbine was to aggregate the streams together and show a single dashboard
Spencer Gibb
@spencergibb
Oct 05 2015 20:42
that’s not how turbine is built
your config MIGHT work if the app config was HYSTRIX not web,races
but spring-cloud-netflix-turbine won’t find that in eureka
turbine-amqp combines everything
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:43
so this is misleading then "Looking at an individual instances Hystrix data is not very useful in terms of the overall health of the system. Turbine is an application that aggregates all of the relevant /hystrix.stream endpoints into a combined /turbine.stream for use in the Hystrix Dashboard. "
this made me think i could just use plain turbine and get this aggregated dashboard
Spencer Gibb
@spencergibb
Oct 05 2015 20:44
instances of a single TYPE of service. So all instances of the user service.
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:44
ok i see
makes more sense now :)
Spencer Gibb
@spencergibb
Oct 05 2015 20:44
yeah, it’s not really clear in our docs or netflix's
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:46
so what is the need for doing something like this then
turbine:
  aggregator:
    clusterConfig: SYSTEM,USER
  appConfig: customers,stores,ui,admin
  clusterNameExpression: metadata['cluster’]
Spencer Gibb
@spencergibb
Oct 05 2015 20:47
clusterNameExpression isn’t needed
clusterConfig has to match appConfig. It tells turbine about the different clusters it can access.
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:48
bc you could just do clusterConfig:CUSTOMER,STORES,UI,ADMIN?
Spencer Gibb
@spencergibb
Oct 05 2015 20:48
no
well, I haven’t used clusterNameExpression before and tried what you are suggesting.
the examples I see from netflix are for prod, test, dev of service x
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:50
i just dont understand the usecase for clusternameexpression
Spencer Gibb
@spencergibb
Oct 05 2015 20:50
I don’t either
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:50
ok :)
at least it is not just me then
Spencer Gibb
@spencergibb
Oct 05 2015 20:50
Actually I do.
Netflix uses ASGNAME as the cluster name.
asgName might not match as simply as in spring-cloud-netflix, so the mapping is more important.
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:52
ok
Spencer Gibb
@spencergibb
Oct 05 2015 20:52
We use appName which ends up being uppercase service id from eureka
Ryan Baxter
@ryanjbaxter
Oct 05 2015 20:53
just a little misleading in the documentation i guess, but it was more about how i was interpreting instace in the documentation
Spencer Gibb
@spencergibb
Oct 05 2015 20:54
I agree
Ryan Baxter
@ryanjbaxter
Oct 05 2015 21:00
Spencer Gibb
@spencergibb
Oct 05 2015 21:01
RACES
Ryan Baxter
@ryanjbaxter
Oct 05 2015 21:03
ok that works
Spencer Gibb
@spencergibb
Oct 05 2015 21:03
that param has to match something in clusterConfig
Ryan Baxter
@ryanjbaxter
Oct 05 2015 21:05
yeah makes sense
cool
thanks!
Spencer Gibb
@spencergibb
Oct 05 2015 21:05
glad you’re working
Ryan Baxter
@ryanjbaxter
Oct 05 2015 21:05
talk to u soon!
Spencer Gibb
@spencergibb
Oct 05 2015 21:05
yup
Ryan Baxter
@ryanjbaxter
Oct 05 2015 21:05
are u done with your worldwin tour in the RV?
Spencer Gibb
@spencergibb
Oct 05 2015 21:06
yeah, we got home in july
Ryan Baxter
@ryanjbaxter
Oct 05 2015 21:06
nice
glad you did it?
Spencer Gibb
@spencergibb
Oct 05 2015 21:06
absolutely. Our kids will never forget it. Though it’s nice to have a desk and large monitors again.
Ryan Baxter
@ryanjbaxter
Oct 05 2015 21:07
sounds like an awesome time, would love to do that with my daughter when she is older
speaking of my daughter, she just got home, thanks again talk to u later
Spencer Gibb
@spencergibb
Oct 05 2015 21:07
bye
Guillaume Larose
@theonlyguills
Oct 05 2015 23:39
Hey! What would be the current best practice for unit testing apps that rely on cloud stream rabbit? Is there an easy way to disable all the cloud stream autoconfig, rabbit autoconfig, etc and mock the Sources/Sinks?
Spencer Gibb
@spencergibb
Oct 05 2015 23:44
Not many spring-cloud-stream devs here I don’t think. /cc @mbogoevici @markfisher @ilayaperumalg
@theonlyguills https://github.com/spring-cloud/spring-cloud-stream/issues is probably the most sure way for them to see something right now.
Guillaume Larose
@theonlyguills
Oct 05 2015 23:50
ok I'll try that thanks :)