2020-09-26 Rancher添加容器以及一直等待register问题解决
--user=root 以root身份进入容器--privileged=true 让docker 应用容器 获取宿主机root权限(特殊权限)
·
--user=root
以root身份进入容器
--privileged=true
让docker 应用容器 获取宿主机root权限(特殊权限)
用root进入容器里就是docker exec -it --user=root 容器id /bin/bash
踩坑:加入主机后一直等待register
docker logs rancher容器查看日志:
time="2021-01-18T09:13:00Z" level=info msg="Connecting to proxy" url="wss://192.168.1.50:1443/v3/connect/register"
time="2021-01-18T09:13:00Z" level=error msg="Failed to connect to proxy. Response status: 200 - 200 OK. Response body: Operation cannot be fulfilled on nodes.management.cattl\": the object has been modified; please apply your changes to the latest version and try again" error="websocket: bad handshake"
time="2021-01-18T09:13:00Z" level=error msg="Remotedialer proxy error" error="websocket: bad handshake"
time="2021-01-18T09:13:44Z" level=info msg="Plan monitor checking 120 seconds"
time="2021-01-18T09:13:47Z" level=info msg="Plan monitor checking 120 seconds"
time="2021-01-18T09:13:56Z" level=info msg="Plan monitor checking 120 seconds"
看日志发现跟kubelet
和proxy
有关,于是删掉相关容器,重新注册就好了。
删掉
docker rm nginx-proxy
docker rm share-mnt
docker rm kube-proxy
docker rm kubelet
有时候会出现这个报错,等一下就好了,不用管他:
实在不行就参考:https://www.freesion.com/article/4614705238/
更多推荐
已为社区贡献1条内容
所有评论(0)