首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:升级连接错误:使用远程存在调试荚时需要升级请求

错误:升级连接错误:使用远程存在调试荚时需要升级请求
EN

Stack Overflow用户
提问于 2020-02-20 04:44:31
回答 1查看 925关注 0票数 0

当我启动远程存在(v0.104)来调试远程kubernetes(v1.15.2)结荚时:

代码语言:javascript
复制
telepresence

执行此命令时:

代码语言:javascript
复制
kubectl --context default --namespace dabai-fat port-forward telepresence-1582172593-3845718-23919-6d665f6cbc-9wvq5 51694:8022

它显示了这个错误:

代码语言:javascript
复制
Recent output was:
  error: error upgrading connection: Upgrade request required

Here are the last few lines of the logfile (see /Users/dolphin/.kube/telepresence.log for the complete logs):

   6.7 TEL | END SPAN remote.py:142(get_remote_info)    2.6s
   6.7 TEL | BEGIN SPAN connect.py:37(connect)
   6.7 TEL | [18] Launching kubectl logs: kubectl --context default --namespace dabai-fat logs -f telepresence-1582172593-3845718-23919-6d665f6cbc-9wvq5 --container telepresence-1582172593-3845718-23919 --tail=10
   6.7 TEL | [19] Launching kubectl port-forward: kubectl --context default --namespace dabai-fat port-forward telepresence-1582172593-3845718-23919-6d665f6cbc-9wvq5 51694:8022
   6.7 TEL | [20] Running: ssh -F /dev/null -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -q -p 51694 telepresence@127.0.0.1 /bin/true
   6.7 TEL | [20] exit 255 in 0.01 secs.
   7.0 TEL | [21] Running: ssh -F /dev/null -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -q -p 51694 telepresence@127.0.0.1 /bin/true
   7.0 TEL | [21] exit 255 in 0.01 secs.
   7.3  19 | error: error upgrading connection: Upgrade request required
   7.3 TEL | [19] kubectl port-forward: exit 1
   7.3 TEL | [22] Running: ssh -F /dev/null -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -q -p 51694 telepresence@127.0.0.1 /bin/true
   7.3 TEL | [22] exit 255 in 0.01 secs.

我认为关键是端口转发failed.This是我的nginx:

代码语言:javascript
复制
server{
    listen 443 ssl;

    ssl_certificate /etc/nginx/conf.d/cert/example.com/fullchain1.pem;
    ssl_certificate_key /etc/nginx/conf.d/cert/example.com/privkey1.pem;

    access_log /nginx-access.log;
    error_log /nginx-error.log;

    server_name k8s-ctl.example.com;

    location / {
        client_max_body_size 50m;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass https://172.19.104.231:8443;
        index index.html index.htm;
    }
}

问题在哪里,我应该做些什么来纠正它呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-03-14 15:27:58

如果您使用域访问群集,尝试更改使用IP:PORT访问远程集群,我将改为这样修复错误upgrading connection: Upgrade request required.The ~/.kube/config

代码语言:javascript
复制
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://42.11.108.214:8443
  name: default
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60313014

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档