Selenium Grid 4 Question I see error when running HUB and NODE using Grid 4 | Selenium Forum
M
Monal Posted on 03/10/2020

Hi Instructor 

In Grid 4 I ran HUB

java -jar selenium-server-4.0.0-alpha-6.jar hub
16:25:21.660 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
16:25:21.661 INFO [LoggingOptions.createTracer] - Using OpenTelemetry for tracing
16:25:21.684 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
16:25:21.760 INFO [BoundZmqEventBus.<init>] - XPUB binding to [binding to tcp://*:4442, advertising as tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4442], XSUB binding to [binding to tcp://*:4443, advertising as tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4443]
16:25:21.796 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4442 and tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4443
16:25:21.802 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:25:21.803 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
16:25:22.013 INFO [BoundZmqEventBus.<init>] - Event bus ready
16:25:22.348 INFO [Hub.execute] - Started Selenium hub 4.0.0-alpha-6 (revision 5f43a29cfc): http://10.0.0.190:4444

 

Then I tried to Run HUB:

macbookpro16@Monals-MacBook-Pro Module29_Selenium_Grid_4 % java -jar selenium-server-4.0.0-alpha-6.jar node --detect-drivers --publish-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4442 --subcribe-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4443
"--detect-drivers": couldn't convert "--publish-events" to a boolean

But it did not worked therefore; I tried like so

macbookpro16@Monals-MacBook-Pro Module29_Selenium_Grid_4 % java -jar selenium-server-4.0.0-alpha-6.jar node --detect-drivers --publish-events tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4442 --subcribe-events tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4443
zsh: no matches found: tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4442

But that also did not worked so I tried with removing the [ ] in tcp:..

macbookpro16@Monals-MacBook-Pro Module29_Selenium_Grid_4 % java -jar selenium-server-4.0.0-alpha-6.jar node --detect-drivers --publish-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4442 --subcribe-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4443
"--detect-drivers": couldn't convert "--publish-events" to a boolean

Even that did not worked, so I tried removing --detect-drivers as you recommended in your lecture window

macbookpro16@Monals-MacBook-Pro Module29_Selenium_Grid_4 % java -jar selenium-server-4.0.0-alpha-6.jar node --publish-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4442 --subcribe-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4443
Was passed main parameter '--subcribe-events' but no main parameter was defined in your arg class
Usage: node [options]
Options:
--allow-cors ...

So I just tried with 

macbookpro16@Monals-MacBook-Pro Module29_Selenium_Grid_4 % java -jar selenium-server-4.0.0-alpha-6.jar node
16:44:36.596 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
16:44:36.597 INFO [LoggingOptions.createTracer] - Using OpenTelemetry for tracing
16:44:36.618 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
16:44:36.661 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://*:4442 and tcp://*:4443
16:44:36.683 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:44:36.685 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
16:44:36.953 INFO [NodeServer.execute] - Reporting self as: http://10.0.0.190:5555
16:44:37.010 INFO [NodeOptions.report] - Adding Safari for {"browserName": "safari"} 1 times
16:44:37.012 INFO [NodeOptions.report] - Adding Firefox for {"browserName": "firefox"} 16 times
16:44:37.012 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome"} 16 times
16:44:37.122 INFO [NodeServer.execute] - Started Selenium node 4.0.0-alpha-6 (revision 5f43a29cfc): http://10.0.0.190:5555
16:44:37.124 INFO [NodeServer.execute] - Starting registration process for node id 02eb27e1-5e14-4dab-8d50-24dd57e171a1
16:44:37.590 INFO [NodeServer.lambda$execute$0] - Node has been added

and then I tried to execute the Java Code by chainging the URL to http://10.0.0.190:4444 in my Java Code

String gridAddress = "http://10.0.0.190:4444";

later Ran the Code and it opened the Chrome Browser and went to

https://www.qtpselenium.com/ 

Looking at the Terminal see below:

Starting ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}) on port 14514
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
16:46:19.445 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C

 

Question: So I need to know did I do correctly ? Do I need to enter those tcp address ? 

Als My tcp addres looks like this tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4442 --subcribe-events tcp://[2601:644:4480:e2c0:0:0:0:8f1f%en0]:4443

So here do I need to remove brackets [] ? or does not matter

Can you please let me know other ways I sould try to make the code run like you showed in the lecture videos ?

Thank you,

Monal


A
Ashish Thakur Replied on 04/10/2020

Have you looked at grid module

Things have changed a lot in grid 4


M
Monal Replied on 05/10/2020

HI Instructor,

First I saw Grid 3 video and then I saw you Grid 4 lecture video where you talk about standalone, Hub and Node Grid 4, and when you were showing last video about distribute mode it was broken and you said you will create new Gide 4 video when Selenium people will fix it etc. 

For the above question when I tried adding this --- for HUB and NODE : macbookpro16@Monals-MacBook-Pro Module29_Selenium_Grid_4 % java -jar selenium-server-4.0.0-alpha-6.jar node --publish-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4442 --subcribe-events tcp://2601:644:4480:e2c0:0:0:0:8f1f%en0:4443

This ^^ did not worked so I tried with just java -jar selenium-server-4.0.0-alpha-6.jar node and tried running the Java Code and it worked

So please let me know what changed that you are talking about ? Please clarify.

-Monal


A
Ashish Thakur Replied on 07/10/2020

Monal, as selenium is in the development stage. There are a lot of changes that have been made since the first release. You can refer to the video for selenium alpha 6 as everything has been tested and is working fine.


Related Posts