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

4th
Dec 2018
CH4:D
@chad_d_stud_twitter
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 application.properties 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
@marcosbarbero
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
CH4:D
@chad_d_stud_twitter
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
CH4:D
@chad_d_stud_twitter
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
CH4:D
@chad_d_stud_twitter
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
@marcosbarbero
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
@shivsan
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
@sharmasourabh
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: https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.1.0.M3/single/spring-cloud-gateway.html#gateway-request-predicates-factories ); see if that suits your needs or provide a specific example for us to verify

Ahmad K. Bawaneh
@vegegoku
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
pradeepkusingh
@pradeepkusingh
Dec 04 2018 14:02
one qq.. does ZUUL takes comma separated list of URLs ..like
zuul.routes.MS1.url=http://server:8080/MS1
@spencergibb
pradeepkusingh
@pradeepkusingh
Dec 04 2018 15:22
@spencergibb I have applied above solution..and I made change like below : listOfServers : https://hsd-services-rs-prod.com123, https://hsd-services-rs-prod.com
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
ribbon:
ConnectTimeout: 60000
EnableZoneAffinity: false
MaxAutoRetries: 2
MaxAutoRetriesNextServer: 2
OkToRetryOnAllOperations: true
ReadTimeout: 180000
ServerListRefreshInterval: 1000
odd number always failing and even number get success.
pradeepkusingh
@pradeepkusingh
Dec 04 2018 15:30
404 Not Found: Requested route ('glass-net') does not exist. I configure non -existing route and still no luck..it is not failing over
pradeepkusingh
@pradeepkusingh
Dec 04 2018 15:46
HSD-SERVICE :
ribbon :
listOfServers : https://hsd-services-rs-prod2.net, https://hsd-services-rs-prod1..net
retryableStatusCodes: 500,404
ReadTimeout : 1000000
ConnectTimeout : 1000
MaxAutoRetries : 3
MaxAutoRetriesNextServer : 3
OkToRetryOnAllOperations : true
above is my configuration for ribbon
pradeepkusingh
@pradeepkusingh
Dec 04 2018 15:51
from above server list first URL is non existing..
ext['springCloudVersion'] = 'Greenwich.M3'
pradeepkusingh
@pradeepkusingh
Dec 04 2018 15:56
Spring boot 2.1.1
Spencer Gibb
@spencergibb
Dec 04 2018 16:39
@pradeepkusingh do you have spring-retry as a dependency?
pradeepkusingh
@pradeepkusingh
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
Dave
@dave-fl
Dec 04 2018 19:32
Is there a tentative release schedule for Greenwich?