Getting following error while running script on k6

WARN[0002] Request Failed                                error="Get \"\": http: server gave HTTP 
response to HTTPS client"
import http from 'k6/http';
import { sleep } from 'k6';

export default function () {

Hi @kalyanipawar

I was testing the same script as you and I do not get this error.

Can you tell us more about your platform? Do your requests go through a proxy? Are you running k6 with Docker? Do you get the same error with http.get('');?

If you can share the command you use and a bit more details about your environment, we might be able to help you troubleshoot.


Running script on local only using command
k6 run script.js

even able to launch same url “” on vm browser, but getting above issue with running with k6. running without docker only.

Hi @kalyanipawar

The next steps I would try:

  • curl from your VM. Does it work? My thinking is that the browser might have a proxy configured, for example. That allows the requests to reach
  • What version of k6 are you running? You can check that with k6 version.
  • Try http.get('');, though I expect it will probably do the same.
  • Running k6 in debug might help you compare the request/responses. Execute k6 run --http-debug script.js. And compare with curl -v

I hope this helps. It does seem to be an issue related to the VM having access to and somehow receiving a response that looks like it comes from But it is difficult to tell without seeing your VM.


K6 version : k6 v0.41.0 (2022-11-02T11:50:11+0000/v0.41.0-0-g11deb073, go1.19.3, windows/amd64)

Thanks you, seems some issue with vm certificates/ proxy.

1 Like

Hi @kalyanipawar

Thanks for coming back. I hope you can figure it out soon.