gpt4 book ai didi

kubernetes - 尝试使用Kubespray部署Kuberntes时发生SSLError:('The read operation timed out',)

转载 作者:行者123 更新时间:2023-12-02 11:39:43 25 4
gpt4 key购买 nike

您好,在此先感谢您的帮助!

我正在尝试使用Kubespray(一个有趣的剧本)部署Kubernetes集群。我正在尝试在17个KVM主机上部署群集(所有节点都在运行centos 7并托管在裸机服务器上)

但是,当我尝试在任务[download : file_download | Download item]上运行剧本时
我收到以下错误(并因此停止了安装):

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SSLError: ('The read operation timed out',)                                                                                                                              
fatal: [node1]: FAILED! => {"attempts": 4, "changed": false, "msg": "failed to create temporary content file: ('The read operation timed out',)"}

对于大多数节点BUT来说,此错误是相同的,有些节点愿意降级。

这是详细模式下的错误:
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_get_url_payload_72qREk/__main__.py", line 360, in url_get
shutil.copyfileobj(rsp, f)
File "/usr/lib64/python2.7/shutil.py", line 49, in copyfileobj
buf = fsrc.read(length)
File "/usr/lib64/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/usr/lib64/python2.7/httplib.py", line 602, in read
s = self.fp.read(amt)
File "/usr/lib64/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/usr/lib64/python2.7/ssl.py", line 757, in recv
return self.read(buflen)
File "/usr/lib64/python2.7/ssl.py", line 651, in read
v = self._sslobj.read(len or 1024)
SSLError: ('The read operation timed out',)

fatal: [node14]: FAILED! => {
"attempts": 4,
"changed": false,
"invocation": {
"module_args": {
"attributes": null,
"backup": null,
"checksum": "",
"client_cert": null,
"client_key": null,
"content": null,
"delimiter": null,
"dest": "/tmp/releases/kubeadm",
"directory_mode": null,
"follow": false,
"force": false,
"force_basic_auth": false,
"group": null,
"headers": null,
"http_agent": "ansible-httpget",
"mode": "0755",
"owner": "root",
"regexp": null,
"remote_src": null,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"sha256sum": "c4fc478572b5623857f5d820e1c107ae02049ca02cf2993e512a091a0196957b",
"src": null,
"timeout": 10,
"tmp_dest": null,
"unsafe_writes": null,
"url": "https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/linux/amd64/kubeadm",
"url_password": null,
"url_username": null,
"use_proxy": true,
"validate_certs": true
}
},
"msg": "failed to create temporary content file: ('The read operation timed out',)"
}

我尝试连接到节点并尝试下载一个项目(我尝试下载Kubspray zip),并且它起作用了,所有节点都可以连接到Internet并可以安装软件包。

从详细的输出中,我有点理解该错误来自python,但是我真的不知道如何解决它。

让我知道是否能再给您提供另一条信息和再次感谢,谢谢!

最佳答案

因此,我“解决”了问题。

实际上,对于所有与ssh相关的命令/读取/写入任务,Ansbible的超时时间为10秒。
由于未知的原因,我的节点上的写入任务有点慢,所以出现了此错误。
幸运的是,您可以更改超时之前的时间。

您可以使用参数-T(或-tiemout)'time_wanted'或更改ansible.cfg。
“基本” cfg文件位于etc/ansible/ansible.etc中,但请注意,某些自定义的ansible剧本将具有自定义的ansible.cfg,因此您需要找到它并根据需要进行更改。

我很幸运,我第四次运行剧本时,它顺利安装了K8s。

出于测试原因,我在KVM上运行节点,因此写入速度可能来自此处。

希望有人会对我的回答有用!

关于kubernetes - 尝试使用Kubespray部署Kuberntes时发生SSLError:('The read operation timed out',),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55891103/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com