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
---------------------
原文:https://blog.csdn.net/hongweigg/article/details/78761454