question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-URL run with network throttling crashes in Docker: "RTNETLINK answers: No such file or directory"

See original GitHub issue

Hello,

I’m using Docker to run Sitespeed with 3G network throttling, and am able to get the run to successfully pass for a single URL. However, the run always fails if I add an additional URL.

I am using:

  • ECS-optimized* Amazon Linux (RHEL-based) (amzn-ami-2018.03.a-amazon-ecs-optimized (ami-5253c32d))

    [ec2-user@ip-10-10-1-102 ~]$ uname -a
    Linux ip-10-10-1-102 4.14.33-51.37.amzn1.x86_64 #1 SMP Thu May 3 20:07:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    
  • sitespeedio/sitespeed.io:latest Docker container

  • Docker Docker version 17.12.1-ce, build 3dfb8343b139d6342acfd9975d7f1068b5b1c3d3

  • OS configured with ifb and sch_netem kernel extensions (I ran sudo modprobe ifb numifbs=1 && sudo modprobe sch_netem && sudo shutdown -r now) and after reboot both extensions are listed in the lsmod output:

    [ec2-user@ip-10-10-1-102 ~]$ lsmod | grep sch_netem
    sch_netem               8853  0
    [ec2-user@ip-10-10-1-102 ~]$ lsmod | grep ifb
    ifb                     4590  0
    

Here’s what happens when I do a Sitespeed run with a single URL with 5 iterations:

[ec2-user@ip-10-10-1-102 ~]$ docker run --rm --cap-add=NET_ADMIN sitespeedio/sitespeed.io:latest --browsertime.connectivity.engine=throttle --connectivity=3g -n 5 https://www.axios.com/
Google Chrome 66.0.3359.181
Mozilla Firefox 61.0
[2018-05-29 16:30:04] INFO: Versions OS: linux 4.14.33-51.37.amzn1.x86_64 nodejs: v8.11.1 sitespeed.io: 7.0.0 browsertime: 3.0.13 coach: 2.0.2
[2018-05-29 16:30:04] INFO: Starting chrome for analysing https://www.axios.com/ 5 time(s)
[2018-05-29 16:30:04] INFO: Changing network interfaces needs sudo rights.
[2018-05-29 16:30:05] INFO: Testing url https://www.axios.com/ iteration 1
[2018-05-29 16:30:36] INFO: BackEndTime: 1253 DomInteractiveTime: 4355 DomContentLoadedTime: 4948 FirstPaint: 2714 PageLoadTime: 13048

[2018-05-29 16:30:36] INFO: VisualMetrics FirstVisualChange: 2733 SpeedIndex: 3440 PerceptualSpeedIndex: 3223 LastVisualChange: 5466

[2018-05-29 16:30:36] INFO: Testing url https://www.axios.com/ iteration 2
[2018-05-29 16:31:04] INFO: BackEndTime: 1566 DomInteractiveTime: 4693 DomContentLoadedTime: 5256 FirstPaint: 3011 PageLoadTime: 13270

[2018-05-29 16:31:04] INFO: VisualMetrics FirstVisualChange: 3033 SpeedIndex: 3742 PerceptualSpeedIndex: 3461 LastVisualChange: 5566

[2018-05-29 16:31:04] INFO: Testing url https://www.axios.com/ iteration 3
[2018-05-29 16:31:40] INFO: BackEndTime: 1250 DomInteractiveTime: 4408 DomContentLoadedTime: 4976 FirstPaint: 2701 PageLoadTime: 18843

[2018-05-29 16:31:40] INFO: VisualMetrics FirstVisualChange: 2700 SpeedIndex: 3232 PerceptualSpeedIndex: 3126 LastVisualChange: 5166

[2018-05-29 16:31:40] INFO: Testing url https://www.axios.com/ iteration 4
[2018-05-29 16:32:15] INFO: BackEndTime: 1552 DomInteractiveTime: 4639 DomContentLoadedTime: 5204 FirstPaint: 2994 PageLoadTime: 18094

