the grid console is ok? run remote mode with driver version: unknown, anyworkaround? thanks

682 views
Skip to first unread message

xiaoyan Zheng

unread,
Jan 14, 2015, 12:39:31 AM1/14/15
to seleniu...@googlegroups.com


[aime@slc01bmk ~/Downloads]$ java -jar selenium-server-standalone-2.43.1.jar -role node -hub http://localhost:4444/grid/register -webdriver.firefox.bin="/usr/bin/firefox"
21:28:52.851 INFO - Launching a selenium grid node
21:28:53.350 INFO - Java: Oracle Corporation 24.45-b08
21:28:53.350 INFO - OS: Linux 3.8.13-16.2.1.el6uek.x86_64 amd64
21:28:53.358 INFO - v2.43.1, with Core v2.43.1. Built from revision 5163bce
21:28:53.441 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
21:28:53.467 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
21:28:53.469 INFO - Version Jetty/5.1.x
21:28:53.470 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
21:28:53.470 INFO - Started HttpContext[/selenium-server,/selenium-server]
21:28:53.471 INFO - Started HttpContext[/,/]
21:28:53.479 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@4e561369
21:28:53.479 INFO - Started HttpContext[/wd,/wd]
21:28:53.481 INFO - Started SocketListener on 0.0.0.0:5555
21:28:53.481 INFO - Started org.openqa.jetty.jetty.Server@5a5208a0
21:28:53.483 INFO - using the json request : {"class":"org.openqa.grid.common.RegistrationRequest","capabilities":[{"platform":"LINUX","seleniumProtocol":"Selenium","browserName":"*firefox","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"Selenium","browserName":"*googlechrome","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"Selenium","browserName":"*iexplore","maxInstances":1},{"platform":"LINUX","seleniumProtocol":"WebDriver","browserName":"firefox","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"WebDriver","browserName":"chrome","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"WebDriver","browserName":"internet explorer","maxInstances":1}],"configuration":{"port":5555,"register":true,"host":"10.245.30.168","webdriver.firefox.bin=/usr/bin/firefox":"","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","maxSession":5,"role":"node","hubHost":"localhost","registerCycle":5000,"hub":"http://localhost:4444/grid/register","hubPort":4444,"url":"http://10.245.30.168:5555","remoteHost":"http://10.245.30.168:5555"}}
21:28:53.484 INFO - Starting auto register thread. Will try to register every 5000 ms.
21:28:53.484 INFO - Registering the node to hub :http://localhost:4444/grid/register
21:30:39.902 INFO - Executing: [new session: Capabilities [{platform=ANY, browserName=firefox, version=}]])
21:30:39.918 INFO - Creating a new session for Capabilities [{platform=ANY, browserName=firefox, version=}]
21:30:42.129 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'slc01bmk.us.oracle.com', ip: '10.245.30.168', os.name: 'Linux', os.arch: 'amd64', os.version: '3.8.13-16.2.1.el6uek.x86_64', java.version: '1.7.0_45'
Driver info: driver.version: unknown
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:176)
    at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:112)
    at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:89)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:108)
    at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:57)
    at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
    at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:112)
    at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:173)
    at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:201)
    at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:163)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:129)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
    at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'slc01bmk.us.oracle.com', ip: '10.245.30.168', os.name: 'Linux', os.arch: 'amd64', os.version: '3.8.13-16.2.1.el6uek.x86_64', java.version: '1.7.0_45'
Driver info: driver.version: unknown
    at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:69)
    at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:53)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:54)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:215)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:59)
    ... 9 more
Caused by: org.openqa.selenium.UnsupportedCommandException: Bad request

Command duration or timeout: 19 milliseconds
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'slc01bmk.us.oracle.com', ip: '10.245.30.168', os.name: 'Linux', os.arch: 'amd64', os.version: '3.8.13-16.2.1.el6uek.x86_64', java.version: '1.7.0_45'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:104)
    ... 14 more
