Selenium server hangs from command line

508 views
Skip to first unread message

Paul Robbins

unread,
Sep 27, 2011, 5:58:30 PM9/27/11
to Selenium Users
I'm trying to run some selenium tests from a batch file. It goes:
java -jar selenium-server-standalone-2.5.0.jar
nosetests test_1.py
nosetests test_2.py
etc.

When I try to run the batch script it gives me this output and hangs.
C:\Users\User\Desktop\Selenium\Tests>java -jar selenium-se
rver-standalone-2.5.0.jar -timeout 600
Sep 27, 2011 2:54:17 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
14:54:18.391 INFO - Java: Sun Microsystems Inc. 19.1-b02
14:54:18.391 INFO - OS: Windows 7 6.1 amd64
14:54:18.406 INFO - v2.5.0, with Core v2.5.0. Built from revision
13516
14:54:18.531 INFO - RemoteWebDriver instances should connect to:
http://127.0.0.
1:4444/wd/hub
14:54:18.531 INFO - Version Jetty/5.1.x
14:54:18.531 INFO - Started HttpContext[/selenium-server/driver,/
selenium-server
/driver]
14:54:18.531 INFO - Started HttpContext[/selenium-server,/selenium-
server]
14:54:18.531 INFO - Started HttpContext[/,/]
14:54:18.562 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@604e28
0c
14:54:18.562 INFO - Started HttpContext[/wd,/wd]
14:54:18.578 INFO - Started SocketListener on 0.0.0.0:4444
14:54:18.578 INFO - Started org.openqa.jetty.jetty.Server@3d434234

I've tried googling but haven't come up with anything except
indecipherable error logs. Any ideas?

Mike

unread,
Sep 28, 2011, 11:52:06 AM9/28/11
to Selenium Users
I believe you need to use the -role switch. I have never started it
without that switch, but this looks to me as if it started up in the
hub role. Here is how I start my hub:
java -jar selenium-server-standalone.jar"-role hub -nodeTimeout 600

And here is the output you see when it starts up:

Sep 20, 2011 4:29:47 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid server
Sep 20, 2011 4:29:48 PM org.openqa.jetty.http.HttpServer doStart
INFO: Version Jetty/5.1.x
Sep 20, 2011 4:29:48 PM org.openqa.jetty.util.FileResource <clinit>
INFO: Checking Resource aliases
Sep 20, 2011 4:29:48 PM org.openqa.jetty.util.Container start
INFO: Started
org.openqa.jetty.jetty.servlet.WebApplicationHandler@b2a2d8
Sep 20, 2011 4:29:49 PM org.openqa.jetty.util.Container start
INFO: Started WebApplicationContext[/,/]
Sep 20, 2011 4:29:49 PM org.openqa.jetty.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:4444
Sep 20, 2011 4:29:49 PM org.openqa.jetty.util.Container start
INFO: Started org.openqa.jetty.jetty.Server@f38798

To start it up in WebDriver mode I use this:
java -jar selenium-server-standalone.jar -role webdriver -hub
http://10.0.2.208:4444/grid/register

If you are not using a Grid server you can leave off the -hub switch,
which registers it with the Grid server.

I hope that helps.

Mike

François Reynaud

unread,
Sep 29, 2011, 6:00:54 AM9/29/11
to seleniu...@googlegroups.com
your first line java -jar selenium-server-standalone-2.5.0.jar starts a web server. The web server never stops. It remains there to recieve requests.
You need to start your tests from a different console.

thanks,
François


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Paul Robbins

unread,
Oct 11, 2011, 4:08:08 PM10/11/11
to Selenium Users
Awesome. Thanks!

On Sep 29, 3:00 am, François Reynaud <francois.reyn...@gmail.com>
wrote:

suresh vemuri

unread,
Oct 12, 2011, 7:01:07 AM10/12/11
to Selenium Users
For selenium-server-standalone-2.8.0 ( Webdriver ), after started the
server through command window, if I run test from Eclipse, can I see
the information like I saw with RC. Now I don't see such type of
messages on the console (command window).
I used to see the informative messages on the command window (after
started the server).

Am I doing anything wrong?

Regards
Reply all
Reply to author
Forward
0 new messages