CURL 访问https 发生 NSS error -12190 错误
环境:
CentOS 7
问题:
在使用
curl https://192.168.1.8:6443/api/v1/nodes --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt --key /etc/kubernetes/pki/apiserver-kubelet-client.key --cacert /etc/kubernetes/pki/ca.crt -v
发生错误 NSS error -12190 (SSL_ERROR_PROTOCOL_VERSION_ALERT):
* Connection died, retrying a fresh connect
* Closing connection 0
* Issue another request to this URL: 'https://192.168.1.8:6443/api/v2/nodes'
* About to connect() to 192.168.1.8 port 6443 (#1)
* Trying 192.168.231.224...
* Connected to 192.168.1.8 (192.168.1.8) port 6443 (#1)
* TLS disabled due to previous handshake failure
* CAfile: /etc/kubernetes/pki/ca.crt
CApath: none
* NSS error -12190 (SSL_ERROR_PROTOCOL_VERSION_ALERT)
* Peer reports incompatible or unsupported protocol version.
* Closing connection 1
解决:
(1) yum update nss nss-util nspr
(2)yum update curl
仅更新(1)不起作用,应该是(2)这个起作用了(未验证)。
参考:
1、https://stackoverflow.com/questions/43975973/how-to-fix-error-failed-to-download-on-rbenv-install
2、https://stackoverflow.com/questions/30678583/centos-6-6-curl-returns-error-when-connecting-to-some-ssl-site