I don't see how that would help (and the links attribute is a legacy feature and not recommended).

My situation is that the two containers are on the same network and can see each other. e.g. you can open a shell in one and ping the other using its hostname.
So the networking at the container level is perfectly OK.

The problem is that when using the HTTP4 camel component the same hostname does not get resolved. It looks like this is being done by the org.apache.http.impl.conn.SystemDefaultDnsResolver class in httpcomponents [1] which states in its docs: "DNS resolver that uses the default OS implementation for resolving host names." But it seems like it doesn't do this correctly?


[1] https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/SystemDefaultDnsResolver.html

On 06/06/18 04:35, Willem Jiang wrote:
Can  you add a link  to the camel container just like this ?

camel:
image: "camel:0.3.0-SNAPSHOT"
hostname: camel
links:
- "otherHost"
- "zipkin:zipkin.io"


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jun 6, 2018 at 4:40 AM, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

On 05/06/18 20:40, Robin Vanderhallen wrote:

Are both containers in the same network in the docker compose file?

Yes. Both are in the same network environment, but this is not the default
network.

         networks:
         - xxx

Tim


Reply via email to