Webdriver Grid setup

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Webdriver Grid setup

nurav
Hi Tarun,

I want to run my scripts using grid execution.Steps done till now
 - Navigate to the folder where i have placed selenium-server-standalone-2.21.0.jar thru CMD prompt
 - Ran java -jar selenium-server-standalone-2.14.0.jar -role node  -hub http://localhost:4444/grid/register 

But here i am getting an errors
WARNING: error getting the parameters from the hub. The node may end up with wrong timeouts.A JSONObject text must begin with '{' at character 1
Registering the node to hub :http://localhost:-1/grid/register
couldn't register this node : Error sending the registration request.

My Machine itself is a server

App URL: localhost
port : 80

Can you please let me know the exact step to configure the grid execution.

Thanks,
Varun
Reply | Threaded
Open this post in threaded view
|

Re: Webdriver Grid setup

softwaretestingforum
Administrator
Hi Nurav,

You mentioned -  selenium-server-standalone-2.21.0.jar but you use 2.14.0 when starting node -

< java -jar selenium-server-standalone-2.14.0.jar -role node  -hub http://localhost:4444/grid/register >

Do you see discrepancy?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Webdriver Grid setup

nurav
Hey Tarun ..sorry for confusing...

I used this....java -jar selenium_2.21.jar -role node  -hub http://localhost/grid/register

Error:

May 23, 2012 12:06:13 PM org.openqa.grid.internal.utils.SelfRegisteringRemote startRemoteServer
WARNING: error getting the parameters from the hub. The node may end up with wrong timeouts.A JSONObject text must begin with '{' at character 1
12:06:13.250 INFO - Java: Sun Microsystems Inc. 11.3-b02
12:06:13.250 INFO - OS: Windows XP 5.1 x86
12:06:13.250 INFO - v2.21.0, with Core v2.21.0. Built from revision 16552
12:06:13.390 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
12:06:13.484 INFO - Version Jetty/5.1.x
12:06:13.484 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
12:06:13.484 INFO - Started HttpContext[/selenium-server,/selenium-server]
12:06:13.484 INFO - Started HttpContext[/,/]
12:06:13.500 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@149b290
12:06:13.500 INFO - Started HttpContext[/wd,/wd]
12:06:13.687 INFO - Started SocketListener on 0.0.0.0:5555
12:06:13.687 INFO - Started org.openqa.jetty.jetty.Server@c09554
12:06:13.703 INFO - using the json request : {"class":"org.openqa.grid.common.RegistrationRequest","capabilities":[{"seleniumProtocol":"Selenium","browserName":"*firefox","maxInstances":5},{"seleniumProtocol":"Selenium","browserName":"*googlechrome","maxInstances":5},{"seleniumProtocol":"Selenium","browserName":"*iexplore","maxInstances":1},{"seleniumProtocol":"WebDriver","browserName":"firefox","maxInstances":5},{"seleniumProtocol":"WebDriver","browserName":"chrome","maxInstances":5},{"seleniumProtocol":"WebDriver","browserName":"internet explorer","maxInstances":1}],"configuration":{"port":5555,"register":true,"host":"10.135.48.127","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","maxSession":5,"hubHost":"localhost","role":"node","registerCycle":5000,"hub":"http://localhost/grid/register","hubPort":-1,"url":"http://10.135.48.127:5555","remoteHost":"http://10.135.48.127:5555"}}
12:06:13.718 INFO - starting auto register thread. Will try to register every 5000 ms.
12:06:13.718 INFO - Registering the node to hub :http://localhost:-1/grid/register
12:06:13.734 INFO - couldn't register this node : Error sending the registration request.
12:06:18.734 INFO - couldn't register this node : hub down or not responding.
12:06:23.765 INFO - couldn't register this node : hub down or not responding.
12:06:25.546 INFO - Shutting down...
12:06:25.546 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=5555]


Reply | Threaded
Open this post in threaded view
|

Re: Webdriver Grid setup

softwaretestingforum
Administrator
Let us ignore this warning for time being -

WARNING: error getting the parameters from the hub. The node may end up with wrong timeouts.A JSONObject text must begin with '{' at character 1 

Coming to -

java -jar selenium-server-standalone-2.21.jar -role node  -hub http://localhost:4444/grid/register 

Are you running hub and node on same machine, if not then you need to give ip address of hub when starting node, as you eventually get this error -

12:06:13.734 INFO - couldn't register this node : Error sending the registration request. 
12:06:18.734 INFO - couldn't register this node : hub down or not responding. 
12:06:23.765 INFO - couldn't register this node : hub down or not responding. 
12:06:25.546 INFO - Shutting down... 
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Webdriver Grid setup

Samesituation
Was this issue resolved? I'm facing the exact same issue while trying to register node to hub runnning on the same machine. Note that I've verifed server to be up & running on the browser.

Any thoughts/clues?