Tejaswi Sharma
Tejaswi Sharma

Reputation: 158

Selenium stand alone server hang while starting

I deployed the selenium standalone server on new digital ocean ubuntu 14.04 server. Its not able to start properly. The log its giving is

13:33:57.853 INFO - Launching a standalone server
13:33:57.929 INFO - Java: Oracle Corporation 25.25-b02
13:33:57.930 INFO - OS: Linux 3.13.0-37-generic amd64
13:33:57.950 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
13:33:58.060 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match with current platform: LINUX
13:33:58.191 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
13:33:58.196 INFO - Version Jetty/5.1.x
13:33:58.199 INFO - Started HttpContext[/selenium-server,/selenium-server] 

I guess 2 lines are missing in the log it.

14:54:06.454 INFO - Started SocketListener on 0.0.0.0:4444
14:54:06.462 INFO - Started org.openqa.jetty.jetty.Server@b1bc7ed

Does anybody have any idea why its happening??

Upvotes: 3

Views: 1513

Answers (3)

Vinnie James
Vinnie James

Reputation: 6042

This happened to me due to a port collision. If some other process is running on 4444, Selenium wont start, and Nightwatch doesnt tell you the error.

Changing, the port to 4445, in nightwatch.json, fixed it for me: "selenium" : { ... "port" : 4445,

Upvotes: 0

kullervo16
kullervo16

Reputation: 44

Had the same issue on RHEL 7... was entropy as well

To check whether you have the same issue :

cat /proc/sys/kernel/random/entropy_avail

shows a really low number... (I had 3)

To get it working :

yum install rng-tools systemctl enable rngd.service systemctl start rngd.service

Afterwards the number rose to 3000 and the selenium server came up...

Upvotes: 1

Eugene Dounar
Eugene Dounar

Reputation: 1184

It happens when selenium tries to generate a random seed, but the kernel lacks entropy.

The solution is to install software that adds entropy like haveged. See https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged

Upvotes: 9

Related Questions