ppodgorsek/docker-robot-framework

Error while running in docker container

NimishKmr opened this issue · 5 comments

While running my tests in robotframework docker container, I am receiving below error -
[ WARN ] Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5cd6b54a00>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /session
[ WARN ] Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5cd653a820>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /session
[ WARN ] Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5cd653b9d0>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /session
Login_with_invalid_credentials | FAIL | Parent suite setup failed: MaxRetryError: HTTPConnectionPool(host='false', port=80): Max retries exceeded with url: /session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f83c3948e20>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

It looks like the server you are trying to connect to cannot be reached, as shown by the following message: Name does not resolve
Where is the DNS record defined? Is it public? If not, try to set it on the command line when starting the container.

Network doesnt seem to be a problem. I tried to ping from inside container and the url is accessible. Aslo, ran python commands manaully to reach to the url and it worked. But somehow, when i run the tests in container, it gives me above error.

Pasting few lines from output.xml, when i ran the test from inside container. If this helps to debug.

Call Method ${chrome_options} add_argument --headless Displays the given messages in the log file as keyword arguments. ${productUrl} ${browser} remote_url=${remote_url} options=${chrome_options} Opens a new browser instance to the optional ``url``. Opening browser 'chrome' to base url 'https://mysite(url changed due to security reasons)' through remote server at 'False'. Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnec tionError('<urllib3.connection.HTTPConnection object at 0x7f9bda3472b0>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /session

I still see the same DNS error: Name does not resolve
Could you double-check that the productUrl and remote_url variables are correctly replaced please?