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

28th
Nov 2017
Ziemowit
@Ziemowit
Nov 28 2017 09:55

Hi guys! After upgrade our ZUUL to spring.boot = 1.5.6, spring.clooud = Edgware

we are getting

    at rx.observables.BlockingObservable.toFuture(BlockingObservable.java:411)
    at com.netflix.hystrix.HystrixCommand.queue(HystrixCommand.java:378)
    at com.netflix.hystrix.HystrixCommand.execute(HystrixCommand.java:344)
    at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:158)
    ... 71 common frames omitted
Caused by: java.lang.RuntimeException: org.apache.http.conn.UnsupportedSchemeException: https protocol is not supported
    at rx.exceptions.Exceptions.propagate(Exceptions.java:58)
    at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:464)
    at rx.observables.BlockingObservable.single(BlockingObservable.java:341)
    at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:112)
    ... 131 common frames omitted
Caused by: org.apache.http.conn.UnsupportedSchemeException: https protocol is not supported

when ZUUL tries to forward.

Interesting is https protocol is not supported
Anyone met before with that?
maskleo
@maskleo
Nov 28 2017 09:57
Have you configured https support?
Ziemowit
@Ziemowit
Nov 28 2017 09:58
Hmmmm probably not because I do not remember about sth like this... Is it spring-boot feature or zuul?
For sure I have
eureka:
  instance:
    nonSecurePortEnabled: false
    securePortEnabled: true
  client:
    serviceUrl:
      defaultZone: https://.../yawave-eureka/eureka/
Dave Syer
@dsyer
Nov 28 2017 10:00
spring-cloud/spring-cloud-netflix#2375
Jose Armesto
@fiunchinho
Nov 28 2017 11:20
I'm creating an autoconfig module that all our applications would use, and I'd like to disable spring cloud config since we don't use it. How can I set spring.cloud.config.enabled = false from my autoconfig?
Dave Syer
@dsyer
Nov 28 2017 11:25
Why wouldn't you just set a property in the environment?
You can use a variety of mechanisms for that
Jose Armesto
@fiunchinho
Nov 28 2017 11:26
I just don't want to set that property on all the apps
Dave Syer
@dsyer
Nov 28 2017 11:26
How will you choose which ones to set it for?
Jose Armesto
@fiunchinho
Nov 28 2017 11:26
we'd like to create a company wide set of configurations: you just add the autoconfig dependency and you are good to go
what do you mean?
Dave Syer
@dsyer
Nov 28 2017 11:27
I understand the goal. Not the detailed requirement.
You want people to be able to include s-c-config client, but then disable it?
So it won't actually work?
Doesn't make sense yet (to me).
Jose Armesto
@fiunchinho
Nov 28 2017 11:28
for this particular case, we have a dependency on a third part library that offers some features that involve spring cloud config, but we don't use those features (the third party library depends on spring cloud config, so it gets downloaded anyhow)
althought this is a specific case, I'd like to know how to do it for other properties as well, like management config, metrics, turn off banner and so on
Dave Syer
@dsyer
Nov 28 2017 11:29
I would use an EnvironmentPostProcessor
It seems like the wrong thing to do though to me in this specific case.
You shouldn't include s-c-config-client in the classpath if you don't want to use it.
that's a dependency management problem, not a spring configuration problem
IMO you are solving it at the wrong level
Jose Armesto
@fiunchinho
Nov 28 2017 11:32
how would you solve it ?
I'm checking: this is the third party dependency https://github.com/zalando/spring-cloud-config-aws-kms it seems it requires the s-c-config-client, but only to encrypt, and we use it only for decryption
Jose Armesto
@fiunchinho
Nov 28 2017 11:43
so if I would want to enable compressions in all our applications, you suggest using EnvironmentPostProcessor ? any documentation I can follow?
The decryption features are not in s-c-config anyway
So if I were you I'd stop using that library, or manage the dependencies for it.
Dave Syer
@dsyer
Nov 28 2017 11:54
I think they got their dependencies wrong. You could send a PR.
Jose Armesto
@fiunchinho
Nov 28 2017 11:55
if you tell me how to fix it, absolutely!
Dave Syer
@dsyer
Nov 28 2017 11:55
It shouldn't need to depend on s-c-config-client
s-c-context is adequate
All the features they seem to use (on first glance) are in s-c-context
IMO if this is a useful feature it should be in spring-cloud-aws. But that's another conversation.
Jose Armesto
@fiunchinho
Nov 28 2017 12:07
I just replaced s-c-confg-client with s-c-context and the tests pass, I'll open a PR to try to gather some feedback
thank you very much Dave
I'll try the EnvironmentPostProcessor for other values like eureka configuration, compression and so on
Qing Wang
@fevxie
Nov 28 2017 14:55
hi, how to access config-server container from another docker container to get the configuration properties? I config spring.cloud.cofnig.url = http://config-server:8888 , but it doesn’t revolve config-server as an address?
Guilherme Blanco
@guilhermeblanco
Nov 28 2017 15:02
Hi! I’d appreciate if anyone had any ideas for me. When using Eureka and Zuul, what are the strategies that you use to separate public (externally exposable) services from private ones (can only be called inside of network, but do not have external access (read as internet))?
Or at least… how could I filter the list of available services and/or restrict access based on metadataMap entries.
Spencer Gibb
@spencergibb
Nov 28 2017 16:07
@guilhermeblanco either a custom RouteLocator or static configuration
Guilherme Blanco
@guilhermeblanco
Nov 28 2017 16:14
@spencergibb I can’t see how static config would work, but RouteLocator is a valid option. I’ll explore this path. Thanks! =)
Spencer Gibb
@spencergibb
Nov 28 2017 16:14
Only list the services you want public
Guilherme Blanco
@guilhermeblanco
Nov 28 2017 16:15
@spencergibb I’m assuming that also rely on Feign+Ribbon on cross-service communication. Is that correct?
Spencer Gibb
@spencergibb
Nov 28 2017 16:16
Unsure what you mean. Zuul uses ribbon.
Guilherme Blanco
@guilhermeblanco
Nov 28 2017 16:17
If you turn off Ribbon+Eureka on Zuul and only expose public routes (static configuration), then the services would have their communication through Ribbon+Eureka (through service discovery), not reaching Zuul.
Is that line of thinking correct?
Spencer Gibb
@spencergibb
Nov 28 2017 16:20
static configuration doesn't turn off ribbon and eureka
Guilherme Blanco
@guilhermeblanco
Nov 28 2017 16:23
@spencergibb I know… I meant the fetching of Eureka through Ribbon (config: ribbon.eureka.enabled). I was just trying to be concise… =)