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

20th
Dec 2016
Isabek Tashiev
@Isabek
Dec 20 2016 00:02
I have disabled hystrix execution timeout and it works. I think it is not good that turn off timeout. Is it possible turn off timeout for special url?
quickeee
@quickeee
Dec 20 2016 08:12
hi... just come across https://netflix.github.io/conductor/ for service orchestration.. any plan to adopt in spring cloud?
Dave Syer
@dsyer
Dec 20 2016 08:32
Haven't had a really good look at it yet. I suspect spring cloud dataflow already has a similar feature set, or close.
quickeee
@quickeee
Dec 20 2016 08:48
ok.. thanks a lot.. I am looking cloud dataflow for my requirement...
Andrew Fitzgerald
@fitzoh
Dec 20 2016 17:48
Hey, I’m a little confused about how to disable decryption w/ config server. I’ve tried setting spring.cloud.config.server.encrypt.enabled=false in both application.properties and bootstrap.properties, but it’s still blowing up when it reads an encrypted value in the git repo
No decryption for FailsafeTextEncryptor. Did you configure the keystore correctly?
java.lang.IllegalStateException: Cannot decrypt: key=secret at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.decrypt(EnvironmentDecryptApplicationInitializer.java:201) ~[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.decrypt(EnvironmentDecryptApplicationInitializer.java:165) ~[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.initialize(EnvironmentDecryptApplicationInitializer.java:95) ~[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at org.springframework.cloud.bootstrap.BootstrapApplicationListener$DelegatingEnvironmentDecryptApplicationInitializer.initialize(BootstrapApplicationListener.java:333) ~[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:635) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:349) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] at com.example.ConfigServerApplication.main(ConfigServerApplication.java:12) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] Caused by: java.lang.UnsupportedOperationException: No decryption for FailsafeTextEncryptor. Did you configure the keystore correctly? at org.springframework.cloud.bootstrap.encrypt.EncryptionBootstrapConfiguration$FailsafeTextEncryptor.decrypt(EncryptionBootstrapConfiguration.java:152) ~[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.decrypt(EnvironmentDecryptApplicationInitializer.java:193) ~[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE]
Dave Syer
@dsyer
Dec 20 2016 17:50
Is that in the client or the server?
Andrew Fitzgerald
@fitzoh
Dec 20 2016 18:03
the server
just created a new project from start.spring.io
spring.cloud.config.server.git.uri: file://${user.home}/Workspace/config-server-stuff/config spring.cloud.config.server.git.searchPaths: {application} spring.cloud.config.server.encrypt.enabled=false
@EnableConfigServer
@SpringBootApplication
public class ConfigServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(ConfigServerApplication.class, args);
    }
}
then this is the file it’s attempting to serve in a different repo
key: value secret: '{cipher}something’
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.4.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-config-server</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Camden.SR3</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
I’m poking around in intellij
it looks like ConfigServerProperties$Encrypt::isEnabledis never used
unless I’ve somehow got old versions cached somewhere
Andrew Fitzgerald
@fitzoh
Dec 20 2016 18:11
@dsyer found a workaround… had to set encrypt.fail-on-error=false in bootstrap.yml
and have to keep spring.cloud.config.server.encrypt.enabled=false somewhere to make sure the {cipher} prefix gets passed downstream
Derek Wyatt
@derekwyatt
Dec 20 2016 18:18
One of the things I've noted with Zuul is that it always sends response bodies using Transfer-Encoding: chunked regardless of the response body that the server, for which it is proxying, has sent. Does anyone know if that's a bug and, if so, what spring component it might live in?
Spencer Gibb
@spencergibb
Dec 20 2016 18:19
It does that if the content-length is unkown IIRC
Derek Wyatt
@derekwyatt
Dec 20 2016 18:20
@spencergibb it doesn't appear so... I have hundreds of examples where the server is sending stuff with Content-Length: 0 (or some non-zero number) and the exact same request proxied through Zuul is always chunked.
Spencer Gibb
@spencergibb
Dec 20 2016 18:22
examples help
Derek Wyatt
@derekwyatt
Dec 20 2016 18:26
Actually, the same repo I put up for the 205 issue illustrates it.
================ 200 =================
GOING STRAIT TO NODE
*   Trying ::1...
* Connected to localhost (::1) port 50001 (#0)
> GET /200 HTTP/1.1
> Host: localhost:50001
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Content-Type: text/html; charset=utf-8
< Content-Length: 0 <<<<<< HERE >>>>>>
< ETag: W/"0-1B2M2Y8AsgTpgAmY7PhCfg"
< Date: Tue, 20 Dec 2016 18:24:08 GMT
< Connection: keep-alive
<
* Connection #0 to host localhost left intact

PROXYING THROUGH ZUUL
*   Trying ::1...
* Connected to localhost (::1) port 10000 (#0)
> GET /200 HTTP/1.1
> Host: localhost:10000
> User-Agent: curl/7.43.0
> Accept: */*
>
< X-Application-Context: application:10000
< X-Powered-By: Express
< ETag: W/"0-1B2M2Y8AsgTpgAmY7PhCfg"
< Date: Tue, 20 Dec 2016 18:24:08 GMT
< Content-Type: text/html;charset=utf-8
< Transfer-Encoding: chunked <<<<<< HERE >>>>>>
<
* Connection #0 to host localhost left intact
Those are both request content lengths. This is happening in responses.
Spencer Gibb
@spencergibb
Dec 20 2016 18:32
so, your requests don’t include Content-Length, correct?
Derek Wyatt
@derekwyatt
Dec 20 2016 18:33
Yeah, most requests won't have a content-length at all.
Spencer Gibb
@spencergibb
Dec 20 2016 18:34
that’s what triggers the chunked encoding header
you can open an issue if you’d like
Derek Wyatt
@derekwyatt
Dec 20 2016 18:35
        if (request.getContentLength() < 0) {
            context.setChunkedRequestBody();
        }
You know this stuff way better than I do, but that's not saying setChunkedResponseBody(). Why would setting the request body to chunked modify the body type of the response?
Spencer Gibb
@spencergibb
Dec 20 2016 18:38
You’re right, that doesn’t set the transfer encoding. I think that is the apache http client that is doing it
Derek Wyatt
@derekwyatt
Dec 20 2016 18:45
Thanks @spencergibb. Running a few more tests to see what it does when Content-Length is not zero.
Derek Wyatt
@derekwyatt
Dec 20 2016 18:52

I just tried it with a 200 MB response payload. The originating server sets Content-Length: 209715200 and through Zuul it's Transfer-Encoding: chunked. This is springBootVersion 1.4.2.RELEASE and train Camden.SR3.

Do you think this is a spring-cloud issue or does it live somewhere else?

Spencer Gibb
@spencergibb
Dec 20 2016 18:53
Derek Wyatt
@derekwyatt
Dec 20 2016 18:54
I did read that but this is a download. Does the same thing apply?
Spencer Gibb
@spencergibb
Dec 20 2016 18:55
possibly, we’ve only ever had requests for uploads
Derek Wyatt
@derekwyatt
Dec 20 2016 18:55
:) Fair enough. Thx
Andrew Fitzgerald
@fitzoh
Dec 20 2016 21:09
Anyone have any experience with/know if its possible to use consul config alongside the normal config client?
APPLICATION FAILED TO START
***************************

Description:

A component required a bean named 'configServerRetryInterceptor' that could not be found.


Action:

Consider defining a bean named 'configServerRetryInterceptor' in your configuration.
We’ve been using spring-cloud-starter-consul-config in the app for a while, just added in a dependency on spring-cloud-starter-config
Brixton.SR6
nevermind, I’m dumb… used spring.cloud.config.server.git.uri instead of spring.cloud.config.uri
Spencer Gibb
@spencergibb
Dec 20 2016 21:48
@Fitzoh yes, I ran a demo with config client, zookeeper, consul & vault just for fun.
Andrew Fitzgerald
@fitzoh
Dec 20 2016 21:51
Thanks @spencergibb , yeah I got it working after fixing the config key
Did you see my conversation earlier with dsyer about disabling decryption?
should I toss an issue in for that or is it expected?
Spencer Gibb
@spencergibb
Dec 20 2016 21:52
I didn't
an issue wouldn’t hurt
Andrew Fitzgerald
@fitzoh
Dec 20 2016 21:52
Hey, I’m a little confused about how to disable decryption w/ config server.  I’ve tried setting `spring.cloud.config.server.encrypt.enabled=false` in both application.properties and bootstrap.properties, but it’s still blowing up when it reads an encrypted value in the git repo
`No decryption for FailsafeTextEncryptor. Did you configure the keystore correctly?`
had to set encrypt.fail-on-error=falseto serve an encrypted property from the config server
Spencer Gibb
@spencergibb
Dec 20 2016 21:53
seems odd
Andrew Fitzgerald
@fitzoh
Dec 20 2016 21:54
I’ll get something together