Ark*_*der 5 ssl json http mongodb node.js
我尝试使用官方mongo Docker镜像以及khezen/mongo,当我尝试建立未加密的HTTP连接时,我收到相同的错误消息:
AssertionException handling request, closing client connection: 17133 SSL handshake requested, SSL feature not available in this build
Run Code Online (Sandbox Code Playgroud)
这是来自khezen/mongo的消息.官方mongo图像给出了稍微不同的错误:
AssertionException handling request, closing client connection: 17132 SSL handshake received but server is started without SSL support
Run Code Online (Sandbox Code Playgroud)
当使用自定义命令(mongod --sslMode allowSSL --sslPEMKeyFile /data/db/mongodb.pem
)从docker-compose.yml启动官方mongo映像时:
SSL: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
Run Code Online (Sandbox Code Playgroud)
现在,这是在尝试从邮递员提出以下请求时:
模式:POST
URL:http:// localhost:27017/lasdf?client = asdf
数据负载:
{
"gargen": "flagren",
"jiminy": {
"crickets": 1,
"isChirping": false
},
"blargen": "fargle",
"_id": "a96c2a4ec6fb4a8dbe2305687eb0e50b"
}
Run Code Online (Sandbox Code Playgroud)
有趣的是,当我将' http
' 更改为' '时,https
我没有收到任何错误消息,但也没有响应,当然数据库也没有更改.
更奇怪的是,我是能够通过访问数据库mongo-express
泊坞窗图像.它的默认配置不会对mongodb执行HTTPS请求,因为当我将自定义命令更改为' --sslMode requireSSL
'时,它无法连接.
安装在容器中的MongoDB版本是3.4.2.
归档时间: |
|
查看次数: |
2564 次 |
最近记录: |