rancher: Internal Server Error In Cluster Explorer After Upgrade to v2.5.2
Hello,
I upgraded Rancher from v2.3.3 to v2.5.2 and afterwards, when navigating to one of my clusters in the cluster explorer I get
HTTP Error 500: Internal Server Error
from /k8s/clusters/c-mppz8/v1/schemas
I can see and interact with the local cluster just fine.
I tried upgrading the k8s version of the affected cluster to v1.19.4 but that did not help fix the issue.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 13
- Comments: 24 (1 by maintainers)
I have the same issue, but I resolved it after I replace the wrong upgrade line in nginx(reverse proxy) vhost server configuration
to
Reference: https://www.nginx.com/blog/websocket-nginx/
I got the Cluster Explorer working. Looking at the response from that API call I realized that rancher
is proxying the call to the cluster and the cluster doesn’t support websocketscan’t handle websockets on this endpoint, because nginx was blindly sending websockets headers with every request:The fix was to have an additionalEDIT: It was a little more complicated than that; with that fix I could not execute shells on containers. I had to configure nginx to set the Connection header only if it receives a websocket header from the browser.location
block that did not try to upgrade the connection to websockets for/k8s
Click to expand
I will leave the issue open for feedback as to whether or not this configuration would cause further problems (maybe I should be more specific, like set the location as
/k8s/clusters
?).Also the permanent fix that would prevent a configuration like this from being necessary is for Rancher to
accept websockets but proxy requests to clusters as normal HTTPhandle being given websockets headers even when the endpoint doesn’t support websockets.Or to clarify that reverse proxies in front of Rancher should not use websockets at all.Hi, I have the same problem: HTTP Error 500: from / k8s / clusters / c-nzzm4 / v1 / schemas
I started Rancher version 2.5.2
To expose rancher’s web interface I use a reverse proxy (nginx). I tried to contact the same resource (Cluster Explorer) directly from the rancher node on port 443 and the service works.