使用SIGTERM终止后,Selenium Server不会绑定到套接字 [英] Selenium Server doesn't bind to socket after being killed with SIGTERM

查看:81
本文介绍了使用SIGTERM终止后,Selenium Server不会绑定到套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在被杀一次之后,selenium服务器在所有进一步的启动时都会挂起,甚至没有尝试获取服务器端口。

After being killed once, selenium server hangs on all further startups without even trying to acquire the server port.

重新启动修复了问题。作为一个不同的用户运行也会使selenium再次启动,但是在 进程被杀死之后它将不再起作用。

Rebooting fixes the problem. Running as a different user makes selenium start up again as well, but after that process gets killed it won't work no more.

这个是在VirtualBox VM中的Linux 2.6.32-5-amd64(debian squeeze)上。在工作当它不是时,某些组件似乎在套接字被绑定之前锁定。 selenium日志没有多大帮助。

This is on Linux 2.6.32-5-amd64 (debian squeeze) in a VirtualBox VM. Looking at a log of the system calls when it's working and when it's not, some component seems to lock up before the socket is even bound. The selenium log isn't of much help.

输出没有不给出任何指示:

The output doesn't give any indication either:

$ java -jar selenium-server-standalone-2.28.0.jar
Dec 27, 2012 5:41:35 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
17:41:35.703 INFO - Java: Sun Microsystems Inc. 14.0-b16
17:41:35.704 INFO - OS: Linux 2.6.32-5-amd64 amd64
17:41:35.737 INFO - v2.28.0, with Core v2.28.0. Built from revision 18309
17:41:35.867 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
17:41:35.868 INFO - Version Jetty/5.1.x
17:41:35.868 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
17:41:35.869 INFO - Started HttpContext[/selenium-server,/selenium-server]
17:41:35.869 INFO - Started HttpContext[/,/]


推荐答案

这是一个Java问题;它的RNG从 / dev / random 中不必要地读取。在VM上,随机池是有限的,并且经常在一次或两次运行后耗尽。由于某种原因,selenium / Jetty启动的一部分要求有问题的RNG。要解决此问题,请建议Java使用 / dev / urandom

This is a Java problem; its RNG needlessly reads from /dev/random. On a VM, the random pool is limited and often exhausted after one or two runs. For some reason, a part of the selenium/Jetty startup asks for the problematic RNG. To fix the problem, advise Java to use /dev/urandom instead:

java -Djava.security.egd=file:/dev/./urandom \
     -jar selenium-server-standalone-2.28.0.jar

工作正常。

这篇关于使用SIGTERM终止后,Selenium Server不会绑定到套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