error:140770fc:sslroutines:ssl23_get_server_hello:未知协议

eit6fx6z  于 2021-06-03  发布在  Hadoop
关注(0)|答案(3)|浏览(1587)

我目前正在尝试测试在clouderahadoop环境中实现的使用加密洗牌实现安全性的更改。
我已经创建了证书和密钥库,并将它们保存在适当的位置。
我正在测试tasktracker的https端口50060。
当我在那个端口上做 curl 时,我得到的是低于错误响应的结果。

ubuntu@node2:~$ curl -v -k "https://10.0.10.90:50060"

* About to connect() to 10.0.10.90 port 50060 (#0)
* Trying 10.0.10.90... connected
* successfully set certificate verify locations:
* CAfile: none

  CApath: /etc/ssl/certs

* SSLv3, TLS handshake, Client hello (1):
* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
* Closing connection #0

curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

当我检查openssl客户端时,得到了下面的响应

ubuntu@node2:~$ openssl s_client -connect 10.0.10.90:50060
CONNECTED(00000003)
139749924464288:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:749:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 225 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

我不知道是什么导致了这个问题?
有什么我不知道的吗?
ps:我已经更新了 ca-certificates.crt 并保存了服务器 .crt 文件位于 /usr/share/ca-certificates/mozilla

56lgkhnf

56lgkhnf1#

对于任何有此问题的人:
error:140770fc:sslroutines:ssl23_get_server_hello:未知协议。
我的问题是curl默认使用ipv6而不是ipv4。终端服务器未正确配置以响应ipv6,因此观察到相同的问题语句。确保curl正在使用ipv4或者您的服务器可以使用ipv6。

wtzytmuj

wtzytmuj2#

error:140770fc:sslroutines:ssl23_get_server_hello:未知协议
似乎没有ssl/tls服务器在侦听10.0.10.90:50060。有一个服务器正在侦听,而不是ssl/tls。
我可以在通过端口80(而不是443)连接到网关时复制它。

$ openssl s_client -connect 192.168.1.1:80
CONNECTED(00000003)
140735109476828:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:787:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 517 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

如果你使用 -debug 旗帜,你会看到 HTTP 在openssl试图解释为ssl/tls协议数据的响应中:

$ openssl s_client -connect 192.168.1.1:80 -debug
CONNECTED(00000003)
write to 0x7fbf58422b90 [0x7fbf58811800] (348 bytes => 348 (0x15C))
0000 - 16 03 01 01 57 01 00 01-53 03 03 64 1d 01 29 f0   ....W...S..d..).
...
0150 - 03 02 01 02 02 02 03 00-0f 00 01 01               ............
read from 0x7fbf58422b90 [0x7fbf58816e00] (7 bytes => 7 (0x7))
0000 - 48 54 54 50 2f 31 2e                              HTTP/1.
140735203164636:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:794:
6uxekuva

6uxekuva3#

我在https上运行airflow web服务器服务时遇到这种错误。我错误地在属性(key)文件中提到了.key文件路径,而不是启用https的.pem文件路径。
更正了.pem文件路径而不是.key文件路径,工作正常。

相关问题