Heroku:连接中出现未知的SSL协议错误

时间:2017-07-17 14:27:14

标签: ruby-on-rails ssl curl heroku

我通过Heroku部署了我的应用程序,并使用他们的Automated Certificate Management工具添加SSL证书,因为旧的手动添加的证书已过期。添加证书并运行heroku certs后,我看到以下内容:

Name                Common Name(s)               Expires               Trusted  Type
──────────────────  ───────────────────────────  ────────────────────  ───────  ────
tyrannosaurs-53659  www.foobar.com               2017-10-15 12:59 UTC  True     ACM

但是当我使用curl测试我的网址时,我看到了:

$ curl -kvI https://www.foobar.com
* Rebuilt URL to: https://www.foobar.com/
*   Trying 54.243.71.103...
* TCP_NODELAY set
* Connected to www.foobar.com (54.243.71.103) port 443 (#0)
* Unknown SSL protocol error in connection to www.foobar.com:-9838
* Curl_http_done: called premature == 1
* Closing connection 0
curl: (35) Unknown SSL protocol error in connection to www.foobar.com:-9838

导航到浏览器中的链接显示没有错误,但我很困惑为什么curl显示错误?

1 个答案:

答案 0 :(得分:0)

当您从手动证书切换到ACM时,有时由于某些原因[速率限制或其他未在任何地方提及(:]的原因,可能会丢失由ACM生成的证书。

我遇到了同样的问题,通过删除并选择ACM选项解决了该问题。

注意:一旦状态在“网域”部分中显示“确定”,ACM就可用。