Kubernetes was unable to start: TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"
See original GitHub issueWhen installing Rancher Desktop behind a proxy, the following error occurs when k3s starts.
Kubernetes was unable to start: TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"
I am behind a proxy and have the HTTP_PROXY
and HTTPS_PROXY
variables set. The proxy used by my company is available over βhttpβ only so both variables are set to something like βhttp://my-proxy-urlβ. I also have values set in the NO_PROXY
variable for some internal domains. Does there need to be an additional entry in NO_PROXY
for Kubernetes?
Screenshots
Setup (please complete the following information):
- OS: Windows 10 Enterprise 10.0.19042 Build 19042
- Rancher Desktop version 0.6.0-186-g0c32457
- Using nightly build due to this issue
- Kubernetes version: 1.21.5
Snippet from the background.log
Kubernetes was unable to start: TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"
at new ClientRequest (_http_client.js:155:11)
at TunnelingAgent.request (http.js:50:10)
at TunnelingAgent.createSocket (C:\Users\myuser\AppData\Local\Programs\Rancher Desktop\resources\app.asar\node_modules\tunnel-agent\index.js:135:25)
at TunnelingAgent.createSecureSocket [as createSocket] (C:\Users\myuser\AppData\Local\Programs\Rancher Desktop\resources\app.asar\node_modules\tunnel-agent\index.js:200:41)
at TunnelingAgent.createConnection (C:\Users\myuser\AppData\Local\Programs\Rancher Desktop\resources\app.asar\node_modules\tunnel-agent\index.js:98:8)
at TunnelingAgent.addRequest (C:\Users\myuser\AppData\Local\Programs\Rancher Desktop\resources\app.asar\node_modules\tunnel-agent\index.js:92:8)
at new ClientRequest (_http_client.js:306:16)
at Object.request (https.js:313:10)
at Request.start (C:\Users\myuser\AppData\Local\Programs\Rancher Desktop\resources\app.asar\node_modules\request\request.js:751:32)
at Request.end (C:\Users\myuser\AppData\Local\Programs\Rancher Desktop\resources\app.asar\node_modules\request\request.js:1505:10) {
code: 'ERR_INVALID_PROTOCOL'
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:20 (5 by maintainers)
Top Results From Across the Web
node.js TypeError [ERR_INVALID_PROTOCOL]: Protocol "http ...
The problem with the code is that you are making https request and in your url you are using "http" instead of "https"...
Read more >Protocol "http:" not supported. Expected "https:"
In my application when I try to login with Auth0, I get the following error and the login fails. Protocol "http:" not supported....
Read more >Troubleshooting kubeadm | Kubernetes
Troubleshooting kubeadm. As with any program, you might run into an error installing or running kubeadm. This page lists some common failure ......
Read more >Jobs | Kubernetes
Keep in mind that the restartPolicy applies to the Pod, and not to the Job itself: there is no automatic Job restart once...
Read more >ReplicationController - Kubernetes
If you do not specify .spec.replicas , then it defaults to 1. Working with ReplicationControllers. Deleting a ReplicationController and its Pods.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is there any update on this issue , how to make k3s/k8s work in RD behind http_proxy ?
The core of the problem is the underlying process (electron app) is mismanaging the
HTTP(s)_PROXY
environment variable by making HTTP calls to the proxy where upstream requires HTTPS and vice versa. We will try to set up an environment to reproduce this. Once it is reproduced we will have a better idea of tackling it.Below are the scenarios to consider when tackling this issue: