selenium icon indicating copy to clipboard operation
selenium copied to clipboard

unregisterIfStillDownAfter throws exception on 3.x

Open Swapnillll opened this issue 9 years ago • 12 comments

OS:
Windows 10 Selenium Version: 3.5 Browser: NA

unregisterIfStillDownAfter throws exception on 3.x. This works fine on 2.x versions. Note: Setting this property on hub gives exception.

As per https://github.com/SeleniumHQ/selenium/commit/705be71ce9ec7e3825cb1633d3da40ab75a8819f#diff-483a96699f22c3ae9ecb9e5f336a05c2 node has unregisterIfStillDownAfter expected switch. Please confirm its expected.

Exception in thread "main" com.beust.jcommander.ParameterException: Unknown opti on: -unregisterIfStillDownAfter at com.beust.jcommander.JCommander.parseValues(JCommander.java:742) 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$2.setConfiguration(GridLaunch erV3.java:245)

Swapnillll avatar Aug 22 '17 07:08 Swapnillll

How do you use this option? Provide the complete command with all options.

barancev avatar Aug 22 '17 08:08 barancev

java -jar selenium-server-standalone-3.5.0.jar -role hub -unregisterIfStillDownAfter 240000

Exception in thread "main" com.beust.jcommander.ParameterException: Unknown opti on: -unregisterIfStillDownAfter at com.beust.jcommander.JCommander.parseValues(JCommander.java:742) 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$2.setConfiguration(GridLaunch erV3.java:245) at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3. java:155) at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)

Works fine on 2.x java -jar selenium-server-standalone-2.46.0.jar -role hub -unregisterIfStillDownAfter 240000 13:41:54.795 INFO - Launching Selenium Grid hub 2017-08-22 13:41:55.645:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT 2017-08-22 13:41:55.680:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContext Handler{/,null} 2017-08-22 13:41:55.689:INFO:osjs.AbstractConnector:Started [email protected]. 0.0:4444 13:41:55.691 INFO - Nodes should register to http://x.x.x.x:4444/grid/regi ster/ 13:41:55.692 INFO - Selenium Grid hub is up and running

Swapnillll avatar Aug 22 '17 08:08 Swapnillll

This is a node only option.

barancev avatar Aug 22 '17 08:08 barancev

Right, but as below mentioned the hub de registers the node based of unregisterDelay(unregisterIfStillDownAfter ) which is set to 60000 default. I want to increase it so that hub doesn't de-register this node. How can we achieve this at hub level?

if (downFor > unregisterDelay) { addNewEvent(new RemoteUnregisterException(String.format( "Unregistering the node %s because it's been down for %s milliseconds", DefaultRemoteProxy.this, downFor))); }

Swapnillll avatar Aug 22 '17 08:08 Swapnillll

Oh, sorry, I'm wrong then.

barancev avatar Aug 22 '17 08:08 barancev

Did this option actually work in Selenium 2? Yes, it allowed to pass -unregisterIfStillDownAfter to a hub, but did it have any effect?

barancev avatar Sep 23 '17 18:09 barancev

Yes it did have effect, currently we are running all our APPS test from old version of selenium as out test app takes more than 60000 to load and the test fails saying Unregistering the node because it's been down for 60000 milliseconds.

Please let me know if this will be fixed, if not i'll have to pack new jar for each release manually by changing the default to a greater value.

Swapnillll avatar Sep 25 '17 03:09 Swapnillll

I am having a similar issue with when passing config as JSON. I have unregisterIfStillDownAfter in my config. It used to be displayed at <grid-url>/grid/console?config=true&configDebug=true, but now it is missing and it is using the default value of 60000:

hub.json:
{
  ...
  "downPollingLimit": 2,
  "nodeStatusCheckTimeout": 2000,
  "unregisterIfStillDownAfter": 2000,
  "nodePolling": 2000
}

Using 3.6.0: java -jar /home/ubuntu/selenium_server/selenium-server-standalone-3.6.0.jar -hubConfig /home/ubuntu/config/hub.json -role hub

Using 2.53.1: java -jar /home/ubuntu/selenium_server/selenium-server-standalone-2.53.1.jar -hubConfig /home/ubuntu/config/hub.json -role hub

Contents of <grid-url>/grid/console?config=true&configDebug=true:

2.53.1 console:
---------------

Config for the hub :
host : null
port : 4444
cleanUpCycle : 5000
timeout : 300000
browserTimeout : 300000
newSessionWaitTimeout : -1
grid1Mapping : {}
throwOnCapabilityNotPresent : true
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
prioritizer : null
servlets : 

all params :

browserTimeout : 300000
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
cleanUpCycle : 5000
downPollingLimit : 2
host : null
hubConfig : /home/ubuntu/config/hub.json
jettyMaxThreads : -1
maxSession : 8
newSessionWaitTimeout : -1
nodePolling : 2000
nodeStatusCheckTimeout : 2000
port : 4444
prioritizer : null
role : hub
servlets : []
throwOnCapabilityNotPresent : true
timeout : 300000
unregisterIfStillDownAfter : 2000 <======== missing in 3.6.0 below
3.6.0 console:
--------------

Config for the hub :
browserTimeout : 300000
debug : false
help : false
jettyMaxThreads : -1
port : 4444
role : hub
timeout : 300000
enablePassThrough : true
cleanUpCycle : 5000
host : 172.31.32.201
maxSession : 8
hubConfig : /home/ubuntu/config/hub.json
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
newSessionWaitTimeout : -1
throwOnCapabilityNotPresent : true
Config details :
hub launched with : -browserTimeout 300000 -debug false -help false -jettyMaxThreads -1 -port 4444 -role hub -timeout 300000 -enablePassThrough true -cleanUpCycle 5000 -host 172.31.32.201 -maxSession 8 -hubConfig /home/ubuntu/config/hub.json -capabilityMatcher org.openqa.grid.internal.utils.DefaultCapabilityMatcher -newSessionWaitTimeout -1 -throwOnCapabilityNotPresent true

Note from the console page that unregisterIfStillDownAfter (and the polling params) are missing in 3.6.0. They are also missing from hub launched with, so they may have been ignored/parsed out of the command which may be why it does not throw an error for me and why my values are not being used.

ryanlevell avatar Sep 29 '17 17:09 ryanlevell

@Swapnillll @ryanlevell is this error still happening with the latest release? If so, how could we reproduce it?

diemol avatar Apr 07 '20 18:04 diemol

I am not currently maintaining a grid, but if the above steps are no longer valid or cannot reproduce in the latest version then it may no longer be an issue.

ryanlevell avatar Apr 07 '20 19:04 ryanlevell

Thank you for replying, I’m going to go ahead and close this. In case someone still has this issue, please feel free to open a new one with the complete template filled out.

diemol avatar Apr 07 '20 20:04 diemol

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar May 20 '20 23:05 lock[bot]