Node never sends registration event

169 views
Skip to first unread message

Brumpo Tungus

unread,
Mar 22, 2022, 3:46:18 AM3/22/22
to Selenium Users

Hello,

I am trying to create a distributed Selenium 4 environment using EC2 instances to fulfill some company restrictions - docker is currently not an option.  Each component is launched on its own EC2 instance.

Each piece launches, and seemingly communicates with each other, but the node never gets to the point where it says "Sending registration event…" that I have seen in other posts.  If I go to http://$router:4444 it stats "The Grid has no registered Nodes yet." 

Output of node log file:

16:01:04.689 INFO [LogManager$RootLogger.log] - Using the system default encoding
16:01:04.694 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
16:01:04.842 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://10.28.6.202:4442 and tcp://10.28.6.202:4443
16:01:04.916 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:01:05.918 INFO [UnboundZmqEventBus.<init>] - Event bus ready
16:01:06.043 INFO [NodeServer.createHandlers] - Reporting self as: http://10.28.6.1:5555
16:01:06.066 INFO [NodeOptions.getSessionFactories] - Detected 2 available processors
16:01:06.097 INFO [Node.<init>] - Binding additional locator mechanisms: name, id, relative
16:01:06.405 INFO [NodeServer$1.start] - Starting registration process for node id 2b56f4eb-a554-4834-a61c-c7b6753dba5b
16:01:06.409 INFO [NodeServer.execute] - Started Selenium node 4.1.1 (revision e8fcc2cecf): http://10.28.6.1:5555

It ends after the "Started Selenium node" line and never sends a registration event.

Firewall allows communication on TCP ports 4442, 4443, 4444, 5553, 5555, 5556, 5559.  The bus is bound to the distributor.  Launch commands for the individual parts:

java -jar selenium4.jar distributor \
--sessions http://$sessions:5556 \
--sessionqueue http://$sessionqueue:5559 \
--bind-bus true \
--log /home/selenium4/log-distributor.txt

java -jar selenium4.jar node \
--grid-url $router \
--log /home/selenium4/log-node.txt \
--detect-drivers false \
--publish-events tcp://$distributor:4442 \
--subscribe-events tcp://$distributor:4443" 

java -jar selenium4.jar router \
--sessions http://$sessions:5556 \
--sessionqueue http://$sessionqueue:5559 \
--distributor http://$distributor:5553 \
--log /home/selenium4/log-router.txt \
--publish-events tcp://$router:4442 \
--subscribe-events tcp://$router:4443

java -jar /home/selenium4/selenium4.jar sessions \
--log /home/selenium4/selenium4-smap-log

java -jar /home/selenium4/selenium4.jar sessionqueue \
--log /home/selenium4/selenium4-squeue-log.file

I understand my configuration is abnormal and not up to best standards, I'm just looking to get a proof of concept going before I really spend some time on this.  I may be missing a flag somewhere that points one component to another for communication, but I'm not sure what it is.  I read the docs included in the selenium jar pretty heavily but couldn't discern what was mandatory and what was optional.

Any ideas for what I might be missing, or any pointers?  

Thanks!

Brumpo Tungus

unread,
Mar 23, 2022, 4:27:23 PM3/23/22
to Selenium Users
The issue was that specifying --detect-drivers false apparently prevents the node from sending a registration event.

I had it set to false to try to get a node to register before I went through automating the chromedriver install.  I eventually installed chromedriver and set --detect-drivers to true, and the logs now show:

20:26:21.982 INFO [NodeServer$1.lambda$start$1] - Sending registration event...

The node is still not connecting, but at least something's happening.


Brumpo Tungus

unread,
Mar 30, 2022, 11:57:16 AM3/30/22
to Selenium Users
I resolved the "Sending registration event..." issue by fixing my launch commands.  In case anyone encounters this and is running a 4 grid in distributed mode on ec2 instances, here are the launch commands for each piece that allowed me to get a grid with nodes that register.  The distributor has --bind-bus true so I don't have a specific instance for the eventbus.

Distributor:
command="java -jar selenium4.jar distributor \

--sessions http://$sessions:5556 \
--sessionqueue http://$sessionqueue:5559 \
--bind-bus true \
--log /home/selenium4/log-distributor.txt"

Node:
command="java -jar selenium4.jar node \
--grid-url $router \
--detect-drivers true \
--publish-events tcp://$distributor:4442 \
--subscribe-events tcp://$distributor:4443 \
--log /home/selenium4/log-node.txt"

Router:
command="java -jar selenium4.jar router \

--sessions http://$sessions:5556 \
--sessionqueue http://$sessionqueue:5559 \
--distributor http://$distributor:5553 \
--log /home/selenium4/log-router.txt \
--log-level FINE"

Session map:
command="java -jar selenium4.jar sessions \
--publish-events tcp://$distributor:4442 \
--subscribe-events tcp://$distributor:4443 \
--log /home/selenium4/log-smap.txt \
--log-level FINE"

Session Queue:
command="java -jar selenium4.jar sessionqueue \
--publish-events tcp://$distributor:4442 \
--subscribe-events tcp://$distributor:4443 \
--log /home/selenium4/log-squeue.txt \
--log-level FINE" 

- Brumpo Tungus
Reply all
Reply to author
Forward
0 new messages