New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seeing Connectivity Issue in k6 Tool on using latest K6 Version(0.49.0) as opposed to older K6 Version(0.31.1) #3620
Comments
Hi @srikr, Thanks for reporting this issue. I'll be happy to try to reproduce it and work on a fix. So, as your host looks like an internal one, could you bring details about that environment? Thanks! |
Hi @joanlopez, Working JS for k6 version 49: Non Working JS for k6 version 49: Note: FYI Hostname SNI-bot-mgmt-static-waf-policy-learning-4-148-1-ch-0.botmgmttest.net is Pingable or Reachable from that VM Attached is the PCAP Captured on Server when k6 sending traffic using via IP Address. I also tried to take a packet dump in the client when accessing via Hostname but capture doesn't contain any packets or K6 is not attempting to send packet out for some reason. |
Any Update @joanlopez |
Any Update please? |
Any Help or Workaround is much appreciated @joanlopez |
Any Update Please? |
Hey @srikr, I didn't have time yet, but hopefully I'll have some along the week, so I'll try to update you by the end of the week. |
Sure Thanks. We have release some time soon I want this async feature so that I can test things at scale using k6. |
Any Update @joanlopez? |
Hi @srikr, Finally, I managed to have a look at your issue. It looks like a small bug when managing configured hosts (as in your case), and with casing. While we work on a fix to make this process more consistent, can you try it by defining your host in lower case? Thanks! |
Hey @srikr, While I wait for you to confirm that the workaround above works for you, I've created the specific issue that explains what's the root cause and how to reproduce it (in a generic way): #3651, as well as the pull request to fix it: #3653. The fix will Thanks! |
Thanks @joanlopez for the workaround. Yes it is working fine. I will continue using this workaround until the next version is released. You can close the issue for now. |
Awesome, thanks for letting us know! Happy testing! 💟 |
Brief summary
K6 Javascript Used
cat http.js import http from "k6/http"; import { check } from "k6"; export var options = { hosts: { 'SNI-bot-mgmt-static-waf-policy-learning-8-148-1-ch-0.botmgmttest.net' : '172.16.28.89' } }; export default function() { var param = { headers: {'Content-Type': 'application/json', 'Accept': 'text/html'} }; var data11 = JSON.stringify({ "name1":"aaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyzaaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyzaaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyzaaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyz" }); check(http.post("https://SNI-bot-mgmt-static-waf-policy-learning-8-148-1-ch-0.botmgmttest.net:443/psm/POST/post1.php", data11, param), { "status is 200": (r) => r.status == 200, "protocol is HTTP/1.1": (r) => r.proto == "HTTP/1.1", }); }
Traffic Works fine for k6 version 31:
k6.31 run --insecure-skip-tls-verify -d 10s --rps 150 -u 1 http.js
Traffic doesn't Work fine for k6 version 49(latest):
k6 run --insecure-skip-tls-verify -d 10s --rps 150 -u 1 http.js
Below are the version outputs of K6 Version command
Working K6 Version:
k6.31 version k6 v0.31.1 (2021-03-17T13:23:23+0000/e9d8349, go1.15.8, linux/amd64)
Non Working K6 Version:
k6 version k6 v0.49.0 (commit/b5328aa782, go1.21.6, linux/amd64)
k6 version
v0.49.0
OS
Ubuntu 16.04
Docker version and image (if applicable)
No response
Steps to reproduce the problem
K6 Javascript Used
cat http.js import http from "k6/http"; import { check } from "k6"; export var options = { hosts: { 'SNI-bot-mgmt-static-waf-policy-learning-8-148-1-ch-0.botmgmttest.net' : '172.16.28.89' } }; export default function() { var param = { headers: {'Content-Type': 'application/json', 'Accept': 'text/html'} }; var data11 = JSON.stringify({ "name1":"aaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyzaaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyzaaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyzaaaaabbbbbaaaaacccccddddddeeeeeefffffgggghhhhhhiiiiiijjjjjjkkkkkkklmnopqrstuvwxyz" }); check(http.post("https://SNI-bot-mgmt-static-waf-policy-learning-8-148-1-ch-0.botmgmttest.net:443/psm/POST/post1.php", data11, param), { "status is 200": (r) => r.status == 200, "protocol is HTTP/1.1": (r) => r.proto == "HTTP/1.1", }); }
Traffic Works fine for k6 version 31:
k6.31 run --insecure-skip-tls-verify -d 10s --rps 150 -u 1 http.js
Traffic doesn't Work fine for k6 version 49(latest):
k6 run --insecure-skip-tls-verify -d 10s --rps 150 -u 1 http.js
Below are the version outputs of K6 Version command
Working K6 Version:
k6.31 version k6 v0.31.1 (2021-03-17T13:23:23+0000/e9d8349, go1.15.8, linux/amd64)
Non Working K6 Version:
k6 version k6 v0.49.0 (commit/b5328aa782, go1.21.6, linux/amd64)
Expected behaviour
Latest k6 Version should work like Old K6 Version
Actual behaviour
K6 Version 31 Output:
`k6.31 run --insecure-skip-tls-verify -d 10s --rps 150 -u 1 http.js
/ \ | |\ \ | (‾) |
/ __________ \ |__| _\ ____/ .io
execution: local
script: /home/aviuser/K6JS/http.js
output: -
scenarios: (100.00%) 1 scenario, 1 max VUs, 40s max duration (incl. graceful stop):
* default: 1 looping VUs for 10s (gracefulStop: 30s)
running (10.0s), 0/1 VUs, 1495 complete and 0 interrupted iterations
default ✓ [======================================] 1 VUs 10s
K6 Version 49 Output:
`k6 run --insecure-skip-tls-verify -d 10s --rps 150 -u 1 http.js
WARN[0001] Request Failed error="Post "https://SNI-bot-mgmt-static-waf-policy-learning-8-148
-1-ch-0.botmgmttest.net:443/psm/POST/post1.php": dial tcp :443: connect: connection refused"
WARN[0001] Request Failed error="Post "https://SNI-bot-mgmt-static-waf-policy-learning-8-148
-1-ch-0.botmgmttest.net:443/psm/POST/post1.php": dial tcp :443: connect: connection refused"
WARN[0001] Request Failed error="Post "https://SNI-bot-mgmt-static-waf-policy-learning-8-148
-1-ch-0.botmgmttest.net:443/psm/POST/post1.php": dial tcp :443: connect: connection refused"
^C
✗ status is 200
↳ 0% — ✓ 0 / ✗ 146
✗ protocol is HTTP/1.1
↳ 0% — ✓ 0 / ✗ 146
The text was updated successfully, but these errors were encountered: