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

4th
May 2018
Yogendra Mishra
@imyom25
May 04 2018 04:31
Hi All, What is difference between RefreshScopeRefreshedEvent and EnvironmentChangeEvent. My understanding for EnvironmentChangeEvent is that it triggers when we change anything on ConfigService. it manages to update RefreshScope. But I am not aware what is the use of RefreshScopeRefreshedEvent??
vikrantch-hk
@vikrantch-hk
May 04 2018 06:48
team can we put both EnableEurekaServer and EnableZuulProxy on one class, till now whatever examples I have seen were having different applications for eurekaserver and zuulproxy can we make eureka server itself a zuul proxy
vikrantch-hk
@vikrantch-hk
May 04 2018 07:12
it works
Jon McEwen
@jonmcewen
May 04 2018 09:20

Hi all. I added Spring Cloud Config client to my app via spring-cloud-starter-config. I'm seeing the following log output twice during startup:

2018-05-04 09:16:31.450  INFO 4241 --- [  XNIO-2 task-2] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://192.168.33.11:8888
2018-05-04 09:16:31.645  INFO 4241 --- [  XNIO-2 task-2] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=neworderprocessor, profiles=[devvm], label=master, version=null, state=null

once at the beginning, where I would expect, but again at the end of start-up. Is this normal?

It's working OK though :-)
Andrew Fitzgerald
@fitzoh
May 04 2018 10:25
This message was deleted
CH4:D
@chad_d_stud_twitter
May 04 2018 11:49
Can you test the spring cloud /config endpoint using curl or postman?
bakomchik
@bakomchik
May 04 2018 14:55

Hi folks, I use zuul gateway
and I'm facing a problem

Approximately in 10 percent of cases Zuul responds with a status of 500 and with an empty body
I investigated this and found that the cause of the problem is

o.a.h.NoHttpResponseException: <Host>:<port> failed to respond
    at o.a.h.i.c.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:141)
    at o.a.h.i.c.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
    at o.a.h.i.i.AbstractMessageParser.parse(AbstractMessageParser.java:259)
    at o.a.h.i.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
    at o.a.h.i.c.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165)
    at o.a.h.p.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
    at o.a.h.p.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
    at o.a.h.i.e.MainClientExec.execute(MainClientExec.java:272)
    at o.a.h.i.e.ProtocolExec.execute(ProtocolExec.java:185)
    at o.a.h.i.e.RetryExec.execute(RetryExec.java:89)
    at o.a.h.i.e.RedirectExec.execute(RedirectExec.java:111)
    at o.a.h.i.c.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    at o.a.h.i.c.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at o.a.h.i.c.CloseableHttpClient.execute(CloseableHttpClient.java:108)
    at o.a.h.i.c.CloseableHttpClient.execute(CloseableHttpClient.java:56)
    ... 7 frames excluded
    at c.n.c.AbstractLoadBalancerAwareClient$1.call(AbstractLoadBalancerAwareClient.java:109)
    at c.n.l.r.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:303)
    at c.n.l.r.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:287)
    at r.i.u.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:239)
    at r.i.u.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:236)
    ... 3 frames excluded
    at c.n.l.r.LoadBalancerCommand$1.call(LoadBalancerCommand.java:185)
    at c.n.l.r.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180)
    ... 9 frames excluded
    at r.o.BlockingObservable.blockForSingle(BlockingObservable.java:440)
    ... 166 common frames omitted
Wrapped by: j.l.RuntimeException: org.apache.http.NoHttpResponseException: <Host>:<port> failed to respond
    at r.o.BlockingObservable.blockForSingle(BlockingObservable.java:463)
    at r.o.Blocking...

I found some issues in apache http client
for example : https://issues.apache.org/jira/browse/HTTPCLIENT-1610
it seems to be fixed, but commentors have problems after fixing
Has anyone else had a problem of this kind?

Spencer Gibb
@spencergibb
May 04 2018 15:18
@imyom25 different events for different things. If you post to /actuator/refresh you will get a refresh event. If there was an environment change, you would get the other.
@vikrantch-hk I wouldn't combine zuul and eureka server especially if zuul lives on the edge of your infrastructure. Eureka shouldn't be public