Using --local-ips options in Linux with multiple NIC

I have a Linux ubuntu VM where i ran a simple k6 test

import http from 'k6/http';
import { sleep } from 'k6';

export default function () {

using the command: k6 run test.js --vus 10 --duration 30s
everything is working fine, i added another network interface to this machine and tried to run k6 and use the new interface using the command: k6 run test.js --vus 10 --duration 30s --local-ips=,

Now there are some requests failing with this error error="Get \"\": dial: i/o timeout"
I’m running a very small number of vus so i don’t see why this is happening!
The same issue is happening on another Linux VM targeting another URL.

I’m using k6 v0.42.0, OS: Ubuntu 20_04-lts-gen2

Anyone faced this issue before??

Hi @mohamed.sengab

Welcome to the community forums :wave:

Can you run the tests separately on both interfaces (the initial one that works and the new interface)?

k6 run test.js --vus 10 --duration 30s --local-ips=
k6 run test.js --vus 10 --duration 30s --local-ips=

Is it only one of the interfaces causing the issues? Or both?

Have you tried runing a curl forcing the requests to use each network interface? It will tell us if this is a k6 issue or an OS issue.

Based on the error i/o timeout, one possible cause is that the new interface can’t reach the test endpoint If curl works but not k6, I would run k6 with http debug and we can have a look at the logs.

Let me know the results, and we’ll take it from there.


It seems the new interface has a problem, I tried your suggestion, and it seems curl is throwing error as well ( No route to host) so it seems it’s an OS issue.

Thanks for your help.

1 Like

Thanks for getting back @mohamed.sengab. Let us know if once curl works you still see issues and we’d look into it.

Have a nice day!