Search code examples
web-scrapingselenium-chromedriveridentifieripv4java-11

-error when running chromedriver on mac- not a valid identifier - IPv4 port not available


I have this error on terminal when I try to run Chromedriver.exe. for web scraping. Is it something wrong about Java development kit?

-bash: export: `/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home': **not a valid identifier**

/Users/mac/Desktop/URBAN/winterbreak2018/web_scraping/chromedriver ; exit;
macs-MacBook-Pro:~ mac$ 

/Users/mac/Desktop/URBAN/winterbreak2018/web_scraping/chromedriver ; exit;

Starting ChromeDriver 2.45.615355 (d5698f682d8b2742017df6c81e0bd8e6a3063189) on port 9515

Only local connections are allowed.

[1548565873.673][SEVERE]: bind() failed: Address already in use (48)

IPv4 port not available. Exiting...

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...12 completed.

[Process completed]

Solution

  • most likely Chromedriver was not properly closed, unless something else uses that port.

    run usr/libexec/java_home -V to see which VM is even used.