Fargate + Selenium node Sending registration event...

296 views
Skip to first unread message

datarecall

unread,
May 30, 2022, 8:59:57 AM5/30/22
to Selenium Users
My node is stuck on Sending registration event... here is the output from the hub:
```
2022-05-27 15:36:42
21:36:42.914 INFO [Hub.execute] - Started Selenium Hub 4.1.4 (revision 535d840ee2): http://172.31.20.9:4444
2022-05-27 15:36:41
21:36:41.596 INFO [UnboundZmqEventBus.<init>] - Event bus ready
2022-05-27 15:36:40
21:36:40.591 INFO [UnboundZmqEventBus.<init>] - Sockets created
2022-05-27 15:36:40
21:36:40.508 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://172.31.20.9:4442 and tcp://172.31.20.9:4443
2022-05-27 15:36:40
21:36:40.384 INFO [BoundZmqEventBus.<init>] - XPUB binding to [binding to tcp://*:4442, advertising as tcp://172.31.20.9:4442], XSUB binding to [binding to tcp://*:4443, advertising as tcp://172.31.20.9:4443]
2022-05-27 15:36:40
21:36:40.172 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
2022-05-27 15:36:40
21:36:40.167 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
2022-05-27 15:36:40
2022-05-27 21:36:40,170 INFO success: selenium-grid-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-05-27 15:36:39
2022-05-27 21:36:39,567 INFO spawned: 'selenium-grid-hub' with pid 10
2022-05-27 15:36:38
2022-05-27 21:36:38,565 INFO supervisord started with pid 8
2022-05-27 15:36:38
2022-05-27 21:36:38,563 INFO Included extra file "/etc/supervisor/conf.d/selenium-grid-hub.conf" during parsing
```

This is the log from the chome node
```
2022-05-27 15:38:43
21:38:43.013 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:38:33
21:38:33.010 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:38:23
21:38:23.008 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:38:12
21:38:12.997 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:38:02
21:38:02.994 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:37:52
21:37:52.992 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:37:42
21:37:42.989 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:37:32
21:37:32.987 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:37:22
21:37:22.982 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2022-05-27 15:37:22
21:37:22.972 INFO [NodeServer.execute] - Started Selenium node 4.1.4 (revision 535d840ee2): http://172.31.16.124:5555
2022-05-27 15:37:22
21:37:22.969 INFO [NodeServer$1.start] - Starting registration process for Node http://172.31.16.124:5555
2022-05-27 15:37:22
21:37:22.657 INFO [Node.<init>] - Binding additional locator mechanisms: id, name, relative
2022-05-27 15:37:22
21:37:22.583 INFO [NodeOptions.report] - Adding chrome for {"browserVersion": "101.0","se:noVncPort": 7900,"browserName": "chrome","platformName": "Linux","se:vncEnabled": true} 1 times
2022-05-27 15:37:22
21:37:22.402 INFO [NodeOptions.getSessionFactories] - Detected 2 available processors
2022-05-27 15:37:22
21:37:22.372 INFO [NodeServer.createHandlers] - Reporting self as: http://172.31.16.124:5555
2022-05-27 15:37:22
21:37:22.195 INFO [UnboundZmqEventBus.<init>] - Event bus ready
2022-05-27 15:37:21
21:37:21.193 INFO [UnboundZmqEventBus.<init>] - Sockets created
2022-05-27 15:37:21
21:37:21.086 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://172.31.5.251:4442 and tcp://172.31.5.251:4443
2022-05-27 15:37:20
21:37:20.769 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
2022-05-27 15:37:20
21:37:20.763 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
2022-05-27 15:37:20
Selenium Grid Node configuration:
2022-05-27 15:37:20
[events]
2022-05-27 15:37:20
publish = "tcp://172.31.5.251:4442"
2022-05-27 15:37:20
subscribe = "tcp://172.31.5.251:4443"
2022-05-27 15:37:20
[node]
2022-05-27 15:37:20
session-timeout = "300"
2022-05-27 15:37:20
override-max-sessions = false
2022-05-27 15:37:20
detect-drivers = false
2022-05-27 15:37:20
drain-after-session-count = 0
2022-05-27 15:37:20
max-sessions = 1
2022-05-27 15:37:20
[[node.driver-configuration]]
2022-05-27 15:37:20
display-name = "chrome"
2022-05-27 15:37:20
stereotype = '{"browserName": "chrome", "browserVersion": "101.0", "platformName": "Linux"}'
2022-05-27 15:37:20
max-sessions = 1
2022-05-27 15:37:20
Starting Selenium Grid Node...
2022-05-27 15:37:20
Configuring server...
2022-05-27 15:37:20
Setting up SE_NODE_HOST...
2022-05-27 15:37:20
Setting up SE_NODE_PORT...
2022-05-27 15:37:20
Setting up SE_NODE_GRID_URL...
2022-05-27 15:37:20
Appending Selenium options: --host 172.31.16.124
2022-05-27 15:37:20
Generating Selenium Config
2022-05-27 15:37:19
2022-05-27 21:37:19,760 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-05-27 15:37:19
2022-05-27 21:37:19,760 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-05-27 15:37:19
2022-05-27 21:37:19,760 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-05-27 15:37:19
2022-05-27 21:37:19,759 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-05-27 15:37:19
2022-05-27 21:37:19,650 INFO spawned: 'xvfb' with pid 17
2022-05-27 15:37:19
2022-05-27 21:37:19,652 INFO spawned: 'vnc' with pid 18
2022-05-27 15:37:19
2022-05-27 21:37:19,653 INFO spawned: 'novnc' with pid 19
2022-05-27 15:37:19
2022-05-27 21:37:19,655 INFO spawned: 'selenium-node' with pid 20
2022-05-27 15:37:18
2022-05-27 21:37:18,648 INFO supervisord started with pid 15
2022-05-27 15:37:18
2022-05-27 21:37:18,646 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
```
All ports are open on both the security group for the hub and the security group for the node.

Any help or suggestions would be great thanks for taking a look.

Brumpo Tungus

unread,
Jun 15, 2022, 4:02:49 PM6/15/22
to Selenium Users
I might be looking at this wrong, but the hub looks like it's reporting 172.31.20.9 as its IP, but the node is trying to connect to the hub at 172.31.5.251

This might be due to the Fargate tasks's ENI having a dynamic IP, and each time you launch, it gets a new one.  I got around this by having a custom route53 record that the hub writes its internal IP to once the selenium process comes up.  That way, you can point the node to the DNS name of the hub and it will resolve its internal IP.

I add environment variables for this on top of the dockerfile that gets downloaded form the Docker Selenium Github, so the node always gets the current IP of the hub at run time.  Here's what gets added:

ENV SE_EVENT_BUS_HOST=selenium4-hub-internal-ip.example.com

ENV SE_EVENT_BUS_PUBLISH_PORT=4442

ENV SE_EVENT_BUS_SUBSCRIBE_PORT=4443

Reply all
Reply to author
Forward
0 new messages