21:30:42.138 WARN - Exception: Bad request

Command duration or timeout: 19 milliseconds
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'slc01bmk.us.oracle.com', ip: '10.245.30.168', os.name: 'Linux', os.arch: 'amd64', os.version: '3.8.13-16.2.1.el6uek.x86_64', java.version: '1.7.0_45'
Driver info: org.openqa.selenium.firefox.FirefoxDriver


Message has been deleted

Alasdair Macmillan

unread,
Jan 14, 2015, 3:43:05 AM1/14/15
to seleniu...@googlegroups.com
> Creating a new session for Capabilities [{platform=ANY, browserName=firefox, version=}]

You could try either specifying a Firefox version, or not passing the "version" parameter in your new session request.

You could also change the command line argument "-role node" to "-role wd". This will prevent the node from registering browsers which use the older Selenium protocol (I'm a bit vague on what that is).

Thanks,

Alasdair

xiaoyan Zheng

unread,
Jan 14, 2015, 4:44:50 AM1/14/15
to seleniu...@googlegroups.com
 Thank you Alasdair, after capability.setVersion("31.3"). error is different. any idea?

 Here is the log
org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities [{platform=ANY, browserName=firefox, version=31.3}]

Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
at com.oracle.bpm.test.aa.testcase.SeleniumTest.createWebDriver(SeleniumTest.java:126)
at com.oracle.bpm.test.aa.testcase.SeleniumTest.createClusterSelenium(SeleniumTest.java:108)
at com.oracle.bpm.test.aa.testcase.SeleniumTest.initializeSelenium(SeleniumTest.java:100)
at com.oracle.bpm.test.aa.testcase.SeleniumTest.setUp(SeleniumTest.java:96)
at com.oracle.bpm.test.aa.testcase.bpmworkspace.BPMWorkBaseTest.setUp(BPMWorkBaseTest.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.openqa.grid.common.exception.GridException: Error forwarding the new session cannot find : Capabilities [{platform=ANY, browserName=firefox, version=31.3}]
at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:114)
at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:83)
at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.seleniumhq.jetty7.servlet.ServletHolder.handle(ServletHolder.java:565)
at org.seleniumhq.jetty7.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.seleniumhq.jetty7.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.seleniumhq.jetty7.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.seleniumhq.jetty7.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.seleniumhq.jetty7.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.seleniumhq.jetty7.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.seleniumhq.jetty7.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.seleniumhq.jetty7.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.seleniumhq.jetty7.server.Server.handle(Server.java:349)
at org.seleniumhq.jetty7.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at org.seleniumhq.jetty7.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.seleniumhq.jetty7.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
at org.seleniumhq.jetty7.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
at org.seleniumhq.jetty7.http.HttpParser.parseNext(HttpParser.java:857)
at org.seleniumhq.jetty7.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.seleniumhq.jetty7.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.seleniumhq.jetty7.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.seleniumhq.jetty7.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.seleniumhq.jetty7.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:744)

在 2015年1月14日星期三 UTC+8下午4:43:05,Alasdair Macmillan写道:

Alasdair Macmillan

unread,
Jan 14, 2015, 7:51:00 AM1/14/15
to seleniu...@googlegroups.com
Hi Xaioyan,

Your nodes have to have set the "browserVersion" for the firefox browser to be 31.3 for that to work. For example:

{"platform":"LINUX","seleniumProtocol":"WebDriver","browserName":"firefox","maxInstances":5, browserVersion: "31.3"}

Having just re-read the browser configuration for your node, I note that you currently have:

configuration":{"port":5555,"register":true,"host":"10.245.30.168","webdriver.firefox.bin=/usr/bin/firefox":"","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy" ...

"webdriver.firefox.bin=/usr/bin/firefox":"" -- this bit seems incorrect, and could have been the cause of your original problem. It should actually read: "webdriver.firefox.bin": "/usr/bin/firefox"

Thanks,

Alasdair

Ashish b lal

