You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run sitespeed docker container in Yandex.Cloud Serverless Containers (analog for AWS Lambda Container Images as I see it). Serverless container runs with two address on loopback interfaces. First is for metadata server 169.254.169.254/32 and second common loopback address 127.0.0.1/8 (the order matters). In such conditions broswertime can't connect to webdriver server because it chooses wrong ip addr (first one from addresses bound to loopback interface).
I would love to have at least an option to specify which address to use.
I've found workaround by hardcoding ip address and rebuilding browsertime. I used setHostname method from Selenium Service Builder. Patch below.
--- lib/chrome/webdriver/builder.js.old 2022-07-23 12:19:53.144422149 +0300
+++ lib/chrome/webdriver/builder.js.new 2022-07-23 12:19:09.031838969 +0300
@@ -28,6 +28,7 @@
// Remove the check that matches the Chromedriver version with Chrome version.
serviceBuilder.addArguments('--disable-build-check');
+ serviceBuilder.setHostname('127.0.0.1');
if (options.chrome && options.chrome.chromedriverPort) {
serviceBuilder.setPort(options.chrome.chromedriverPort);
What browser did you use?
Chrome, Firefox, Edge
How to reproduce
$ docker run --rm -ti --cap-add NET_ADMIN --entrypoint "/bin/bash" sitespeedio/sitespeed.io:25.5.1
root@16f8ff08e5bd:/sitespeed.io# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
1081: eth0@if1082: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
valid_lft forever preferred_lft forever
root@16f8ff08e5bd:/sitespeed.io# ip addr del 127.0.0.1/8 dev lo scope host
root@16f8ff08e5bd:/sitespeed.io# ip addr add 169.254.169.254/32 dev lo scope host
root@16f8ff08e5bd:/sitespeed.io# ip addr add 127.0.0.1/8 dev lo scope host
root@16f8ff08e5bd:/sitespeed.io# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 169.254.169.254/32 scope host lo
valid_lft forever preferred_lft forever
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
1081: eth0@if1082: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
valid_lft forever preferred_lft forever
root@16f8ff08e5bd:/sitespeed.io# /start.sh -b chrome -n 1 https://ya.ru
vitkhab
changed the title
Webdriver chooses wrong loopback ip addr if there are several ips bound to interface
Browsertime can't connect to Webdriver if there are several ip addresses bound to loopback interface
Jul 23, 2022
vitkhab
changed the title
Browsertime can't connect to Webdriver if there are several ip addresses bound to loopback interface
Browsertime can't connect to Webdriver if the first ip bound to loopback interface is not 127.0.0.1
Jul 23, 2022
Have you read the documentation?
URL
https://ya.ru
What are you trying to accomplish
I'm trying to run sitespeed docker container in Yandex.Cloud Serverless Containers (analog for AWS Lambda Container Images as I see it). Serverless container runs with two address on loopback interfaces. First is for metadata server 169.254.169.254/32 and second common loopback address 127.0.0.1/8 (the order matters). In such conditions broswertime can't connect to webdriver server because it chooses wrong ip addr (first one from addresses bound to loopback interface).
I would love to have at least an option to specify which address to use.
I've found workaround by hardcoding ip address and rebuilding browsertime. I used
setHostname
method from Selenium Service Builder. Patch below.What browser did you use?
Chrome, Firefox, Edge
How to reproduce
Relevant log output
The text was updated successfully, but these errors were encountered: