How to shutdown Selenium Grid2 server? How to shutdown Selenium Grid2 server? selenium selenium

How to shutdown Selenium Grid2 server?


The Selenium Grid2 server has a lifecycle manager that you can use to shut it down.

You can activate it by visiting this url:

http://yourHubIP:4444/lifecycle-manager?action=shutdown

This will quit the server, you can use a command line tool like wget for windows to hit it.

wget --post-data action=shutdown action=shutdown http://localhost:4444/lifecycle-manager

It does not have anymore actions at this moment, I looked at the code. Also this doesn't do a graceful shutdown, all running tests will be killed instantly.


cmd.exe and java process are marred by same problem of non-identifiable child process running in them. Fortunately java has a solution and we can use that.

I guess you are using something like java -jar selenium-server.jar in your batch file. If yes then the selenium server is running as java process. So there is no need to kill cmd.exe. Instead you have to identify the java process running selenium server.

In order to identify java process, use jps -l on command prompt. 'jps' comes with jdk by default, and it will tell you the process id of the selenium server running. You can simply kill this process.

Hope this would solve the problem.


I think you can have your answer here by specifying the selenium grid port.