How to fix "[SEVERE]: bind() failed: Cannot assign requested address (99)" while starting chromedriver How to fix "[SEVERE]: bind() failed: Cannot assign requested address (99)" while starting chromedriver linux linux

How to fix "[SEVERE]: bind() failed: Cannot assign requested address (99)" while starting chromedriver


In my case running chromedriver with --verbose flag helped to figure out the issue:

[1564749154.010][SEVERE]: bind() failed: Cannot assign requested address (99)[1564749154.011][INFO]: listen on IPv6 failed with error ERR_ADDRESS_INVALID

Chrome attempted to listen on IPv6 address, which was not enabled in Docker. You can either enable IPv6 support (which works only on Linux host) or ignore the error since chromedriver process will be listening on IPv4 anyway.


In one line: you need to pass --whitelisted-ips= into chrome driver (not chrome!)

You can do it in different way (depend on your env setup):

If you use ChromeDriver locally/directly (not using RemoteWebDriver) from code, just insert lines below before ChromeDriver init

    System.setProperty("webdriver.chrome.whitelistedIps", "");

If you use it remotely (eg. selenium hub/grid) you need to set system property when node starts, like in command:

java -Dwebdriver.chrome.whitelistedIps= testClass etc...

or docker by passing JAVA_OPTS env

  chrome:    image: selenium/node-chrome:3.141.59    container_name: chrome    depends_on:      - selenium-hub    environment:      - HUB_HOST=selenium-hub      - HUB_PORT=4444      - JAVA_OPTS=-Dwebdriver.chrome.whitelistedIps=


I managed to workaround by adding argument as shown below (Python)

options = webdriver.ChromeOptions()options.add_argument('--disable-dev-shm-usage')