Netflix / Turbine

SSE Stream Aggregator
Apache License 2.0
835 stars 255 forks source link

Turbine error "Enable to connect command matrix stream" #110

Closed RakeshAMore closed 8 years ago

RakeshAMore commented 8 years ago

I am not sure this is right place to ask this question but i tried it on stackoverflow but no body is answering. Please assist me in below issue.

I am configuring hystrix turbine dashbord using ConfigPropertyBasedDiscovery . When I hit normal stream URL, it works fine http://localhost:8080/turbine.stream?cluster=EXAMPLE

screen shot 2016-06-07 at 4 21 54 pm

But when I try to load this cluster stream in dashbord it show below error "unable to connect command matrix" on browser and on console "EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.". Please have look on screen shot.

screen shot 2016-06-06 at 5 09 37 pm

Below is my config.properties

turbine.aggregator.clusterConfig=EXAMPLE,EXAMPLE1
turbine.instanceUrlSuffix=:9080/hystrix.stream

turbine.ConfigPropertyBasedDiscovery.EXAMPLE.instances=localhost
turbine.ConfigPropertyBasedDiscovery.EXAMPLE1.instances=139.126.244.170

InstanceDiscovery.impl=com.netflix.turbine.discovery.ConfigPropertyBasedDiscovery

My Application.java @EnableHystrixDashboard public class Application extends SpringBootApplication { private static Class applicationClass = Application.class; public static void main(String[] args) { SpringApplication.run(applicationClass, args); TurbineInit.init(); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { super.configure(application); return application.sources(applicationClass); } }

And servlet registration for "/turbine.stream"

    @Configuration
    public class ServletRegistrationConfig {
        @Bean
        public ServletRegistrationBean registerTurbineBean(){
            return  new ServletRegistrationBean(new TurbineStreamServlet(), "/turbine.stream");
        }
    }

Please assist me in this. And let me know if I missed out in configuration.

RakeshAMore commented 8 years ago

I am able to configure other things but now I have only below issue.

{"timestamp":"2016-06-13T15:51:02.199+05:30","message":"Mapping servlet: 'proxyStreamServlet' to [/proxy.stream]","logger_name":"org.springframework.boot.context.embedded.ServletRegistrationBean","thread_name":"localhost-startStop-1","level":"INFO","HOSTNAME":"myhostName"} {"timestamp":"2016-06-13T15:51:10.088+05:30","message":"Rejected bean name 'proxyStreamServlet': no URL paths identified","logger_name":"org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping","thread_name":"main","level":"DEBUG","HOSTNAME":"myhostName"}

/proxy.stream is not working, it showing error "Rejected bean name 'proxyStreamServlet".

Please assist me in this.

I need to resolved it ASAP. Any help will be appreciated.

spencergibb commented 8 years ago

@Masterking that error is a spring error, not netflix.

RakeshAMore commented 8 years ago

Yes, you are right :) Actually my problem is "/proxy.stream" is not working for me. It simply loads blank page and there is not content type set for it when I look in to network tab.

RakeshAMore commented 8 years ago

Issue resolved. Thanks for you help!!!!

billybong commented 8 years ago

@RakeshAMore could you elaborate on the solution to your problem? I'm facing the same issue with Hystrix 1.5.5.

RakeshAMore commented 8 years ago

In my case it was because I had Filter which was holding response to operations before committing it, hence I just skip proxy.stream from it. In addition you may also check is there any authentication in your service.

billybong commented 8 years ago

Thanks @RakeshAMore. In my case it was due to blacklisting apache httpclient default useragent. The problem was in the proxyservlet that Spring intercepts calls against hystrix.stream with.

ghost commented 6 years ago

@billybong @RakeshAMore - Could you please guide me on https://stackoverflow.com/questions/52137023/unable-to-connect-to-command-metric-stream-in-spring-cloud-hystrix-turbine