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

1st
Oct 2015
Marcin Grzejszczak
@marcingrzejszczak
Oct 01 2015 07:05

Hi Guys! With latest snapshot versions I can't build Spring Cloud Zookeeper. The exception is as follows:

[ERROR] /repo/spring-cloud-zookeeper-fork/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyFeignClientAutoConfiguration.java:[51,49] cannot find symbol
[ERROR] symbol:   class RibbonClient
[ERROR] location: class org.springframework.cloud.zookeeper.discovery.dependency.DependencyFeignClientAutoConfiguration
[ERROR] /repo/spring-cloud-zookeeper-fork/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyFeignClientAutoConfiguration.java:[45,36] cannot find symbol
[ERROR] symbol: class RibbonClient
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :spring-cloud-zookeeper-discovery

somebody removed dependency to Ribbon?

Dave Syer
@dsyer
Oct 01 2015 07:47
I guess
Feign doesn't depend on Ribbon any more
Is there some feign dependency in s-c-zk?
Yeah that needs to be fixed
Marcin Grzejszczak
@marcingrzejszczak
Oct 01 2015 07:54
I'll be able to fix that in about 9 hours ;) i have to go to work ;)
Dave Syer
@dsyer
Oct 01 2015 07:54
I'll have a quick look
Thanks for the heads up
Marcin Grzejszczak
@marcingrzejszczak
Oct 01 2015 07:55
Np
Dave Syer
@dsyer
Oct 01 2015 09:29
Build is broken (https://travis-ci.org/spring-cloud/spring-cloud-zookeeper/builds/83073327) but it seems to work for me locally
Marcin Grzejszczak
@marcingrzejszczak
Oct 01 2015 11:01
For me it fails locally
Dave Syer
@dsyer
Oct 01 2015 11:05
Trying again...
(I don't find these groovy tests very easy to work with)
(there's no console output that tells you what failed)
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.129 s
[INFO] Finished at: 2015-10-01T12:06:07+01:00
[INFO] Final Memory: 67M/401M
[INFO] ------------------------------------------------------------------------
Let me check I pushed all the changes
Dave Syer
@dsyer
Oct 01 2015 11:28
Green in travis now
I think maybe the netflix build wasn't complete when you tried earlier
So you pushed some changes or not?
Dave Syer
@dsyer
Oct 01 2015 11:56
Don't think so. But the builds run concurrently.
Maybe there was a race
Dave Syer
@dsyer
Oct 01 2015 12:03
Looks like the wrong parent declaration
The travis VM must have a cached copy for the main build, but not yours
I switched it
See 70a085
Marcin Grzejszczak
@marcingrzejszczak
Oct 01 2015 12:09
ok - retrying
anyways locally the tests are broken so I'll have to first fix it ;)
Ryan Baxter
@ryanjbaxter
Oct 01 2015 19:49
OK I feel like i have run into and asked this before but for the life of me I cannot figure this out
I have an app using zuul
and i have a hystrix dashboard in which i want to display the circut breakers for all the routes
the zuul app has the dependency on spring-boot-starter-actuator
and I can go to /hystrix.stream, it does exist
but when i try to display the stream in the dashboard I get Unable to connect to Command Metric Stream.
I have hit the zuul routes so they should be active and collecting metrics
i am probably missing something simple...
Spencer Gibb
@spencergibb
Oct 01 2015 19:52
and /hystrix.stream has data?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 19:53
well i am not sure….the endpoint at least responds back with something bc the browser prompts me to download something
how can i tell?
Spencer Gibb
@spencergibb
Oct 01 2015 19:54
when you hit /hystrix.stream in a browser it has more than ping
Ryan Baxter
@ryanjbaxter
Oct 01 2015 19:56
what do u mean by more than ping
Spencer Gibb
@spencergibb
Oct 01 2015 19:56
chrome will display the stream
Ryan Baxter
@ryanjbaxter
Oct 01 2015 19:56
something in the logs
ah good tip!
Spencer Gibb
@spencergibb
Oct 01 2015 19:56
no, the actual stream.
ping: 

data: {"type":"HystrixCommand","name":"service-location-serviceRibbonCommand","group":"RibbonCommand","currentTime":1443729380221,"isCircuitBreakerOpen":false,"errorPercentage":0,"errorCount":0,"requestCount":0,"rollingCountBadRequests":0,"rollingCountCollapsedRequests":0,"rollingCountEmit":0,"rollingCountExceptionsThrown":0,"rollingCountFailure":0,"rollingCountEmit":0,"rollingCountFallbackFailure":0,"rollingCountFallbackRejection":0,"rollingCountFallbackSuccess":0,"rollingCountResponsesFromCache":0,"rollingCountSemaphoreRejected":0,"rollingCountShortCircuited":0,"rollingCountSuccess":0,"rollingCountThreadPoolRejected":0,"rollingCountTimeout":0,"currentConcurrentExecutionCount":0,"rollingMaxConcurrentExecutionCount":0,"latencyExecute_mean":36,"latencyExecute":{"0":36,"25":36,"50":36,"75":36,"90":36,"95":36,"99":36,"99.5":36,"100":36},"latencyTotal_mean":36,"latencyTotal":{"0":36,"25":36,"50":36,"75":36,"90":36,"95":36,"99":36,"99.5":36,"100":36},"propertyValue_circuitBreakerRequestVolumeThreshold":20,"propertyValue_circuitBreakerSleepWindowInMilliseconds":5000,"propertyValue_circuitBreakerErrorThresholdPercentage":50,"propertyValue_circuitBreakerForceOpen":false,"propertyValue_circuitBreakerForceClosed":false,"propertyValue_circuitBreakerEnabled":true,"propertyValue_executionIsolationStrategy":"SEMAPHORE","propertyValue_executionIsolationThreadTimeoutInMilliseconds":60000,"propertyValue_executionTimeoutInMilliseconds":60000,"propertyValue_executionIsolationThreadInterruptOnTimeout":true,"propertyValue_executionIsolationThreadPoolKeyOverride":null,"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":100,"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"propertyValue_requestCacheEnabled":true,"propertyValue_requestLogEnabled":true,"reportingHosts":1,"threadPool":"RibbonCommand”}
Ryan Baxter
@ryanjbaxter
Oct 01 2015 19:57
yes it has more than ping
Spencer Gibb
@spencergibb
Oct 01 2015 19:57
ok
anthing in the javascript console?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 19:58
EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.
Spencer Gibb
@spencergibb
Oct 01 2015 19:58
I’ve seen that before
what version are you using?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 19:59
Angel.SR3
Spencer Gibb
@spencergibb
Oct 01 2015 20:00
somethings changing the content type
if you curl -v your /hystrix.stream what is the content-type?
curl -v https://fleet-monitor.cfapps.pez.pivotal.io/hystrix.stream
…
< HTTP/1.1 200 OK
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Content-Type: text/event-stream;charset=UTF-8
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:08
`
Content-Type: text/event-stream;charset=UTF-8
Spencer Gibb
@spencergibb
Oct 01 2015 20:08
ok, that’s correct, but when you do it through the browser, it has a different content-type.
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:09
seems like it
Spencer Gibb
@spencergibb
Oct 01 2015 20:10
what browser is it failing in?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:10
both chrome and FF
Spencer Gibb
@spencergibb
Oct 01 2015 20:10
where is everything running?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:11
on localhost
Spencer Gibb
@spencergibb
Oct 01 2015 20:15
no CF involved?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:15
nope
Spencer Gibb
@spencergibb
Oct 01 2015 20:20
I know I’ve seen the error before but can’t remember what caused it. netflix code sets the content-type. I don’t know why it’s changing.
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:21
its weird bc I see 2015-10-01 16:20:58.397 WARN 17949 --- [nio-8383-exec-8] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:8080/hystrix.stream : 404 : HTTP/1.1 404 Not Found
Spencer Gibb
@spencergibb
Oct 01 2015 20:21
This message was deleted
ok, that’s an better error
is http://localhost:8080/hystrix.stream correct?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:22
yes
Spencer Gibb
@spencergibb
Oct 01 2015 20:23
ok, replicated your error, but with an incorrect url. That’s where I saw it recently, I had a typo in my url
the dashboard is localhost as well?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:25
thing is if i curl that same url i get the stream
yes
Spencer Gibb
@spencergibb
Oct 01 2015 20:26
there is a proxy that actually does that connection. the browser just connects to the hystrix dashboard. As far as the proxy goes, it get’s a 404 which you’re browser displays as the error you see.
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:27
right
Spencer Gibb
@spencergibb
Oct 01 2015 20:27
can you past the url from the dashboard when you see the error?
Spencer Gibb
@spencergibb
Oct 01 2015 20:29
if I plug that in and change the ports it works here :-(
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:30
hum something strange is going on for sure
from the same hystrix dashboard it can get a stream hosted in CF
Spencer Gibb
@spencergibb
Oct 01 2015 20:30
You might need to debug in HystrixDashboardConfiguration.ProxyStreamServlet to see what’s going on.
that doesn’t surprise me
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:31
ok i will try and poke around some more tonight
thanks for the help
Spencer Gibb
@spencergibb
Oct 01 2015 20:32
np, does changing the host of the stream to 127.0.0.1 help?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:32
nope tried that :)
Spencer Gibb
@spencergibb
Oct 01 2015 20:32
of the stream, not the dashboard, right?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:33
right
Spencer Gibb
@spencergibb
Oct 01 2015 20:33
ok
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:35
hum if i use my computers hostname it work
works
but localhost wont work
Spencer Gibb
@spencergibb
Oct 01 2015 20:35
yeah, sounds like a problem with dns on your local network/machine
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:35
yeah seems like it
sorry for wasting your time
Spencer Gibb
@spencergibb
Oct 01 2015 20:36
what does localhost resolve to? ping -c 1 localhost
np
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:37
127.0.0.1
i have seen my vpn screw things up though as well
Spencer Gibb
@spencergibb
Oct 01 2015 20:37
ah
could be
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:37
so tonight i will try it without the vpn on
Spencer Gibb
@spencergibb
Oct 01 2015 20:38
java might be freaking out with the vpn
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:40
yeah i know it messes up my boot2docker dns settings as well so it could be doing the same thing here
one more question related to fallback methods
    @RequestMapping("/participants")
    @HystrixCommand(fallbackMethod = "defaultParticipants")
    public List<RaceWithParticipants> getRacesWithParticipants() {
        List<RaceWithParticipants> returnRaces = new ArrayList<RaceWithParticipants>();
        for(Race r : races) {
            returnRaces.add(new RaceWithParticipants(r, participantsClient.getParticipants(r.getId())));
        }
        return returnRaces;
    }

    public List<RaceWithParticipants> defaultParticipants() {
        return new ArrayList<RaceWithParticipants>();
    }
Spencer Gibb
@spencergibb
Oct 01 2015 20:43
ok
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:43
but I get java.lang.NoSuchMethodException: com.ryanjbaxter.spring.cloud.ocr.races.OcrRacesApplication$$EnhancerBySpringCGLIB$$43d0612a.defaultParticipants()
i double checked the spelling and that seems ok :)
so not sure why i am getting the exception
Dave Syer
@dsyer
Oct 01 2015 20:50
Did you ever use @HystrixCommand on a controller method before?
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:51
no just trying it now
Spencer Gibb
@spencergibb
Oct 01 2015 20:51
I think that has issues
Dave Syer
@dsyer
Oct 01 2015 20:51
Me too. But I can't remember why.
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:52
so if i create another method my controller calls and use the @HystrixCommand on that it should work?
Dave Syer
@dsyer
Oct 01 2015 20:53
I would go with a separate bean
Ryan Baxter
@ryanjbaxter
Oct 01 2015 20:57
alright I will see what I can do there
thanks!