question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node not attaching to hub due to "delay must be less than the maxDuration" error 4.0.0-beta-1-20210215

See original GitHub issue

🐛 Bug Report

version: 4.0.0-beta-1-20210215 When deploy grid in k8s, nodes are not registering with grid. Reason: `kubectl logs test-selenium-chrome-54777b787-f94mf 2021-03-01 16:14:07,017 INFO Included extra file “/etc/supervisor/conf.d/selenium.conf” during parsing 2021-03-01 16:14:07,099 INFO supervisord started with pid 7 2021-03-01 16:14:08,101 INFO spawned: ‘xvfb’ with pid 9 2021-03-01 16:14:08,102 INFO spawned: ‘vnc’ with pid 10 2021-03-01 16:14:08,103 INFO spawned: ‘selenium-node’ with pid 11 2021-03-01 16:14:08,106 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) 2021-03-01 16:14:08,106 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) 2021-03-01 16:14:08,106 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) Configuring server… Setting up SE_NODE_HOST… Setting up SE_NODE_PORT… Starting Selenium Grid Node with configuration: [events] publish = “tcp://test-selenium-hub:4442” subscribe = “tcp://test-selenium-hub:4443”

[node] max-concurrent-sessions = 1

Picked up JAVA_TOOL_OPTIONS: -Xmx700m 16:14:11.505 INFO [LogManager$RootLogger.log] - Using the system default encoding 16:14:11.700 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing 16:14:12.305 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://test-selenium-hub:4442 and tcp://test-selenium-hub:4443 16:14:12.608 INFO [UnboundZmqEventBus.<init>] - Sockets created 16:14:12.709 INFO [UnboundZmqEventBus.<init>] - Event bus ready 16:14:13.199 INFO [NodeServer.createHandlers] - Reporting self as: http://10.5.90.151:5555 16:14:13.409 INFO [NodeOptions.report] - Adding Chrome for {“browserName”: “chrome”} 1 times 16:14:13.500 INFO [Node.<init>] - Binding additional locator mechanisms: name, id Exception in thread “main” java.lang.IllegalStateException: delay must be less than the maxDuration at net.jodah.failsafe.internal.util.Assert.state(Assert.java:38) at net.jodah.failsafe.RetryPolicy.withDelay(RetryPolicy.java:415) at org.openqa.selenium.grid.node.httpd.NodeServer$1.start(NodeServer.java:193) at org.openqa.selenium.grid.node.httpd.NodeServer$1.start(NodeServer.java:183) at org.openqa.selenium.grid.node.httpd.NodeServer.execute(NodeServer.java:224) at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$2(TemplateGridCommand.java:101) at org.openqa.selenium.grid.Main.launch(Main.java:154) at org.openqa.selenium.grid.Main.go(Main.java:88) at org.openqa.selenium.grid.Main.main(Main.java:54) `

To Reproduce

I found the cause, which is part of this commit a) https://github.com/SeleniumHQ/selenium/commit/8500500c82f088e64afc7496e706b4c590e994f0#diff-5e7836f90bf50768ae656f9ddcfec06a3c33e83f277dd0662b67770edcc06f29

Cause: The name of “–register-period” should be “register-period” and not “register-cycle”

b) https://github.com/SeleniumHQ/selenium/blob/selenium-4.0.0-beta-1/java/server/src/org/openqa/selenium/grid/node/config/NodeOptions.java#L89

Here you can see, getRegisterPeriod() calls with name “register-period”, but because there is no “register-period” in a), it defaults to 1, but getRegisterCycle gets 10, hence the above error. “delay must be less than the maxDuration”

Environment

OS: LINUX Language Bindings version: Java Selenium Grid version (if applicable): 4.0.0-beta-1-20210215

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
diemolcommented, Mar 2, 2021

Good catch, thank you for reporting this, @ambirag!

0reactions
ambiragcommented, Apr 13, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

setTimeout callback executed before delay elapses #10154
A possible explanation is that Date.now() is backed by a CLOCK_REALTIME time source (gettimeofday) whereas node/libuv uses a CLOCK_MONOTONIC ...
Read more >
Stub setTimeout inside for loop , while testing - Stack Overflow
I am expecting the test to run through the main function and for loop but not wait for the specified timeout before retrying...
Read more >
Why do I get this Error in Mongodb Node.js Driver?
In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. DID_YOU_STEAL_MY_FOOD (Did ...
Read more >
Addressing Networking Errors in a Microservice Based System
With Kubernetes, DNS requests are handled by coreDNS pods in the cluster. Upon inspection of the metrics, these coreDNS pods rendered no apparent...
Read more >
How to fix Timing Errors in your FPGA design during Place ...
Learn how to fix timing errors in your FPGA design. I show a Verilog example that fails to meet timing, then show how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found