Red Hat 上的 CuRL SSL 握手问题
CuRL SSL handshake issue on Red Hat
我正在尝试从我的 Red Hat (Jenkins) 服务器使用 CuRL 在另一台服务器 (IBM Security Access Manager) 上调用 REST API。
问题是,从我的 Windows 机器上,我可以使用 CuRL 并成功调用 REST API,但不能从我的服务器(Jenkins 和普通命令行)调用。
好像握手没有完成...
在适当的端口上两者之间存在连接。我用 telnet 命令 (telnet my.full.ip.adress 443) 对此进行了测试,在查看详细输出时,甚至 CuRL 似乎也已连接:
15:05:31.930998 * About to connect() to my.full.ip.adress port 443
15:05:31.931062 * Trying my.full.ip.adress... connected
15:05:31.931651 * Connected to my.full.ip.adress (my.full.ip.adress) port 443
15:05:31.937510 * successfully set certificate verify locations:
15:05:31.937531 * CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
15:05:31.937629 * SSLv2, Client hello (1):
SSL connection timeout
15:06:31.987734 * Closing connection #0
命令 im 运行 现在是:
-bash-3.2$ curl -k -v -H 'Content-type:application/json' -H 'Accept:application/json' --user xxx:xxx -X POST -d '{"my_key":"my_value","another_key":"another_value"}' https://my.full.ip.adress/wga/reverseproxy/
(现在还包括用于测试目的的“--trace-time --show-error --connect-timeout 60”)
防火墙日志显示如下:
(源和目标是上述服务器)
看来是握手过程哪里出错了。
我尝试了以下方法:
- 已确认两台服务器之间的正确端口连接
(SSL/443)
- 使用 -1、-2、-3 参数强制使用其他 SSL 版本
- 通过 运行 从我的 windows 机器上验证了命令。
如果您想知道:
-bash-3.2$ curl -V
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
怎么可能握手不成功?
好的,问题解决了。供他人参考:
事实证明这是一个路由问题。目标服务器 (ISAM) 的路由配置错误,导致对另一个(子)网的回复无效。
因此,如果您遇到同样的问题,请检查您的路由 table :)
我正在尝试从我的 Red Hat (Jenkins) 服务器使用 CuRL 在另一台服务器 (IBM Security Access Manager) 上调用 REST API。
问题是,从我的 Windows 机器上,我可以使用 CuRL 并成功调用 REST API,但不能从我的服务器(Jenkins 和普通命令行)调用。 好像握手没有完成...
在适当的端口上两者之间存在连接。我用 telnet 命令 (telnet my.full.ip.adress 443) 对此进行了测试,在查看详细输出时,甚至 CuRL 似乎也已连接:
15:05:31.930998 * About to connect() to my.full.ip.adress port 443
15:05:31.931062 * Trying my.full.ip.adress... connected
15:05:31.931651 * Connected to my.full.ip.adress (my.full.ip.adress) port 443
15:05:31.937510 * successfully set certificate verify locations:
15:05:31.937531 * CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
15:05:31.937629 * SSLv2, Client hello (1):
SSL connection timeout
15:06:31.987734 * Closing connection #0
命令 im 运行 现在是:
-bash-3.2$ curl -k -v -H 'Content-type:application/json' -H 'Accept:application/json' --user xxx:xxx -X POST -d '{"my_key":"my_value","another_key":"another_value"}' https://my.full.ip.adress/wga/reverseproxy/
(现在还包括用于测试目的的“--trace-time --show-error --connect-timeout 60”)
防火墙日志显示如下:
看来是握手过程哪里出错了。
我尝试了以下方法:
- 已确认两台服务器之间的正确端口连接 (SSL/443)
- 使用 -1、-2、-3 参数强制使用其他 SSL 版本
- 通过 运行 从我的 windows 机器上验证了命令。
如果您想知道:
-bash-3.2$ curl -V
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
怎么可能握手不成功?
好的,问题解决了。供他人参考:
事实证明这是一个路由问题。目标服务器 (ISAM) 的路由配置错误,导致对另一个(子)网的回复无效。
因此,如果您遇到同样的问题,请检查您的路由 table :)