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

17th
Jul 2015
Sergei Egorov
@bsideup
Jul 17 2015 08:58

Hi!

I'm running Spring Cloud parts in Cloud Foundry, I have config deployed to config.10.244.0.34.xip.io, but eureka is failing to get it:

2015-07-17T11:56:01.94+0300 [App/0]      OUT 2015-07-17 08:56:01.945 ERROR 33 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://config.10.244.0.34.xip.io/eureka/cloud":Connection refused; nested exception is java.net.ConnectException: Connection refused

any ideas why? If I open this URL in browser I see property sources for it

Dave Syer
@dsyer
Jul 17 2015 08:59
No idea. Which network is 10.244.0.34? Is it actually accessible from your app?
That depends a lot on your network set up
Sergei Egorov
@bsideup
Jul 17 2015 09:00

it's VM created by Cloud Foundry where all apps are deployed

Still not sure that problem is related to Spring Cloud, but since I have no idea where to ask about CF I decided to ask here first

BTW AFAIK Spring Cloud is supposed to work in CF out-the-box, right?
Dave Syer
@dsyer
Jul 17 2015 09:01
It depends on your network configuration
And on the way you configure the service registrations
If 10.244.0.34 is public I would expect it is accessible. But it depends on your AWS set up
Sergei Egorov
@bsideup
Jul 17 2015 09:14
ok, thanks, will try more
Sergei Egorov
@bsideup
Jul 17 2015 12:06

Figured out. CF by default blocking any outbound traffic from container to non-public networks. Result - spring cloud clients are unable to connect to other services. Fixed with security group rule.

Speaking about CF... Maybe it's reasonable to support it as a discovery registry? We can ask it for the list of available instances by service id, we can get health information about them, etc... So why Eureka?

Sergei Egorov
@bsideup
Jul 17 2015 13:33
Sorry, didn't know about spring-cloud-cloudfoundry
Sergei Egorov
@bsideup
Jul 17 2015 14:41
Cloud app continuously logs warnings with timeout trying to get value for MonitorConfig, is it ok?
Dave Syer
@dsyer
Jul 17 2015 15:09
We already have a DiscoveryClient that uses CF apis (see spring-cloud-cloudfoundry)
Eureka is more flexible. Allows you to cross between CF instances for example.
But it's valid to just use the cloud controller for small systems
I like the flexibility Eureka gives me. E.g. to register a service running on my laptop and debug it as part of a system running on CF.
You can't do that kind of thing unless the service catalog is relatively fluid.
Aizhan Toregozhina
@atoregozh
Jul 17 2015 16:26
Hi! I was playing with spring cloud config server and the official docs say that I can override 'env' property by setting it in spring.cloud.config.env from within bootstrap.yml of config client, but that doesn't do anything for me. I can only set the environment through spring.profiles.active but spring.cloud.config.env doesn't override that. You can have a look here (line 9) github repo Could anyone explain what's going on? @dsyer @spencergibb
Dave Syer
@dsyer
Jul 17 2015 16:49
I don't see any mention of spring.cloud.config.env in the user guide
What are you trying to do?
It looks like you mean spring.profiles.active to me
checketts
@checketts
Jul 17 2015 21:12
@dsyer The guide shows: All of them can be overridden by setting spring.cloud.config.* (where * is "name", "env" or "label"). The "label" is useful for rolling back to previous versions of configuration http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_locating_remote_configuration_resources
So I'm guessing the confusion is coming from that
Dave Syer
@dsyer
Jul 17 2015 21:18
Ok, I see that. Should be fixed now (the website updates when the build goes green).
Thanks
Dave Syer
@dsyer
Jul 17 2015 21:34
Irritatingly, Travis is failing because it can't find a file that is actually there. New bug in Travis?