unread,
Jan 14, 2015, 7:55:39 AM1/14/15
to seleniu...@googlegroups.com
Hi ,
My remote node is not connecting to hub.
What all network setting i have to do.
Presently i am using my company networks.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6bdc483a-03bb-4f40-8eb2-c578c287f581%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Hope to hear soon from you.
    
Thanks & Regards,
Ashish.B.LAL

xiaoyan Zheng

unread,
Jan 15, 2015, 1:28:46 AM1/15/15
to seleniu...@googlegroups.com
Hi Alasdair:
    
  Thanks for your help again, i add browserVersion in both command and webconfig.txt and change -webdriver.firefox.bin="/usr/bin/firefox" to -webdriver.firefox.bin "/usr/bin/firefox".

java -jar selenium-server-standalone-2.43.1.jar -le node -wd http://localhost:4444/grid/register -webdriver.firefox.bin "/usr/bin/firefox" -browserVersion "31.3" -nodeConfig webconfig.txt

Unfortunately, when i run case, it still has such errors, any idea?
22:21:02.065 INFO - Registering the node to hub :http://10.245.30.168:4444/grid/register
22:21:11.683 INFO - Executing: [new session: Capabilities [{platform=ANY, browserName=firefox, version=}]])
22:21:11.727 INFO - Creating a new session for Capabilities [{platform=ANY, browserName=firefox, version=}]
22:21:14.602 WARN - Exception thrown

java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'slc01bmk.us.oracle.com', ip: '10.245.30.168', os.name: 'Linux', os.arch: 'amd64', os.version: '3.8.13-16.2.1.el6uek.x86_64', java.version: '1.7.0_45'
Driver info: driver.version: unknown
-------------------------------------------------------------------------
Here is the config and webconfig.txt:
using the json request : {"class":"org.openqa.grid.common.RegistrationRequest","capabilities":[{"seleniumProtocol":"WebDriver","platform":"LINUX","acceptSslCerts":true,"javascriptEnabled":true,"browserVersion":"31.3","browserName":"firefox","maxInstances":5,"takesScreenshot":true},{"seleniumProtocol":"WebDriver","platform":"LINUX","browserName":"chrome","maxInstances":5}],"configuration":{"nodeConfig":"webconfig.txt","port":5555,"browserVersion":"31.3","host":"10.245.30.168","cleanUpCycle":2000,"hubHost":"10.245.30.168","registerCycle":5000,"url":"http://10.245.30.168:5555","remoteHost":"http://10.245.30.168:5555","register":true,"proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","webdriver.firefox.bin":"/usr/bin/firefox","maxSession":5,"role":"node","wd":"http://localhost:4444/grid/register","hubPort":4444,"timeout":30000}}


webconfig.txt
{
"capabilities":
[
{
"browserName":"firefox",
"browserVersion":"31.3",
"acceptSslCerts":true,
"javascriptEnabled":true,
"takesScreenshot":true,
"maxInstances":5,
"platform":"LINUX"

},
{
"browserName":"chrome",
 "maxInstances":5
}
],
"configuration":
{
"cleanUpCycle":2000,
"timeout":30000,
"maxSession":5,
"port": 5555,
"host": 10.245.30.168,
"register": true,
"hubPort" : 4444
}
}
~   

Alasdair Macmillan

unread,
Jan 15, 2015, 3:59:34 AM1/15/15
to seleniu...@googlegroups.com
Hi Xaioyan,

I now notice the bottom of your stacktrace:



   
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)

Its already launched Firefox at this point, but something in Firefox doesn't like the new session request.

I would double-check the version of firefox, to make sure you're using the right one - run "firefox -version" and "/usr/bin/firefox -version" and see what you get.

You can also try stripping out some of the optional parameters (acceptSslCerts, javascriptEnabled, takesScreenshot) and see if that helps.

Also try to get Chrome running on the same node - it may help debug the issue.

Good luck,

Alasdair
Reply all
Reply to author
Forward
0 new messages