从 Lets Encrypt 获取 SSL 证书时出现超时错误

TimeOut Error while obtaining SSL certificate from Lets Encrypt

我正在关注 rails acme-client 以自动完成获取证书的任务

提出 CSR 请求的代码

new_private_key = OpenSSL::PKey::RSA.new(4096)
csr = Acme::Client::CertificateRequest.new(private_key: new_private_key, subject: { common_name: '4a58d2f2.ngrok.io' })
order.finalize(csr: csr)
sleep(5) while order.status == 'processing'
puts "certificate ordered=#{order.certificate}"

我已成功完成 http 挑战 作为 challenge.status returns 有效

我在最后一行收到错误 Acme::Client::Error::Timeout

puts "certificate ordered=#{order.certificate}"

事实上 order.status 有效。真奇怪!

如有任何帮助,我们将不胜感激!

参考Last FAQ on the official website of lets encrypt

我在 Heroku 上托管了 rails 应用程序,它已全部修复。

错误也可能是因为我试图为 ngrok.io

的 url 获取证书