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

Dec 2018
Dec 04 2018 03:59
i'm trying to configure my app to support both http and https port. As per advice on a stackoverflow discussion I used to autoconfigure ssl support and configured an embedded servlet container bean for http support. however, since i'm using eureka cloud registry and a LoadBalanced restTemplate on another service, it still routes me to an ssl connection which causes it to fail. Is there a way to tell the registry to use an http connection instead of the registered https connection?
Marcos Barbero
Dec 04 2018 07:55
@chad_d_stud_twitter if i'm not mistaken eureka has a property like this eureka.instance.nonSecurePortEnabled=true and this eureka.instance.securePortEnabled=false, you can play with them to make it work
Dec 04 2018 07:56
actually i found another solution.
took the hard road too
most of the discussions indicate to use "https" in the application properties and then expose an http port via manual configuration bean
i switched the two (http in the app properties) and https as a bean and everything is working at the moment
this reverted the service to use http in eureka
Dec 04 2018 08:01
so basically it's service01 (http)-> service adaptor (https) <-> external service
however... i'm trying out your suggestion just for kicks xD
Dec 04 2018 08:10
nope. didn't work. that's because the "server.port" property takes precedence
so with ssl enable = true the server.port is an ssl one.
Marcos Barbero
Dec 04 2018 08:58
I see, anyway I think you have some other properties to set to make it work, such as eureka.instance.securePort and eureka.instance.nonSecurePort
Siva Kumar
Dec 04 2018 10:09
Does anyone know if spring cloud consul perform all the actions of a consul agent in client mode?
Sourabh Sharma
Dec 04 2018 11:17

Thanks @OlgaMaciaszek for answering.

Hello @sharmasourabh Gateway operates based on 2 main pradigms - predicates - that allow you to filter out the requests to which you want to apply filters and then the filters themselves that allow you to tranform these requests before passing them on; so if you want to only handle requsts that match some conditions, you could use predicates to do that ( the descriptions of currently available predicates and filters are all in the docs: ); see if that suits your needs or provide a specific example for us to verify

Ahmad K. Bawaneh
Dec 04 2018 11:23
Hi, what could be the reason for a gateway to not handle preflight OPTIONS request, i can breakpoint the CORS filter when i hit the url in the browser but the when i do it with javascript the OPTION request is never hits the filter
Dec 04 2018 14:02
one qq.. does ZUUL takes comma separated list of URLs
Dec 04 2018 15:22
@spencergibb I have applied above solution..and I made change like below : listOfServers : https://hsd-services-rs-prod.com123,
I deliberately messed up hosts name in first url, what I noticed I get always get error for first request and second request success..why ribbon couldn't failover
I get this error
"error": "Internal Server Error",
I have configured these
ConnectTimeout: 60000
EnableZoneAffinity: false
MaxAutoRetries: 2
MaxAutoRetriesNextServer: 2
OkToRetryOnAllOperations: true
ReadTimeout: 180000
ServerListRefreshInterval: 1000
odd number always failing and even number get success.
Dec 04 2018 15:30
404 Not Found: Requested route ('glass-net') does not exist. I configure non -existing route and still no is not failing over
Dec 04 2018 15:46
ribbon :
listOfServers :,
retryableStatusCodes: 500,404
ReadTimeout : 1000000
ConnectTimeout : 1000
MaxAutoRetries : 3
MaxAutoRetriesNextServer : 3
OkToRetryOnAllOperations : true
above is my configuration for ribbon
Dec 04 2018 15:51
from above server list first URL is non existing..
ext['springCloudVersion'] = 'Greenwich.M3'
Dec 04 2018 15:56
Spring boot 2.1.1
Spencer Gibb
Dec 04 2018 16:39
@pradeepkusingh do you have spring-retry as a dependency?
Dec 04 2018 16:43
nope as direct
I thought it should be part of Cloud dependencies
let me try
Thank you @spencergibb you are magician
it worked
Dec 04 2018 19:32
Is there a tentative release schedule for Greenwich?