[2018-05-29 16:32:15] INFO: VisualMetrics FirstVisualChange: 3000 SpeedIndex: 3721 PerceptualSpeedIndex: 3498 LastVisualChange: 5500

[2018-05-29 16:32:15] INFO: Testing url https://www.axios.com/ iteration 5
[2018-05-29 16:32:43] INFO: BackEndTime: 1556 DomInteractiveTime: 4621 DomContentLoadedTime: 5204 FirstPaint: 3002 PageLoadTime: 13302

[2018-05-29 16:32:43] INFO: VisualMetrics FirstVisualChange: 3000 SpeedIndex: 3744 PerceptualSpeedIndex: 3496 LastVisualChange: 5566

[2018-05-29 16:32:43] INFO: 106 requests, 1483.00 kb, backEndTime: 1.44s (±67.18ms), firstPaint: 2.88s (±64.67ms), firstVisualChange: 2.89s (±64.91ms), DOMContentLoaded: 5.12s (±57.58ms), Load: 15.31s (±1.16s), speedIndex: 3576 (±92.44), visualComplete85: 4.14s (±117.96ms), lastVisualChange: 5.45s (±66.42ms), rumSpeedIndex: 4660 (±190.08) (5 runs)
[2018-05-29 16:32:48] INFO: HTML stored in /sitespeed.io/sitespeed-result/www.axios.com/2018-05-29-16-30-04
[2018-05-29 16:32:48] INFO: Finished analysing https://www.axios.com/

(Everything finishes fine, and the benchmarks produced indicate to me that the network was sucessfully throttled)

Here’s what happens when I do a Sitespeed run with two URLs and 5 iterations each:

[ec2-user@ip-10-10-1-102 ~]$ docker run --rm --cap-add=NET_ADMIN sitespeedio/sitespeed.io:latest --browsertime.connectivity.engine=throttle --connectivity=3g -n 5 https://www.axios.com/ https://www.axios.com/politics/
Google Chrome 66.0.3359.181
Mozilla Firefox 61.0
[2018-05-29 15:42:09] INFO: Versions OS: linux 4.14.33-51.37.amzn1.x86_64 nodejs: v8.11.1 sitespeed.io: 7.0.0 browsertime: 3.0.13 coach: 2.0.2
[2018-05-29 15:42:09] INFO: Starting chrome for analysing https://www.axios.com/ 5 time(s)
[2018-05-29 15:42:09] INFO: Changing network interfaces needs sudo rights.
[2018-05-29 15:42:10] INFO: Testing url https://www.axios.com/ iteration 1
[2018-05-29 15:44:04] INFO: BackEndTime: 1630 DomInteractiveTime: 6474 DomContentLoadedTime: 11878 FirstPaint: 3608 PageLoadTime: 29458

[2018-05-29 15:44:04] INFO: VisualMetrics FirstVisualChange: 4433 SpeedIndex: 7868 PerceptualSpeedIndex: 6539 LastVisualChange: 14900

[2018-05-29 15:44:05] INFO: Testing url https://www.axios.com/ iteration 2
[2018-05-29 15:45:51] INFO: BackEndTime: 1619 DomInteractiveTime: 6743 DomContentLoadedTime: 11832 FirstPaint: 3616 PageLoadTime: 28235

[2018-05-29 15:45:51] INFO: VisualMetrics FirstVisualChange: 3900 SpeedIndex: 5426 PerceptualSpeedIndex: 5275 LastVisualChange: 20067

[2018-05-29 15:45:52] INFO: Testing url https://www.axios.com/ iteration 3
[2018-05-29 15:47:25] INFO: BackEndTime: 1621 DomInteractiveTime: 6929 DomContentLoadedTime: 11774 FirstPaint: 3760 PageLoadTime: 25665

[2018-05-29 15:47:25] INFO: VisualMetrics FirstVisualChange: 5200 SpeedIndex: 6978 PerceptualSpeedIndex: 6435 LastVisualChange: 17833

[2018-05-29 15:47:26] INFO: Testing url https://www.axios.com/ iteration 4
[2018-05-29 15:49:17] INFO: BackEndTime: 1620 DomInteractiveTime: 7066 DomContentLoadedTime: 12082 FirstPaint: 3603 PageLoadTime: 30091

