groupon / Selenium-Grid-Extras

Simplify the management of the Selenium Grid Nodes and stabilize said nodes by cleaning up the test environment after the build has been completed
BSD 3-Clause "New" or "Revised" License
536 stars 209 forks source link

"-debug false" and "-help false" parameters breaks selenium hub for selenium >= 3.5.0 #376

Open zsucic opened 6 years ago

zsucic commented 6 years ago

Hi guys, I'm having problems starting SGE 1.12.17 where hub doesn't start ok. I tried digging a bit through logs and I think I found a culprit. It seems that ever since selenium 3.5.0 (i.e. http://selenium-release.storage.googleapis.com/index.html?path=3.5/ and later) the selenium grid doesn't accept "false" as a parameter. This is not in accordance to seleniums "help" which lists -debug as being able to receive "true" or "false", i.e. ... -debug

: enables LogLevel.FINE. Default: false ... But, I tried with various versions, and it seems that the first version with this issue is 3.5.0. (see logs bellow) And this is important because if you run SGE and then go to: http://localhost:4444/grid/console?config=true&configDebug=true you'll see: hub launched with : -browserTimeout 120000 **-debug false -help false** -log log/hub_4444.log -port 4444 -role hub -timeout 120000 -enablePassThrough true -cleanUpCycle 5000 -host 127.0.0.1 -maxSession 5 -servlets com.groupon.seleniumgridextras.grid.servlets.ProxyStatusJsonServlet -hubConfig hub_4444.json -capabilityMatcher org.openqa.grid.internal.utils.DefaultCapabilityMatcher -newSessionWaitTimeout 25000 -throwOnCapabilityNotPresent true -registry org.openqa.grid.internal.DefaultGridRegistry and both of these seem to cause issues with selenium 3.5 and later... Since neither parameter is critical for SGE operation, I would suggest changing the SGE code to execute selenium grid without them completely rather than waiting for selenium guys to fix this. Here are the logs. 3.4.0 -> zeljko_sucic@ZAG0015:/storage/SeleniumGrid$ java -jar selenium-server-standalone-3.4.0.jar -debug false 15:00:41.273 INFO - Selenium build info: version: '3.4.0', revision: 'unknown' 15:00:41.274 INFO - Launching a standalone Selenium Server 3.5.0 -> zeljko_sucic@ZAG0015:/storage/SeleniumGrid$ java -jar selenium-server-standalone-3.5.0.jar -debug false Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter 'false' but no main parameter was defined at com.beust.jcommander.JCommander.getMainParameter(JCommander.java:914) at com.beust.jcommander.JCommander.parseValues(JCommander.java:759) at com.beust.jcommander.JCommander.parse(JCommander.java:282) at com.beust.jcommander.JCommander.parse(JCommander.java:265) at com.beust.jcommander.JCommander.(JCommander.java:210) at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:227) at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155) at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)
zsucic commented 6 years ago

Forgot to mention, the behavior for regular users is that SGE starts up without reporting any issue, but when you try to get a new session you get a "Empty pool of VM for setup Capabilities" The reason for this behavior is that hub didn't actually start properly, so the node doesn't connect to it and then there are no capabilities to work with.