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

8th
Nov 2017
tankdeper
@tankdeper
Nov 08 2017 09:17
does anyone try to create double nodes of eureka server using spring.profile.active?
Dave Syer
@dsyer
Nov 08 2017 09:42
I have done that
Why?
tankdeper
@tankdeper
Nov 08 2017 09:44
well, I wonder eureka.client.register-with-eureka=false eureka.client.fetch-registry=falsethese configs should claimed as false?
Dave Syer
@dsyer
Nov 08 2017 10:01
Then they won't be replicas of each other
(IIRC)
tankdeper
@tankdeper
Nov 08 2017 10:07
So set true by default , then they will be replicas of each other, right?
for status info sync
@dsyer
Dave Syer
@dsyer
Nov 08 2017 10:29
yes
lchayoun
@lchayoun
Nov 08 2017 11:42
Hi, I'm using zuul, seeing behaviour where errors from services are masked with ZuulException and a 500 response code is returned instead. How can I return the original error to the client
?
Andre Dörnbrack
@doernbrackandre
Nov 08 2017 12:03
@lchayoun AFAIK responses zuul with a 500 in case of any kind of hystrix exceptions or socket exceptions. which errors codes do you expect to be forwarded?
lchayoun
@lchayoun
Nov 08 2017 12:09
@doernbrackandre When a service returns 503, I retry on it. if all instances fail I want to return 503 and not 500. Also I want to return the original error response and not the generic ZuulException payload
Andre Dörnbrack
@doernbrackandre
Nov 08 2017 12:16
@lchayoun what kind of request is it? GET? POST?
lchayoun
@lchayoun
Nov 08 2017 12:23
GET
Andre Dörnbrack
@doernbrackandre
Nov 08 2017 12:41
@lchayoun hmmm, you're right... same here
Andre Dörnbrack
@doernbrackandre
Nov 08 2017 12:52
@lchayoun There is the SendErrorFilter where the ZuulException is constructed. From the looks of it the only way is to implement an ErrorController and try to analyse the ZuulException's errorCause.
the is a RetryableStatusCodeException inside the cause stack trace but the original resonse payload seems to be lost
i have no idea :(
Roi Ezra
@ezraroi
Nov 08 2017 12:54
yes, looks like a fix that should be in the retry of spring
Andre Dörnbrack
@doernbrackandre
Nov 08 2017 12:58
@lchayoun have you seen this: spring-cloud/spring-cloud-netflix#2353
maybe it helps
Roi Ezra
@ezraroi
Nov 08 2017 13:07
looks like until the RetryableLoadBalancingHttpClient will pass the exception.. no FallbackProvider will help
Yogendra Mishra
@imyom25
Nov 08 2017 20:42
but now other request which were passing object in feign client are creating issue
as those request are also getting encoded by this encoder (what i guess so)
and its giving org.springframework.web.client.HttpClientErrorException: 400
does feign has any other encoder for object or any other suggestions? Thanks
Dave Syer
@dsyer
Nov 08 2017 21:22
You can configure each client (service) individually. Maybe that would help?