ssl - 将 https 与 curl 一起使用,但仍然出现“GET_SERVER_HELLO:unknown protocol”错误
问题描述
我正在尝试在 docker 实例中使用 curl 到达 https 端点。尽管我使用的是“https”,但我收到了一个错误,“error:140770FC:SSLroutines:SSL23_GET_SERVER_HELLO:unknown protocol”。我还需要做什么才能到达终点?这是痕迹...
root@my-instance:/app# curl -v https://localhost:3056/myusers/242
* Trying ::1...
* TCP_NODELAY set
* connect to ::1 port 3056 failed: Connection refused
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 3056 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
* Curl_http_done: called premature == 1
* stopped the pause stream!
* Closing connection 0
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
解决方案
推荐阅读
- unity3d - 使用 UFPS 和 Inventory Pro 时如何在 Unity 中锁定光标?
- scala - build.spark:添加火花依赖
- node.js - 如何防止由于刷新导致的多个用户输入(Node JS)
- python - 不和谐机器人上的 YouTube 搜索
- c# - IActionResult .Net Core 上的默认参数
- html - Rotativa 不显示所有内容
- python - 添加 Keras Lambda 层后获取新输出?
- java - 在抽象方法中抓取参数
- java - 使用有效数字的 BigDecimal 除法
- python - 在 Pandas 中读取 CSV 时忽略一行