I have 2 microservices built using Netflix eureka. They communicate using a fake customer. In my local environment, the feign client works without any problems. But in a Predix (cloud foundry) environment, they cannot communicate. The Feign client always gives a connection timeout error. As it turned out, the feign client is trying to connect using the ip address of the instance (I think the feign client uses the internal IP address). Is there a way to fix this problem, maybe it's the ability to connect to the container or use a public uri
EDIT: I was able to get the public URL by changing the host name as shown below.
eureka: instance: hostname: ${vcap.application.uris[0]}
but on the eureka server it is registered as $ {vcap.application.uris [0]}: [random port] (for example, xxxxxx.run.aws-usw02-pr.ice.predix.io:61142/yyy) there is a way to remove this random port.
source share