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

16th
Jan 2017
Casey Link
@Ramblurr
Jan 16 2017 10:09
I have a cloud-task project with a single batch Job bean, and the batch is being executed automatically. In fact I have no CommandLineRunner or ApplicationRunner in the project at all.
But I would like to intercept a few command line args to configure the batch Job with. Is there something special I should do aside from just calling .execute() on the Job?
Ali Shahbour
@shahbour
Jan 16 2017 10:15
in yml you should set autostart to false
and then use job luncher to start the job
spring:
  batch:
    job.enabled: false
Simonfld
@Simonfld
Jan 16 2017 10:17
could someone help me ?
Casey Link
@Ramblurr
Jan 16 2017 10:17
Ah so its a batch property not cloud-task. Thanks.
Simonfld
@Simonfld
Jan 16 2017 10:17
I use spring-colud zuul
how to config request keep alive ?
Ali Shahbour
@shahbour
Jan 16 2017 10:20
i did not get you what do you mean by keep alive
Simonfld
@Simonfld
Jan 16 2017 10:21
blob
I use @EnableZuulProxy start a application, the request can not keep-alive
I mean the server disconnect the connection, didn't keep alive
Ali Shahbour
@shahbour
Jan 16 2017 10:25
sorry no idea , i am still new to Zuul
Spencer Gibb
@spencergibb
Jan 16 2017 16:55
@Simonfld zuul 1.x does not support long lived connections
Patrick Cornelißen
@pcornelissen
Jan 16 2017 18:34
Hi Guys, I have a weird problem. I deployed my spring-cloud based app to a kontena cluster with eureka etc. locally and for example in my local docker-swarm cluster everything works. In Kontena I get connection refused messages when for example I try to fetch http://adminusers/_home via ribbon enhanced resttemplate. I don’t understand why this happens now. In Kontena a host is also accessible via its servicename which is also adminusers. Maybe this is the reason? Does ribbon make a dns lookup to see whether or not it needs to use the service registry data from eureka or make a plain connect?
Andrew Fitzgerald
@fitzoh
Jan 16 2017 18:35
Can you use the profile naming convention for bootstrap properties (bootstrap-someprofile.yaml)?
Patrick Cornelißen
@pcornelissen
Jan 16 2017 18:35
no I don’t think so
I’ve tried that some time ago and it didn’t work
Spencer Gibb
@spencergibb
Jan 16 2017 18:36
@pcornelissen it does not do a dns lookup. The serviceId-as-hostname gets replaced by the host and port registered in eureka.
Patrick Cornelißen
@pcornelissen
Jan 16 2017 18:37
hmm, too bad then I have to find out why that doesn’t work :-) Maybe it registers with the wrong IP. Thanks for the hint, this helps narrowing where to look for
:)
Spencer Gibb
@spencergibb
Jan 16 2017 18:38
check http://<eurekaserver>/eureka/apps for details of what was registered
Patrick Cornelißen
@pcornelissen
Jan 16 2017 18:39
now I have to find out how I can access that in the kontena grid but that is a problem I chose to have ;-)
Spencer Gibb
@spencergibb
Jan 16 2017 18:39
your clients have to be configured with eureka connection information
Andrew Fitzgerald
@fitzoh
Jan 16 2017 18:39
@pcornelissen so I guess the alternative is single bootstrap + environment variable overrides?
Spencer Gibb
@spencergibb
Jan 16 2017 18:39
check a clients /env (assuming you have actuator)
alternative to what?
Patrick Cornelißen
@pcornelissen
Jan 16 2017 18:40
@Fitzoh yes that’s what I do. Have some sane defaults in bootstrap.yml and then provide the rest via parameters
Andrew Fitzgerald
@fitzoh
Jan 16 2017 18:41
@spencergibb
me:
Can you use the profile naming convention for bootstrap properties (`bootstrap-someprofile.yaml`)?
pcornelissen:
no I don’t think so
I’ve tried that some time ago and it didn’t work
me:
@pcornelissen  so I guess the alternative is single bootstrap + environment variable overrides?
sorry, concurrent conversations
Spencer Gibb
@spencergibb
Jan 16 2017 18:42
ah, @Fitzoh if you can’t, you should
there is already an issue related spring-cloud/spring-cloud-commons#156
Andrew Fitzgerald
@fitzoh
Jan 16 2017 18:44
cool, I’ll keep an eye on that
Patrick Cornelißen
@pcornelissen
Jan 16 2017 19:09
ok, looks like the service needs to register with the IP if the ethwe interface it currently registers with the IP of eth0 which is the internal docker networking interface...
Spencer Gibb
@spencergibb
Jan 16 2017 19:17
There are some option for choosing and interface to register withhttp://cloud.spring.io/spring-cloud-static/Camden.SR4/#ignore-network-interfaces
Patrick Cornelißen
@pcornelissen
Jan 16 2017 19:35
the preferred networks stuff looks great
that is a pretty recent feature right? Well done :)
Spencer Gibb
@spencergibb
Jan 16 2017 20:02
it was a contribution