gpt4 book ai didi

mongodb - Openshift 中 curl 的 SSL 错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:46:22 25 4
gpt4 key购买 nike

我在 Openshift 中通过 ssh 连接到我的应用程序,并像这样使用 curl 发出 POST 请求(到 mlab 数据库 mongoDB 服务器):

curl --trace -s -H "Content-Type: application/json" -X POST -d '{"m":"hihihi","t":"category","tid":"393"}'  https://api.mlab.com/api/1/databases/babi/collections/massrequest?apiKey=CvI9xC12d4dgjxTncXLz_y-PqNhqwP7RE

跟踪结果表明:

== Info: About to connect() to api.mlab.com port 443 (#0)
== Info: Trying 54.144.240.132... == Info: connected
== Info: Connected to api.mlab.com (54.144.240.132) port 443 (#0)
== Info: Initializing NSS with certpath: sql:/etc/pki/nssdb
== Info: CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
== Info: NSS error -12286
== Info: Closing connection #0
== Info: SSL connect error
curl: (35) SSL connect error

我不知道为什么我无法使用此 POST 请求连接到 mLab API。有没有人和我一样遇到这个问题?

最佳答案

这可能是 curl 版本。在我的 OpenShift 帐户上,我发现它很旧:

[mydomain.com [...]]\> curl --version
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

同样的问题请看这里:curl: (35) SSL connect error

关于mongodb - Openshift 中 curl 的 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38716673/

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