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

11th
Dec 2017
Ruoyi Wu
@wry13172
Dec 11 2017 01:15
hi everyone,what is the problem:spring cloud's server died,the error log show:WARN c.n.d.s.t.d.RetryableEurekaHttpClient - Request execution failure
09:04:16.236 [DiscoveryClient-CacheRefreshExecutor-0] ERROR c.n.d.s.t.d.RedirectingEurekaHttpClient - Request execution error
com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out
does anyone here have this problem?
Ruoyi Wu
@wry13172
Dec 11 2017 02:17
it's OK after restarted Eureka
fvlad
@fvlad
Dec 11 2017 15:22
Hi guys. I’m trying to configure /pause endpoint to deregister my application in Eureka. As I understand, when I call /pause it should simply call stop for all the beans that implement Lifecycle interface. But in my case it looks like it does nothing, even though I have Lifecycle beans in the context (EurekaAutoServiceRegistration for example).
After some debugging I found that DefaultLifecycleProcessor#getLifecycleBeans returns an empty map of beans since it looks for them in some child beanFactory.getBeanNamesForType(Lifecycle.class, ..) while the actual beans are located in this beanFactory’s parent. Am I missing some configuration?
I’m using Spring Boot 1.5.9.RELEASE and Spring Cloud Edgware.RELEASE.
Dave Syer
@dsyer
Dec 11 2017 15:30
Why is it in the parent?
Are you using spring.cloud.config.discovery.enabled=true?
fvlad
@fvlad
Dec 11 2017 15:32
Not sure, I just see there is a hierarchy with the current beanFactory having 21 items in beanDefinitionNames and it's parent having 566 items in the same beanDefinitionNames. Yes, I'm using Cloud Config
Dave Syer
@dsyer
Dec 11 2017 15:37
Eureka would not be in the parent unless you asked for it
It might also be a bug that /pause doesn't go up to the parent.
But that's something you can take up in github
fvlad
@fvlad
Dec 11 2017 15:39
Ok, thanks, I will create an issue on github regarding /pause not checking for parent
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:11
No clue if this is the right location for this, but I cannot raise the timeout for Zuul no matter what I do. This is my config.
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: false
        isolation:
          thread:
            timeoutInMilliseconds: 60000
zuul:
  host:
    connect-timeout-millis: 10000
    socket-timeout-millis: 60000

spring:
  cloud:
    kubernetes:
      discovery:
        enabled: true
ribbon:
  eureka:
    enabled: false
  ReadTimeout: 30000
  ConnectTimeout: 30000
yet it's still timing out after ~5 seconds
I'm using the spring cloud kubernetes starter to connect to kubernetes containers.
Spencer Gibb
@spencergibb
Dec 11 2017 22:14
@snowe2010 what do your route definitions look like?
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:15

zuul:
  ignoredPatterns: /jasperserver-pro/login**
  add-proxy-headers: ${GATEWAY_FIRST_LEVEL_REVERSE_PROXY:true}
  host:
    connect-timeout-millis: ${ZUUL_CONNECT_TIMEOUT_MILLIS:60000}
    socket-timeout-millis: ${ZUUL_SOCKET_TIMEOUT_MILLIS:60000}
  routes:
    api:
      url: ${LP_SERVER_URL:http://localhost:9000}
    docmanagement:
      url: ${DOC_MANAGEMENT_URL:http://localhost:9002}
    addressvalidation:
      url: ${ADDRESS_VAL_URL:http://localhost:9003}
    factory:
      url: ${FACTORY_URL:http://localhost:9004}
...etc
I can see my service being hit just fine, so I know it's getting through, it just times out way too soon. We have long running processes so it's not a fast operation.
Spencer Gibb
@spencergibb
Dec 11 2017 22:20
So you aren't using ribbon or hystrix, so none of those settings matter.
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:20
Ok, so what setting does matter?
Spencer Gibb
@spencergibb
Dec 11 2017 22:22
The zuul.host.* are used for host routes (ie url:...)
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:23
I have those set. they are not working.
you mean the connect-timeout-millis and socket-timeout-millis in the snippet above correct?
Spencer Gibb
@spencergibb
Dec 11 2017 22:24
yes
version?
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:24
1.5.6 I believe. let me verify
Spencer Gibb
@spencergibb
Dec 11 2017 22:24
of spring cloud, in addition to boot
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:25
I have several spring cloud packages. Do they all need to be at the same version?
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zuul</artifactId>
        </dependency>

        <dependency>
            <groupId>com.netflix.netflix-commons</groupId>
            <artifactId>netflix-commons-util</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-security</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-kubernetes</artifactId>
            <version>0.2.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-kubernetes-netflix</artifactId>
            <version>0.2.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-kubernetes-ribbon</artifactId>
            <version>0.2.0.RELEASE</version>
        </dependency>
where the zuul starter is at 1.1.5, and starter-security is at 1.1.2
Spencer Gibb
@spencergibb
Dec 11 2017 22:26
What spring cloud bom are you importing?
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:27
our company's bom.
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
                <version>1.4.0.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-parent</artifactId>
                <version>Brixton.SR5</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
Spencer Gibb
@spencergibb
Dec 11 2017 22:28
Those properties don't exist until Camden
which is after Brixton
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:28
Camden SR5?
Spencer Gibb
@spencergibb
Dec 11 2017 22:29
Camden.SR7 is the latest in that train
Brixton and Angel are no longer supported
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:29
yeah I saw, not sure how far I can upgrade though. Didn't even realize we were out of date.
oh.
are they different release cycles?
Spencer Gibb
@spencergibb
Dec 11 2017 22:30
Edgware.RELEASE is the latest
"they"?
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:30
brixton vs angel vs camden
not being version numbers is confusing me.
Spencer Gibb
@spencergibb
Dec 11 2017 22:31
alphabetical order
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:32
what is SR then?
Spencer Gibb
@spencergibb
Dec 11 2017 22:32
service release, bugfixes and minor features
Tyler Thrailkill
@snowe2010
Dec 11 2017 22:33
fantastic, exactly what I was not understanding. Thanks!
Tyler Thrailkill
@snowe2010
Dec 11 2017 23:01
how do I verify I'm using the camden bom? It still is failing to recognize the property.
Spencer Gibb
@spencergibb
Dec 11 2017 23:05
mvn dependency:tree
Tyler Thrailkill
@snowe2010
Dec 11 2017 23:07
I don't see any mention of the bom in the dependency tree.
I see, http://projects.spring.io/spring-cloud/#release-trains provides the version for the parent of the zuul starter. Ok. it shows as using the right version, not sure what's up then.
Tim Ysewyn
@TYsewyn
Dec 11 2017 23:42
@spencergibb got some christmas gifts for you: spring-cloud/spring-cloud-gateway#126 and spring-cloud/spring-cloud-gateway#127 ;)