Currently Browsing

Posts Tagged ‘ Selenium RC ’

Solution for Selenium already running on port problem

When running selenium server often it happens that it can’t start with the following error:

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

This happens because Selenium uses the 4444 port as its default and if you already started selenium or some other application is using that port Selenium will be prevented from using the same port.

There are several ways around this problem:

  • Find the application that is blocking/using the 4444 port and turn it off or change its port. Using the command “netstat -ano” (under Linux use “netstat –tcp –listening –programs”)¬†from command prompt identify the applications PID and then look it up in task manager. If you don’t see the PID in task manager make sure to turn the column on in View->Select Columns:
    Once you have identified the application either kill it or change its port. Now its safe to run “java -jar selenium-server.jar” and Selenium will start up correctly.
  • Change the port Selenium is using. Run “java -jar selenium-server.jar -port XXXX” where XXXX is the desired unused port for example “java -jar selenium-server.jar -port 4448”.
    This fix is also useful if you want several instances of the selenium server running on the same machine.