lgromanowski / acme-plugin

:lock_with_ink_pen: ACME protocol plugin for Ruby on Rails applications
https://rubygems.org/gems/acme_plugin
MIT License
187 stars 30 forks source link

ERROR -- : Challenge verification failed! Error: urn:acme:error:connection: Could not connect to <PARTICULAR_DOMAIN> #63

Closed cyng93 closed 7 years ago

cyng93 commented 7 years ago

Hi all,

I am trying out letsencrypt-plugin for rails and I run into some trouble in getting things setup by following the instruction on README. Any help would be appreciated.

1. Expected behavior

According to the instruction on README, I should get the following result after running $ rake letsencrypt_plugin

I, [...]  INFO -- : Loading private key...
I, [...  INFO -- : Trying to register at Let's Encrypt service...
I, [...]  INFO -- : Already registered.
I, [,,,]  INFO -- : Sending authorization request...
I, [...]  INFO -- : Storing challenge information...
I, [...]  INFO -- : Waiting for challenge status...
I, [...]  INFO -- : Creating CSR...
I, [...]  INFO -- : Saving certificates and key...
I, [...]  INFO -- : Certificate has been generated.

2. Actual behavior

Note that in the output below, I replace the domain I am actually dealing with with

I, [...]  INFO -- : Trying to register at Let's Encrypt service...
I, [...]  INFO -- : Loading private key...
I, [...]  INFO -- : Acme::Client::Error::Malformed - Registration key is already in use
I, [...]  INFO -- : Already registered.
I, [...]  INFO -- : Sending authorization request for: <PARTICULAR_DOMAIN>...
I, [...]  INFO -- : Storing challenge information...
I, [...]  INFO -- : Waiting for challenge status...
E, [...] ERROR -- : Challenge verification failed! Error: urn:acme:error:connection: Could not connect to <PARTICULAR_DOMAIN>

3. Steps to reproduce issue

N/A

4. Your configuration (ruby, rails version, your Gemifile and Gemfile.lock files etc.)

RoR versions: Rails 5.0.1, ruby 2.3.3p222 in rvm 1.28.0.

5. Other references

My sites is on CloudFlare, and I am thinking that this error is actually due to using CloudFlare, as similar question has been asked on letsencrypt forum as well. However the discussion are based on certbot-auto, and I have no clue how I can apply the technique in this letsncrypt-plugin here.

Please lemme know if there's any workaround to get the thing works. Thanks in advanced!

lgromanowski commented 7 years ago

Hi, please disable Cloudflare for the moment when you're using letsencrypt (you can enable it after certificate generation).

exocode commented 7 years ago

@lgromanowski

Should I do this every 90 days? I thought I could make an "autorenew"?

lgromanowski commented 7 years ago

Yes, you should run it every 90 days, there is no "autorenew" in this gem.