Friday, 28 December 2012

"Failed to start: SocketListener0@0.0.0.0:4444" while Selenium RC Test Execution

Many of us face this common error while trying to execute tests after a successful test run. This is because of the Selenium server that starts on port 4444 and fail to shutdown, throwing an error message on forthcoming tests.

WARN - Failed to start: SocketListener0@0.0.0.0:4444


There are couple of alternate ways to overcome this

#1
1| Open a new tab from your web browser.
2| Copy and paste the below URL.
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
3| Soon-after hitting Enter button, a get response 'okok' will be obtained; it make sure that the Selenium server is shutdown on port 4444.








4| Now, its time to re-run your test on port 4444.

#2
1| Open cmd
2| Force Selenium server to listen port other other than 4444. i.e., 5555 or other
java -jar selenium-server-standalone-x.xx.x.jar -p 5555

4 comments: