SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.7k stars 8.19k forks source link

[Selenium 4][Grid] Unknown command: (POST) /session after trying to run my grid tests on a remote machine. #8783

Closed jacorgaz closed 3 years ago

jacorgaz commented 4 years ago

🐛 Bug Report

org.openqa.selenium.UnsupportedCommandException: **Unknown command: (POST) /session.

To Reproduce

On Hub machine (Mac OS) run java -jar selenium-server-4.0.0-alpha-1.jar hub

On remote Node Machine (Windows 10) run java -jar selenium-server-4.0.0-alpha-1.jar node --detect-drivers --publish-events tcp://hub:4442 --subscribe-events tcp://hub:4443 . Drivers are located in the same folder as the Selenium Server jar

Test script

Capabilities:

String nodeURL = "http://{nodeIP}:5555";
DesiredCapabilities capability = new DesiredCapabilities();
capability.setBrowserName("chrome");
RemoteWebDriver driver = new RemoteWebDriver(new URL(nodeURL),capability);

Logs

HUB:

16:15:57.470 INFO [EventBusConfig.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
16:15:57.566 INFO [BoundZmqEventBus.<init>] - XPUB binding to [binding to tcp://*:4442, advertising as tcp://10.3.5.202:4442], XSUB binding to [binding to tcp://*:4443, advertising as tcp://10.3.5.202:4443]
16:15:57.659 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://{hubIP}:4442 and tcp://{hubIP}:4443
16:15:57.664 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:15:57.666 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
16:15:57.770 INFO [BoundZmqEventBus.<init>] - Event bus ready
16:15:57.953 INFO [Log.initialized] - Logging initialized @797ms to org.seleniumhq.jetty9.util.log.JavaUtilLog
16:15:58.103 INFO [Server.doStart] - jetty-9.4.z-SNAPSHOT; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 1.8.0_211-b12
16:15:58.154 INFO [ContextHandler.doStart] - Started o.s.j.s.ServletContextHandler@7f552bd3{/,null,AVAILABLE}
16:15:58.169 INFO [AbstractConnector.doStart] - Started ServerConnector@47920b47{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
16:15:58.169 INFO [Server.doStart] - Started @1014ms

NODE:

16:16:24.585 INFO [EventBusConfig.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
16:16:25.024 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://{hubIP}:4442 and tcp://{hubIP}:4443
16:16:25.075 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:16:25.079 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
16:16:30.125 INFO [NodeOptions.lambda$null$1] - Adding Capabilities {browserName: chrome} 9 times
16:16:30.128 INFO [NodeOptions.lambda$null$1] - Adding Capabilities {browserName: firefox} 9 times
16:16:30.128 INFO [NodeOptions.lambda$null$1] - Adding Capabilities {browserName: internet explorer} 1 times
16:16:30.457 INFO [Log.initialized] - Logging initialized @6337ms to org.seleniumhq.jetty9.util.log.JavaUtilLog
16:16:30.543 INFO [Server.doStart] - jetty-9.4.z-SNAPSHOT; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 1.8.0_171-b11
16:16:30.576 INFO [ContextHandler.doStart] - Started o.s.j.s.ServletContextHandler@7b9a4292{/,null,AVAILABLE}
16:16:30.590 INFO [AbstractConnector.doStart] - Started ServerConnector@6c64cb25{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
16:16:30.591 INFO [Server.doStart] - Started @6471ms

IDE Error after running test:

org.openqa.selenium.UnsupportedCommandException: Unknown command: (POST) /session
Build info: version: '4.0.0-alpha-1', revision: 'd1d3728cae', time: '2019-04-24T16:15:34'
System info: host: 'DESKTOP-V1BPR5G', ip: '{nodeip}', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown
Build info: version: '4.0.0-alpha-6', revision: '5f43a29cfc'
System info: host: 'ci-osx3', ip: '{hubIP}', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '9'
Driver info: driver.version: RemoteWebDriver
remote stacktrace: org.openqa.selenium.UnsupportedCommandException: Unknown command: (POST) /session
Build info: version: '4.0.0-alpha-1', revision: 'd1d3728cae', time: '2019-04-24T16:15:34'
System info: host: 'DESKTOP-V1BPR5G', ip: ''{nodeip}', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown
    at org.openqa.selenium.grid.server.CommandHandlerServlet.lambda$new$0(CommandHandlerServlet.java:46)
    at org.openqa.selenium.grid.server.W3CCommandHandler.execute(W3CCommandHandler.java:48)
    at org.openqa.selenium.grid.server.CommandHandlerServlet.service(CommandHandlerServlet.java:58)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:865)
    at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
    at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
    at org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
    at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
    at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
    at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
    at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
    at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
    at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
    at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.seleniumhq.jetty9.server.Server.handle(Server.java:503)
    at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:364)
    at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:260)
    at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
    at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:103)
    at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
    at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
    at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
    at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
    at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:132)
    at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
    at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
    at java.lang.Thread.run(Unknown Source)

Environment

OS Hub: 10.15.1 OS Node: Win 10 Pro Browser: Chrome Browser version: 86.0.4240.75 Browser Driver version: ChromeDriver 86.0.4240.22 Java version Hub : 1.8.0_211-b12 Java version Node : 1.8.0_171 Selenium Grid version: 4

diemol commented 4 years ago

@jacorgaz I see a mix of 4.0.0-alpha-1 and 4.0.0-alpha-6 in the logs, could you please test only with 4.0.0-alpha-6 and report back?

jacorgaz commented 4 years ago

Hi,

On the node windows machine after running Beta 6 java -jar selenium-server-4.0.0-alpha-6.jar node --detect-drivers --publish-events tcp://{hubIP}:4442 --subscribe-events tcp://{hubIP}:4443

i get the following message:

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
"--detect-drivers": couldn't convert "--publish-events" to a boolean
Usage: node [options]

I have tried with the 4.0.0-alpha-5 & 4.0.0-alpha-4 but after launching the test On the hub machine i get :

org.openqa.selenium.UnsupportedCommandException: Unable to find handler for (POST) /session
Build info: version: '4.0.0-alpha-5', revision: 'b3a0d621cc'
System info: host: 'ci-osx3.mo2o.com', ip: '{hubIP}', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '9'
Driver info: driver.version: RemoteWebDriver
remote stacktrace: 

    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
    at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
    at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
    at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$1(ProtocolHandshake.java:126)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
    at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
    at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:476)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:139)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:582)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:136)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:149)
    at utils.DriverFactory.createNewDriverInstance(DriverFactory.java:106)
    at tests.BaseTest.beforeMethod(BaseTest.java:96)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
    at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
    at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:340)
    at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:294)
    at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:683)
    at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:510)
    at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:172)
    at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
    at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:804)
    at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1378)
    at org.testng.TestRunner.privateRun(TestRunner.java:770)
    at org.testng.TestRunner.run(TestRunner.java:591)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:402)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355)
    at org.testng.SuiteRunner.run(SuiteRunner.java:304)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1102)
    at org.testng.TestNG.runSuites(TestNG.java:1032)
    at org.testng.TestNG.run(TestNG.java:1000)
    at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73)
    at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)

HUB Beta 5(Mac):