[2018-05-29 15:49:17] INFO: VisualMetrics FirstVisualChange: 4067 SpeedIndex: 5555 PerceptualSpeedIndex: 5318 LastVisualChange: 14934

[2018-05-29 15:49:18] INFO: Testing url https://www.axios.com/ iteration 5
[2018-05-29 15:51:18] INFO: BackEndTime: 1621 DomInteractiveTime: 7948 DomContentLoadedTime: 12739 FirstPaint: 3710 PageLoadTime: 29971

[2018-05-29 15:51:18] INFO: VisualMetrics FirstVisualChange: 4400 SpeedIndex: 6145 PerceptualSpeedIndex: 5783 LastVisualChange: 16734

[2018-05-29 15:51:19] INFO: 142 requests, 2829.96 kb, backEndTime: 1.62s (±1.78ms), firstPaint: 3.66s (±28.56ms), firstVisualChange: 4.40s (±200.20ms), DOMContentLoaded: 12.06s (±158.55ms), Load: 28.68s (±736.24ms), speedIndex: 6394 (±410.69), visualComplete85: 8.65s (±1.44s), lastVisualChange: 16.89s (±867.02ms), rumSpeedIndex: 7254 (±222.29) (5 runs)
[2018-05-29 15:51:36] INFO: Starting chrome for analysing https://www.axios.com/politics/ 5 time(s)
[2018-05-29 15:51:36] INFO: Changing network interfaces needs sudo rights.
[2018-05-29 15:51:36] ERROR: Error: Command failed: sudo tc qdisc del dev ifb0 root
RTNETLINK answers: No such file or directory


    at Promise.all.then.arr (/usr/src/app/node_modules/@sitespeed.io/throttle/node_modules/execa/index.js:236:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
From previous event:
    at queue.process.message (/usr/src/app/lib/core/queueHandler.js:208:17)
    at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:96:21)
    at Immediate.drain [as _onImmediate] (/usr/src/app/node_modules/concurrent-queue/index.js:77:84)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
[2018-05-29 15:51:41] INFO: HTML stored in /sitespeed.io/sitespeed-result/www.axios.com/2018-05-29-15-42-09
[2018-05-29 15:51:41] INFO: Finished analysing https://www.axios.com/

As you can see, the first completes successfully, but the second fails with the error

[2018-05-29 15:51:36] ERROR: Error: Command failed: sudo tc qdisc del dev ifb0 root
RTNETLINK answers: No such file or directory

I am able to reproduce this issue with various URLs and on a freshly provisioned Linux server (with kernel extensions installed, as described above).

*: This issue first arose trying to run Sitespeed inside AWS ECS, but I am able to reproduce it with just the Docker CLI on a bare, non-ECS-managed machine using the OS described above as well. I haven’t tried a server with vanilla Amazon Linux or straight RHEL yet - if I get some time, I will update.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bjacobelcommented, May 30, 2018

Heck yeah, that works! Thank you for the quick response!

I’ll keep an eye out for the sitespeedio/sitespeed.io:latest build.

0reactions
soulgalorecommented, May 30, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

RTNETLINK answers :No such file or directory error
RTNETLINK answers :No such file or directory comes for 2 reason. Executing tc qdisc with wrong options; Or Kernel module sch_netem is missing....
Read more >
View topic - RTNETLINK answers: No such file or directory
When I upgrade my kernels, I always keep the previously working kernel and include it when I run grub-mkconfig. This way, if the...
Read more >
unable to install source route - RTNETLINK answers: No such ...
Though this seems wrong in most configurations, in this configuration i cant change the fact the gateway will hardly ever be in same...
Read more >
Trying to passthrough multiple Network interfaces from host to ...
I have a docker rhel 7.2 container that I am trying to run a networking app. This app wants to read packets from...
Read more >
Solved: RTNETLINK answers: File exists during service ...
In RHEL 6 or CentOS 6, sometimes we do encounter a strange issue and we are not able to restart network service with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found