lgromanowski / acme-plugin

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

Heroku - no IP address issue #57

Closed MincePie closed 8 years ago

MincePie commented 8 years ago

Please use markdown formatting for code, configuration or console output.

1. Expected behaviour

When I run: rake letsencrypt_plugin, I expect the challenge files to pass.

2. Actual behavior

Challenge verification failed! Error: urn:acme:error:unknownHost: No valid IP addresses found

3. Steps to reproduce issue

I have a DNS registered with 123-reg and am using heroku for hosting. Heroku doesnt provide an IP address. I have no A records on my DNS. I have a CNAME only (pointing to the heroku alias for my domain).

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

Rails 5, Ruby 2.3.1, this gem is in the gem file

lgromanowski commented 8 years ago

Hi, please check if your website on Heroku is accessible from the Internet, after that please run rake letsencrypt_plugin on Heroku: heroku run rake letsencrypt_plugin RAILS_ENV=your_environment

MincePie commented 8 years ago

it is accessible via the alias name that heroku gives for my custom domain, but when I try to render the page using my custom domain address, I get an error that says: Your connection is not private Attackers might be trying to steal your informationNET::ERR_CERT_COMMON_NAME_INVALID. It's because I'm trying to access via a http request (where its looking for a https request). I have set my production.rb file to have: config.force_ssl = false

MincePie commented 8 years ago

When i try that rake run line (for production environment), I get:

Trying to register at Let's Encrypt service... I, [2016-10-14T08:08:20.511744 #3] INFO -- : Loading private key... I, [2016-10-14T08:08:20.791788 #3] INFO -- : Acme::Client::Error::Malformed - Registration key is already in use I, [2016-10-14T08:08:20.791906 #3] INFO -- : Already registered. I, [2016-10-14T08:08:20.791972 #3] INFO -- : Sending authorization request for: xxxxxxx.com... I, [2016-10-14T08:08:20.920911 #3] INFO -- : Storing challenge information... I, [2016-10-14T08:08:23.046423 #3] INFO -- : Waiting for challenge status... E, [2016-10-14T08:08:24.337001 #3] ERROR -- : Challenge verification failed! Error: urn:acme:error:unknownHost: No valid IP addresses found for mycustomdomain.com

lgromanowski commented 8 years ago

This error appears when LetsEncrypt server can't access your site. It's not a LetsEncrypt plugin issue - please check your DNS configuration.