14:16:59.835 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
14:16:59.915 INFO [BoundZmqEventBus.<init>] - XPUB binding to [binding to tcp://*:4442, advertising as tcp://{hubIP}:4442], XSUB binding to [binding to tcp://*:4443, advertising as tcp://{hubIP}]
14:16:59.996 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://{hubIP} and tcp://{hubIP}:4443
14:17:00.002 INFO [UnboundZmqEventBus.<init>] - Sockets created
14:17:00.005 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
14:17:00.215 INFO [BoundZmqEventBus.<init>] - Event bus ready
14:17:00.472 INFO [Hub.lambda$configure$0] - Started Selenium hub 4.0.0-alpha-5 (revision b3a0d621cc)

NODE Beta 5 (Windows)

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
14:17:08.939 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
14:17:09.278 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://{hubIP}:4442 and tcp://{hubIP}:4443
14:17:09.326 INFO [UnboundZmqEventBus.<init>] - Sockets created
14:17:09.329 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
14:17:09.794 INFO [NodeServer.lambda$configure$1] - Reporting self as: http://10.0.75.1:5555
14:17:10.983 INFO [NodeServer.lambda$configure$1] - Started Selenium node 4.0.0-alpha-5 (revision b3a0d621cc)

HUB Beta 4(Mac):

14:21:50.749 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
14:21:50.850 INFO [BoundZmqEventBus.<init>] - XPUB binding to [binding to tcp://*:4442, advertising as tcp://10.3.5.202:4442], XSUB binding to [binding to tcp://*:4443, advertising as tcp://{hubIP}:4443]
14:21:50.922 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://{hubIP}:4442 and tcp://{hubIP}:4443
14:21:50.927 INFO [UnboundZmqEventBus.<init>] - Sockets created
14:21:50.929 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
14:21:51.139 INFO [BoundZmqEventBus.<init>] - Event bus ready
14:21:51.402 INFO [AbstractInternalLogger.log] - [id: 0x7b2d776c] REGISTERED
14:21:51.404 INFO [AbstractInternalLogger.log] - [id: 0x7b2d776c] BIND: 0.0.0.0/0.0.0.0:4444
14:21:51.407 INFO [AbstractInternalLogger.log] - [id: 0x7b2d776c, L:/0:0:0:0:0:0:0:0:4444] ACTIVE
14:21:51.408 INFO [Hub.lambda$configure$0] - Started Selenium hub 4.0.0-alpha-4 (revision c2d955b49e)
14:22:10.944 INFO [HttpTracing.inject] - Injecting (GET) /status into NoopSpan at org.openqa.selenium.grid.node.remote.RemoteNode:149

NODE Beta 4 (Windows)

14:22:06.488 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
14:22:06.846 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://10.3.5.202:4442 and tcp://10.3.5.202:4443
14:22:06.890 INFO [UnboundZmqEventBus.<init>] - Sockets created
14:22:06.893 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
14:22:11.951 INFO [NodeOptions.lambda$addSystemDrivers$1] - Adding Capabilities {browserName: chrome} 9 times
14:22:11.954 INFO [NodeOptions.lambda$addSystemDrivers$1] - Adding Capabilities {browserName: firefox} 9 times
14:22:11.955 INFO [NodeOptions.lambda$addSystemDrivers$1] - Adding Capabilities {browserName: internet explorer} 1 times
14:22:11.955 INFO [NodeOptions.lambda$addSystemDrivers$1] - Adding Capabilities {browserName: MicrosoftEdge} 9 times
14:22:11.956 INFO [NodeOptions.lambda$addSystemDrivers$1] - Adding Capabilities {browserName: MicrosoftEdge} 9 times
14:22:12.899 INFO [AbstractInternalLogger.log] - [id: 0x43d8e822] REGISTERED
14:22:12.902 INFO [AbstractInternalLogger.log] - [id: 0x43d8e822] BIND: 0.0.0.0/0.0.0.0:5555
14:22:12.906 INFO [AbstractInternalLogger.log] - [id: 0x43d8e822, L:/0:0:0:0:0:0:0:0:5555] ACTIVE
14:22:12.906 INFO [NodeServer.lambda$configure$1] - Started Selenium node 4.0.0-alpha-4 (revision c2d955b49e)
14:24:29.614 INFO [AbstractInternalLogger.log] - [id: 0x43d8e822, L:/0:0:0:0:0:0:0:0:5555] READ: [id: 0x0832859c, L:/10.3.5.203:5555 - R:/10.3.5.202:62696]
14:24:29.615 INFO [AbstractInternalLogger.log] - [id: 0x43d8e822, L:/0:0:0:0:0:0:0:0:5555] READ COMPLETE
14:28:53.780 INFO [AbstractInternalLogger.log] - [id: 0x43d8e822, L:/0:0:0:0:0:0:0:0:5555] READ: [id: 0x95828f94, L:/10.3.5.203:5555 - R:/10.3.5.202:62720]
14:28:53.781 INFO [AbstractInternalLogger.log] - [id: 0x43d8e822, L:/0:0:0:0:0:0:0:0:5555] READ COMPLETE

If you need more info let me know.

diemol commented 4 years ago

On the node windows machine after running Beta 6 java -jar selenium-server-4.0.0-alpha-6.jar node --detect-drivers --publish-events tcp://{hubIP}:4442 --subscribe-events tcp://{hubIP}:4443

i get the following message:

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 "--detect-drivers": couldn't convert "--publish-events" to a boolean Usage: node [options]

You need to add the value of the option:

java -jar selenium-server-4.0.0-alpha-6.jar node --detect-drivers true --publish-events tcp://{hubIP}:4442 --subscribe-events tcp://{hubIP}:4443

jacorgaz commented 4 years ago

Hi @diemol

Still facing org.openqa.selenium.UnsupportedCommandException: Unable to find handler for (POST) /session

Configuration used:

Drivers are located in the same folder as the Selenium Server jar in node machine

Capabilities used on HUB (Mac machine):

String nodeURL="http://{nodeIP}:5555";
 DesiredCapabilities capability = new DesiredCapabilities();
capability.setBrowserName("chrome");
capability.acceptInsecureCerts();
capability.setPlatform(Platform.WINDOWS);
driver = new RemoteWebDriver(new URL(nodeURL), capability);

POM:

<dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.0.0-alpha-6</version>
</dependency>
  <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>4.0.0-alpha-2</version>
</dependency>

In HUB :

16:11:11.700 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://{hubIP}:4442 and tcp://{hubIP}:4443
16:11:11.705 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:11:11.710 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
16:11:11.921 INFO [BoundZmqEventBus.<init>] - Event bus ready
16:11:12.572 INFO [Hub.execute] - Started Selenium hub 4.0.0-alpha-6 (revision 5f43a29cfc): http://{hubIP}:4444
16:11:15.058 INFO [LocalDistributor.refresh] - Creating a new remote node for http://{NODEIP}:5555
16:11:15.663 INFO [LocalDistributor.add] - Added node 945671ba-7952-4eac-929e-4511acd58563.
16:11:15.674 INFO [Host.lambda$new$0] - Changing status of node 945671ba-7952-4eac-929e-4511acd58563 from DOWN to UP. Reason: http://{nodeIP}:5555 

In NODE run java -jar selenium-server-4.0.0-alpha-6.jar node --detect-drivers true --publish-events tcp://{hubIP}:4442 --subscribe-events tcp://{hubIP}:4443 --host {nodeIP}

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
16:08:29.742 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
16:08:29.744 INFO [LoggingOptions.createTracer] - Using OpenTelemetry for tracing
16:08:29.780 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
16:08:30.129 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://{hubIP}:4442 and tcp://{hubIP}:4443
16:08:30.169 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:08:30.173 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
16:08:30.470 INFO [NodeServer.execute] - Reporting self as: http://{nodeIP}:5555
16:08:30.555 INFO [NodeOptions.report] - Adding Internet Explorer for {"browserName": "internet explorer"} 1 times
16:08:30.558 INFO [NodeOptions.report] - Adding Edge for {"browserName": "MicrosoftEdge"} 8 times
16:08:30.559 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome"} 8 times
16:08:30.560 INFO [NodeOptions.report] - Adding Firefox for {"browserName": "firefox"} 8 times
16:08:31.274 INFO [NodeServer.execute] - Started Selenium node 4.0.0-alpha-6 (revision 5f43a29cfc): http://{nodeIP}:5555
16:08:31.279 INFO [NodeServer.execute] - Starting registration process for node id 945671ba-7952-4eac-929e-4511acd58563
16:08:31.491 INFO [NodeServer.lambda$execute$0] - Node has been added
16:11:18.421 INFO [NodeServer.lambda$execute$0] - Node has been added
diemol commented 3 years ago

Apologies for the late reply.

After reading the whole issue again I now see the issue.

The hub (listening to port 4444) and the node (listening to port 5555), and the code you are using is pointing to the node instead to the hub.

Please switch on your test code to use port 4444 instead of 5555.