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

21st
Jan 2017
Patrick Cornelißen
@pcornelissen
Jan 21 2017 09:23
this makes me mad. Why can’t my service access the other servers via ribbon...
I always get
2017-01-21T09:20:25.000Z 1: Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: fetchHomeResource failed and fallback failed.
2017-01-21T09:20:25.000Z 1: ... 77 common frames omitted
2017-01-21T09:20:25.000Z 1: Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://contactme/_home": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
2017-01-21T09:20:25.000Z 1: at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:666) ~[spring-web-4.3.5.RELEASE.jar!/:4.3.5.RELEASE]
...
2017-01-21T09:20:25.000Z 1: at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46) ~[rxjava-1.1.10.jar!/:1.1.10]
2017-01-21T09:20:25.000Z 1: ... 26 common frames omitted
2017-01-21T09:20:25.000Z 1: Caused by: java.net.ConnectException: Connection refused (Connection refused)
this only happens in my live deployment not locally
in eureka the registration of the server looks good. The link in eureka oints to the correct hostname with the correct management port
Patrick Cornelißen
@pcornelissen
Jan 21 2017 09:31
it would be really good if there was a way to log out which connection string ribbon calculated so we have at leastthe chance to debug what is going wrong here :-/
Patrick Cornelißen
@pcornelissen
Jan 21 2017 09:55
ok, great I have renamed the docker instances so their name does not match the spring service name and now it works
this is bad, is there a way to try tp resolve a service first in eureka and second vi dns?
Dave Syer
@dsyer
Jan 21 2017 10:15
Don't think so. It's one or the other. Out of the box anyway.
Patrick Cornelißen
@pcornelissen
Jan 21 2017 23:27
it would be enough to force it to do eureka based service calls ;-) I didn’t change anythging in the java code, I just renamed the „host" names in docker so the dns and service names are different