M.Chaidir Pratama
M.Chaidir Pratama

Reputation: 53

bind() failed: Cannot assign requested address (99) error while executing Selenium based automation test in server

I have code for web ui automation test created with Katalon, I have tried to run it locally and it worked well. Then I push my code to server but when I run it from server, it failed. It failed to open the web/url that i want. I generate the code to execute test from server but when I run that code this is happened : enter image description here

bind failed

then it kept loading the browser until it timed out : enter image description here

Can anyone suggest/comment or help with a solution for this?

Upvotes: 4

Views: 10878

Answers (1)

undetected Selenium
undetected Selenium

Reputation: 193298

This error message...

[SEVERE]: bind() failed: Cannot assign requested address (99)

...implies that the ChromeDriver was unable to bind the Browsing Context i.e. Chrome Browser session.

Initiating ChromeDriver with --verbose flag would have helped to debug the issue in a better way.


Solution

As per the documentation in [Errno 99] Cannot assign requested address when starting Dockerized web app the probable cause and the solution would be to:

  1. Close all processes that may be running on your port number. Assuming you are running on port 8000:

     lsof -t -i tcp:8000 | xargs kill -9
    
  2. You are probably using an app address as localhost or 127.0.0.1 and you need to change it to 0.0.0.0

  3. Another possible reason can be, attempted to listen on IPv6 address, which was not enabled. You can either enable IPv6 support (which works only on Linux host) or ignore the error since ChromeDriver process will be listening on IPv4 after initial failed attempts.

Upvotes: 2

Related Questions