I have 2 microservices built using Netflix eureka. They communicate using feign client. In my local environment feign client works without any issue. But in the Predix (a cloud foundry) environment they fail to communicate. Feign client always gives connection time out error. As found that feign client try to connect using instance ip address (I think feign client uses the internal ip address). Is there a way to fix this issue, may be enabling container communication or using public uri
EDIT: I managed to get the public url by changing hostname like below.
eureka:
instance:
hostname: ${vcap.application.uris[0]}
but in the eureka server it register as ${vcap.application.uris[0]}:[random port] (like xxxxxx.run.aws-usw02-pr.ice.predix.io:61142/yyy) is there a way to remove that random port.