【发布时间】:2016-08-02 09:29:48
【问题描述】:
我在 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。有没有人和我一样遇到这个问题?
【问题讨论】:
标签: mongodb ssl curl openshift mlab