简体   繁体   中英

ChromeDriver will not run - Address already in use (98) - but nothing found to be using port 1915

ChromeDriver will not run, saying that the current address is already in use. Whenever I have used lsof I have found nothing using port 1915, which is what ChromeDriver is wanting to use.

I've looked everywhere to find a solution for this but they all just say to kill whatever is using the port but I can't find any. I also found a similar question on here at ' Chromedriver cannot be started due to address already in use ', but that question shows their error is saying an IPv4 port is not available whilst mine says IPv6.

Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 9515
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1553613641.983][SEVERE]: bind() failed: Address already in use (98)
IPv6 port not available. Exiting...

Any help on this would be greatly appreciated. This issue is critical for one of my projects which worked fine on windows, but I just recently moved to linux due to my windows getting corrupted and not wanting to have to deal with installing windows again, plus wanting a change-up in my day to day workings on the computer. Because of this, any tips given would be great if explained like I'm 5.

Thanks in advance.

fuser -k 9515/tcp

这个效果很好,感谢@Svilen

To identify the process id for ChromeDriver use ps -fA | grep chromedriver ps -fA | grep chromedriver , Then kill the column two id number.

或者,如果此问题是因为您在后台有另一个 chromedriver 进程,您可以运行killall chromedriver

You need to kill chromedriver to get this working

   vikaspiprade@AUMEL-P7750-VP:~/openfield-cloud/nightwatch$ npx nightwatch --test ./tests/widgets/banner.test.js --testcase "Hide Row Label in Banner Widget" 
   Error: ChromeDriver process exited with code: 1
   [1663729485.869][SEVERE]: bind() failed: Address already in use (98)

       at ChildProcess.emit (node:events:513:28)
       at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
 [1663729485.869][SEVERE]: bind() failed: Address already in use (98)



vikaspiprade@AUMEL-P7750-VP:~/openfield-cloud/nightwatch$ ps
  PID TTY          TIME CMD
14354 pts/7    00:00:00 chromedriver
14416 pts/7    00:00:01 chrome <defunct>
14854 pts/7    00:00:00 npm exec serve
14878 pts/7    00:00:00 sh
14879 pts/7    00:00:00 node
15134 pts/7    00:00:00 ps
23260 pts/7    00:00:00 bash
vikaspiprade@AUMEL-P7750-VP:~/openfield-cloud/nightwatch$ kill -9 14354
vikaspiprade@AUMEL-P7750-VP:~/openfield-cloud/nightwatch$ 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM