Server Node on Windows Server: "Process refused to die after 10 seconds, and couldn't taskkill it"

114 views
Skip to first unread message

Thorsten

unread,
Jun 28, 2016, 1:13:53 PM6/28/16
to Selenium Users
Hello everyone,

at the moment I am trying to set up a Selenium test environment - but I got stuck setting up the server:

Starting the server (hub and node) works fine, they are on the same host. Running a test also works. But when the test is done and the browser is about to close, the node is not able to really close the browser. The browser window disappears but the browser process itself continues to run. The node then prints a stacktrace saying

java.lang.RuntimeException: Process refused to die after 10 seconds, and couldn't taskkill it: Timeout waiting for process to die
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:142)
at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:247)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$2(UnixProcess.java:246)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:125)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:155)
at org.openqa.selenium.firefox.FirefoxBinary.quit(FirefoxBinary.java:246)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(NewProfileExtensionConnection.java:194)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(FirefoxDriver.java:364)
at org.openqa.selenium.firefox.FirefoxDriver.stopClient(FirefoxDriver.java:310)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:529)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:103)
at com.sun.proxy.$Proxy1.quit(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver.quit(EventFiringWebDriver.java:202)
at org.openqa.selenium.remote.server.handler.DeleteSession.call(DeleteSession.java:50)
at org.openqa.selenium.remote.server.handler.DeleteSession.call(DeleteSession.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.openqa.selenium.os.ProcessUtils$ProcessStillAliveException: Timeout waiting for process to die
at org.openqa.selenium.os.ProcessUtils.waitForProcessDeath(ProcessUtils.java:67)
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:139)
... 24 more
Caused by: java.lang.InterruptedException
at java.lang.ProcessImpl.waitFor(Unknown Source)
at org.openqa.selenium.os.ProcessUtils$ProcessWaiter.run(ProcessUtils.java:164)
... 1 more

If I use the task manager and try to kill the browser process that was started by the node, I am not able to do so. I just get the message "Access denied" (although I try to kill a process of my own user). After a couple of minutes the browser process finally disappears and the memory is freed.

I tried Windows Server 2008R2 and 2012R2 - the problem occurs on both.
There is no difference between Firefox and Chrome - both will hang in the same way.
Selenium Server is version 2.53.

If I run exactly the same setup on Windows 7 everything works like a charm, no problem at all.

Any idea why this problem happens on Windows Server and how to solve it?
Reply all
Reply to author
Forward
0 new messages