Docker network URL cannot be resolve inside Katalon Docker Container (Docker to Docker)

Issue:
When using an URL set by System.getenv inside a docker container. The url is not resolved by KATALON. But when doing:
ping container_name inside the container, it works.

How to reproduce:

  • Create a server app listening on port 80 inside docker.
  • Create a katalon project inside docker
  • create a docker network
  • Run server app container (listening on port 80)
  • connect server app container to docker network
  • connect katalon container to docker network
  • Run katalon container

How to check if url is working inside katalon container:

  • ping server_app (it resolves)

    root@aff9afbc64e7:/# ping server_app
    PING server_app (172.21.0.2) 56(84) bytes of data.
    64 bytes from server_app.custom_network (172.21.0.2): icmp_seq=1 ttl=64 time=0.070 ms
    64 bytes from server_app.custom_network (172.21.0.2): icmp_seq=2 ttl=64 time=0.040 ms

But when using http://server_app as URL inside katalon container to run tests, it doesn’t work at all:
2020-09-17 07:29:00.792 ERROR c.k.k.core.keyword.internal.KeywordMain - ❌ Unable to click on object '

Notes: The tests works on host URL. Ex. Lets say I exposed the server_app container on: localhost:3000, Then i run the katalon project outside docker (directly on host) it works.

Hello,

Have anyone tried to reproduce my issue? I think this is a katalon issue as the url is resolving but its not reachable in katalon container.

Thanks

I faced the same issue. Any solution for this?

Thanks,
Doanh

without additional context nobody will ever attempt to reproduce it.
in your mind you may have the same problem, in my mind not.

Thanks for your comment, Bionel. So what’s your advice in this case :slight_smile:

we don’t know what content is serving this custom app

in addition to that, there are some inconsistencies. from the error log:

looks like the problem is in fact ‘unable to click on object’ (which can have various causes), not the url not being resolved

so … no, i don’t think somebody can reproduce it at this moment, there is not enough info.

root@aff9afbc64e7:/# ping server_app

have you tried curl http://server_app too?

@nvdoanh are you sure you are facing exactly the same issue?
please describe your use case

Hi @anuradha, @nvdoanh,

We can understand this problem but it’s hard for us to setup a test environment without a sample Docker file. Can you share a sample project for better evaluation?

I will give more details once I have time. From your site, you just set up simple topology like the post and confirm it works or not.

Thanks,
Doanh

1 Like

Hi @bionel @duyluong i have got a sample project created today.
Kindly do share an email address so that i can share the project with you so that you can check it. [ if its okay with you guys]

The error i am having is as below:

even if i can ping to the url successfully

Thanks

@anuradha @nvdoanh
Hi again.
Unfortunately i don’t have a runtime license so i cannot fully test your workflow. Therefore sending any data to me is useless.
However, at a certain point in time i asked if somebody used curl from the katalon container to check the comunication with the webserver container, instead of just pinging.

This is not answered.
So i will just ignore any other ‘details’ offered until this info is provided, just because my advices are ignored.

Will let this issue into the katalon staff team hands.

Regards