Issue 444 in chromedriver: chromedriver sometimes hangs when launching chrome (chrome fails to bind to debug port)

136 views
Skip to first unread message

chrome...@googlecode.com

unread,
Aug 6, 2013, 10:15:29 PM8/6/13
to chromedri...@googlegroups.com
Status: New
Owner: ----
Labels: Pri-3

New issue 444 by qrc...@gmail.com: chromedriver sometimes hangs when
launching chrome (chrome fails to bind to debug port)
http://code.google.com/p/chromedriver/issues/detail?id=444

We recently started running our Selenium tests in Chrome. Several times a
day, a test will hang while trying to create a new remote webdriver. A new
Chrome window will appear on the display, and then Selenium appears to time
out while making a request to the chromedriver.

When this happens, the chrome_debug.log on the grid node always contains
this error:

[23138:23196:0806/200251:ERROR:tcp_listen_socket.cc(72)] Could not bind
socket to 127.0.0.1:42630

where the port number matches the --remote-debugging-port parameter passed
by chromedriver to Chrome.

What steps will reproduce the problem?

If I run the attached hang-chrome.rb script on an Ubuntu 12 machine, I will
usually encounter the issue within 30 minutes. We run into the issue 3 or 4
times per day on our Selenium grid, which consists of 30 Ubuntu vms (one
Chrome browser per vm).

What version of the product are you using? On what operating system?
ChromeDriver = 2.1
Chrome = 28.0.1500.71
OS = Ubuntu 12.04 amd64

It would be nice to be able to specify chrome's remote debugging port as a
parameter to chromedriver, to see if the issue is resolved by using a port
outside the ephemeral range. Let me know if there is a way to do this and
I'll try it.

Thank you very much!


Attachments:
chrome_debug.log 729 bytes
chromedriver.log 1.0 KB
hang-chrome.rb 125 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chrome...@googlecode.com

unread,
Aug 7, 2013, 1:41:08 PM8/7/13
to chromedri...@googlegroups.com

Comment #1 on issue 444 by qrc...@gmail.com: chromedriver sometimes hangs
when launching chrome (chrome fails to bind to debug port)
http://code.google.com/p/chromedriver/issues/detail?id=444

We are still experiencing this issue after upgrading to chromedriver 2.2.

chrome...@googlecode.com

unread,
Sep 26, 2013, 11:04:03 AM9/26/13
to chromedri...@googlegroups.com

Comment #2 on issue 444 by krw1...@gmail.com: chromedriver sometimes hangs
when launching chrome (chrome fails to bind to debug port)
http://code.google.com/p/chromedriver/issues/detail?id=444

I believe we might be seeing the same error with 2.3 and Chrome 29. Our
tests are intermittently hanging with this in the log:

[3030:3084:0926/053242:ERROR:tcp_listen_socket.cc(72)] Could not bind
socket to 127.0.0.1:41713

When we log in to vnc to see what is going on when it hangs here, we just
see an empty about:blank tab. Was any solution ever found for this?

chrome...@googlecode.com

unread,
Sep 26, 2013, 11:11:50 AM9/26/13
to chromedri...@googlegroups.com

Comment #3 on issue 444 by krw1...@gmail.com: chromedriver sometimes hangs
when launching chrome (chrome fails to bind to debug port)
http://code.google.com/p/chromedriver/issues/detail?id=444

If it helps, this is what netstat shows for that port:

tcp 0 0 localhost:41713 localhost:41713
ESTABLISHED

chrome...@googlecode.com

unread,
Sep 26, 2013, 2:33:51 PM9/26/13
to chromedri...@googlegroups.com
Updates:
Status: Started
Owner: kka...@chromium.org
Labels: -Pri-3 Pri-1

Comment #4 on issue 444 by kka...@chromium.org: chromedriver sometimes
hangs when launching chrome (chrome fails to bind to debug port)
http://code.google.com/p/chromedriver/issues/detail?id=444

There is no option for this right now. I see a few approaches possible:
1) have cd try to find its own random port within the non ephemeral range
2) allow cd server to accept a particular port # or range
3) hold the ephemeral port until chrome is about to take it
4) change chrome to pick its own port and then tell us

I think #4 is best, but in the meantime #1 will be easy enough to implement.
Reply all
Reply to author
Forward
0 new messages