Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acme::Client::Error::Malformed - Registration key is already in use #54

Open
MincePie opened this issue Oct 6, 2016 · 6 comments
Open

Comments

@MincePie
Copy link

MincePie commented Oct 6, 2016

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

1. Expected behaviour

I've stepped away from this for a day, calmed down and am trying again.

When I went through the steps again (I found an issue telling me to mkdir key before generating the key) which seems to have solved part of my problem, but now when i try to run: heroku run rake letsencrypt_plugin, i expect to see the results as shown in the gem's read.

2. Actual behavior

Instead, I get:

Trying to register at Let's Encrypt service...
I, [2016-10-06T21:49:21.020022 #3] INFO -- : Loading private key...
I, [2016-10-06T21:49:21.340619 #3] INFO -- : Acme::Client::Error::Malformed - Registration key is already in use
I, [2016-10-06T21:49:21.340704 #3] INFO -- : Already registered.
I, [2016-10-06T21:49:21.340744 #3] INFO -- : Sending authorization request for: <%=...
rake aborted!
Acme::Client::Error::Malformed: Invalid character in DNS name

3. Steps to reproduce issue

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

Rails 5, Ruby 2.3.1 and this gem is in the gem file. I would love to figure this out. It's driving me crazy.

@jasper-lyons
Copy link
Contributor

Given this line:

I, [2016-10-06T21:49:21.340744 #3] INFO -- : Sending authorization request for: <%=...

I think there is an issue with the format of the domain: key in you letsencrypt_plugin yml.

Could you try changing the single quotes around the domain '<%= ... %>' to `domain: "<%= ... %>"

This may not solve all your problems but might get you a step further.

Replacing the ... with

@hovancik
Copy link

hovancik commented Nov 8, 2016

Using "<%= ... %>" from https://github.com/lgromanowski/letsencrypt-plugin/wiki/Installation-guide didn't work for me as well. One should use domain: example.com www.example.com

@jasper-lyons
Copy link
Contributor

Hey hovancik,

The letsencrypt_plugin.yml should be evaluated by ERB.

Would you mind sharing your .yml (with important info redacted) and the version of rails and leysencrypt_plugin you're using?

@hovancik
Copy link

hovancik commented Nov 8, 2016

yml is the same as in installation guide, except I commented out challenge_dir_name (I'm on heroku and I wanna use DB).

letsencrypt_plugin (0.0.9), rails (4.2.7.1)

@hovancik
Copy link

hovancik commented Nov 8, 2016

related error:

I, [2016-11-07T16:30:03.939103 #3]  INFO -- : Sending authorization request for: <%=...
rake aborted!
Acme::Client::Error::Malformed: Invalid character in DNS name

@jasper-lyons
Copy link
Contributor

Thanks for that Hovancik.

It looks like the code + documentation here is a bit a head of the code in the gem letsencrypt_plugin-0.0.9

You can check by comparing ./lib/letsencrypt_plugin.rb in the master of this repository with the code in ./lib/letsencrypt_plugin when you gem unpack letsencrypt_plugin.

I will see if @lgromanowski is up for bumping the version number and publishing an update. If you'd like to have the ability to use ERB in the template you can install the gem from the master branch of this repo by putting

gem 'letsencrypt_plugin', github: 'lgromanowski/letsencrypt-plugin'

into your Gemfile and then bundle install.

Otherwise taking all of the erb related stuff out of your letsencrypt_plugin.yml is exactly the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants