Problem in running Grid2 in Jenkins!!!!!

226 views
Skip to first unread message

Rekha

unread,
Feb 10, 2012, 5:06:18 AM2/10/12
to webdriver


Hello All,
I am new for Jenkins.
I have written selenium2 program.
Now I want to integrate my program with Jenkins.
I have installed Selenium2.15.0 plugin in Jenkins.

Here they are using shell scripts for releasing a new build.
They are creating a .rpm file and deploy it in server.

Now i want to run my program.

I checked that grid2 is started running.

------------------------------------------------------------------------------------------------------------------------------------------
Console output in jenkins is listed below
------------------------------------------------------------------------------------------------------------------------------------------

tarting Selenium Grid [jenkins] $ /usr/lib/jvm/java-1.6.0-
openjdk-1.6.0.0/jre/bin/java -cp /var/lib/jenkins/war/WEB-INF/lib/
remoting-2.11.jar hudson.remoting.Launcher -cp /var/lib/jenkins/
plugins/selenium/WEB-INF/lib/selenium-server-standalone-2.15.0.jar -
connectTo localhost:39907 channel started Feb 10, 2012 5:14:34 PM
org.openqa.jetty.http.HttpServer doStart INFO: Version Jetty/5.1.x Feb
10, 2012 5:14:34 PM org.openqa.jetty.util.FileResource INFO: Checking
Resource aliases Feb 10, 2012 5:14:35 PM
org.openqa.jetty.util.Container start INFO: Started
org.openqa.jetty.jetty.servlet.WebApplicationHandler@20f237 Feb 10,
2012 5:14:36 PM org.openqa.jetty.util.Container start INFO: Started
WebApplicationContext[/,/] Feb 10, 2012 5:14:36 PM
org.openqa.jetty.http.SocketListener start INFO: Started
SocketListener on 0.0.0.0:4444 Feb 10, 2012 5:14:36 PM
org.openqa.jetty.util.Container start INFO: Started
org.openqa.jetty.jetty.Server@1d8c528 Grid Hub started on port 4444

------------------------------------------------------------------------------------------------------------------
I tried to start the hub by using the below command
java -jar selenium-server-standalone-2.15.0.jar -role hub
------------------------------------------------------------------------------------------------------------------
But i got error
###########

D:\Software\python>java -jar selenium-server-standalone-2.15.0.jar -
role hub
Feb 10, 2012 5:59:55 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid server
Feb 10, 2012 6:00:03 PM org.openqa.jetty.http.HttpServer doStart
INFO: Version Jetty/5.1.x
Feb 10, 2012 6:00:03 PM org.openqa.jetty.util.FileResource <clinit>
INFO: Checking Resource aliases
Feb 10, 2012 6:00:04 PM org.openqa.jetty.util.Container start
INFO: Started
org.openqa.jetty.jetty.servlet.WebApplicationHandler@37bc2b18
Feb 10, 2012 6:00:04 PM org.openqa.jetty.util.Container start
INFO: Started WebApplicationContext[/,/]
Feb 10, 2012 6:00:04 PM org.openqa.jetty.util.ThreadedServer start
WARNING: Failed to start: SocketL...@0.0.0.0:4444
Exception in thread "main"
org.openqa.jetty.util.MultiException[java.net.BindException: Address
already in use: JVM_Bind]
at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:
686)
at org.openqa.jetty.util.Container.start(Container.java:72)
at org.openqa.grid.web.Hub.start(Hub.java:173)
at
org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:61)
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown
Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at
org.openqa.jetty.util.ThreadedServer.newServerSocket(ThreadedServer.java:
391)
at
org.openqa.jetty.util.ThreadedServer.open(ThreadedServer.java:477)
at
org.openqa.jetty.util.ThreadedServer.start(ThreadedServer.java:503)
at
org.openqa.jetty.http.SocketListener.start(SocketListener.java:202)
at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:
716)
at org.openqa.jetty.util.Container.start(Container.java:72)
at org.openqa.grid.web.Hub.start(Hub.java:173)
at
org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:61)


-----------------------------------------------------------------------------------------------------------------------------
I can able to Start the nodes. It run successfully.
java -jar selenium-server-standalone-2.15.0.jar -role node -hub
----------------------------------------------------------------------------------------------------------------------------

D:\Software\python>java -jar selenium-server-standalone-2.15.0.jar -
role node -hub http://10.1.120.200:4444/grid/register
Feb 10, 2012 6:02:52 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid node
18:02:53.020 INFO - Java: Oracle Corporation 21.1-b02
18:02:53.035 INFO - OS: Windows 7 6.1 amd64
18:02:53.075 INFO - v2.15.0, with Core v2.15.0. Built from revision
15105
18:02:53.342 INFO - RemoteWebDriver instances should connect to:
http://127.0.0.1:5555/wd/hub
18:02:53.344 INFO - Version Jetty/5.1.x
18:02:53.345 INFO - Started HttpContext[/selenium-server/driver,/
selenium-server/driver]
18:02:53.346 INFO - Started HttpContext[/selenium-server,/selenium-
server]
18:02:53.346 INFO - Started HttpContext[/,/]
18:02:53.348 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@3b582503
18:02:53.349 INFO - Started HttpContext[/wd,/wd]
18:02:53.374 INFO - Started SocketListener on 0.0.0.0:5555
18:02:53.374 INFO - Started org.openqa.jetty.jetty.Server@1dbee987
18:02:53.376 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":"*i
explore","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.1
.
120.45","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","maxSession":
5,"hubHost":"10.1.120.200","role":"node","registerCycle":
5000,"hub":"http://10.1.120.200:4444/grid/register","hubPort":
4444,"url":"http://10.1.120.45:5555","remoteHost":"http://
10.1.120.45:5555"}}
18:02:53.387 INFO - starting auto register thread. Will try to
register every 5000 ms.
18:02:53.387 INFO - Registering the node to hub :http://
10.1.120.200:4444/grid/register


Any idea about how to solve this prob and how to run selenium by using
jenkins automatically?


Thank you


Krishnan Mahadevan

unread,
Feb 10, 2012, 5:17:14 AM2/10/12
to webd...@googlegroups.com
If you are using this plugin https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Plugin

then this plugin by default automatically starts a grid for you and as and when you add slave nodes to it, it starts an RC in each of them.

W.r.t your error

org.openqa.jetty.util.MultiException[java.net.BindException: Address
already in use: JVM_Bind]

Java is merely complaining to you that you are trying to make use of the port 4444 but its already been used (probably by the grid that gets started by the plug-in)


The Selenium Jenkins plug-in can work only in a clustered environment (i.e., one jenkins instance is marked as a master instance, and you spawn other jenkins instances which are added to this master as its slave there by forming a clustered build environment)


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"





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


Reply all
Reply to author
Forward
0 new messages