Hi, Trying using the K6 UI recorder and recorded few actions on UI (login and dashboard click)
but while running the test getting error in logs → IP (XXXXX) is in a blacklisted range (172.16.0.0/12)
how to fix this issues ? please help.
Hi @ssharma !
Welcome to the community forums!
I’ll try my best to help you.
Such an error appears when the k6’s network dialer resolves a blacklisted IP or a connection to such IP is trying to be established. There is a configuration option “Blacklist IPs” that manages this list.
Could you please check if your set test configuration defines this range 172.16.0.0/12
?
Let me know if that answers,
Cheers
where we can define this in k6 UI website ? I dont see the option. please help.
@ssharma, are you trying to run the test on your local machine or in the k6 cloud (https://app.k6.io)?
In the K6 cloud (https://app.k6.io)
That’s interesting
To help you, I need more details about the test script. When you did mention that you recorded a few actions on UI, what was that UI? Is it your web application? What kind of URLs are used there? Are they hosted in your private network/cloud?
Hi Oleg, I want to know how to use options ‘Blacklist IP’ from k6 cloud.
Hi @ssharma,
Managing this option is possible inside the script scenario. Here is an example of the configuration.
But honestly, I don’t think that this is the issue. I suggested this option assuming that you run the scenario from your local machine. But if this log comes from the cloud, the problem is somewhere else. I see that the script has some URLs that resolve with the IP from a range 172.16.0.0/12
. That is a private network’s address (probably the AWS VPCs). This means that the error is OK since the k6 is trying to request something in a private subnet.
So, I’d recommend checking the URLs inside the script.
Let me know if that helps,
Cheers
According to Reserved IP addresses - Wikipedia, this is 'Used for local communications within a private network". So it’s blocked by default in k6 cloud, since there is no reason that load tests from users will need to hit our own private cloud IPs… What exactly are you doing to get this error?
I’m trying to load test UI application which is our test environment. I’m connected with VPN.
I believe the the test URL is behind the firewall.
How can i run the UI cloud k6 load testing for above environment ?
I’m trying to load test UI application which is our test environment. I’m connected with VPN.
I believe the the test URL is behind the firewall.
If you’re using the VPN, some of the resources probably aren’t publicly available from the Internet (probably domains can be resolved only inside your private network).
When the k6 cloud runs tests, it acts as a regular internet user, so it can’t access the private network.
So, as far as I know, the only way to run the tests in that setup is to run them from inside the private network (your local machine that is VPN connected or a CI machine that has access to that internal resources) and stream results to the cloud.