Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium: Invalid "already running" error when starting server

Tags:

selenium

I am trying to get the Selenium server up and running. However, when I type:

java -jar selenium-server-standalone-2.0b3.jar 

I get an Exception:

Selenium is already running on port 4444. Or some other service is.

I have tried to stop it, just in case it really is running:

http://localhost:4444/selenium-server/driver/?cmd=shutDown

That gets me the message:

ERROR Server Exception: sessionId should not be null; has this session been started yet?

If I just write:

http://localhost:4444/

I get:

HTTP ERROR: 403
Forbidden for Proxy

Ideas?

like image 884
dkgirl Avatar asked May 04 '11 12:05

dkgirl


People also ask

How to stop Selenium server running on port 4444?

According to this answer you can also hit a URL ( http://localhost:4444/selenium-server/driver?cmd=shutDownSeleniumServer ) at the end of your test to shutdown the Selenium server.

How do I stop selenium server?

is the command to close the opened selenium session. If the session is opened using batch file please remove the '@pause' command if its is used. This is useful when we are trying to stop and start the server during or in between test case execution. "Ctrl + C" is the best option.


1 Answers

This worked for me:

http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer

If selenium server is already running on port 4444 then it will shut down the server and says OKOK if selenium is not running on this port 4444 then by hitting above url will give you "Unable to connect"

like image 195
Andre Avatar answered Sep 17 '22 19:09

Andre