DEV Community

Cover image for Let's Encrypt Certbot/acme.sh and the "300 Multiple Choices" Error
Julian
Julian

Posted on

1

Let's Encrypt Certbot/acme.sh and the "300 Multiple Choices" Error

If you want to use letsencrypt and can't get it working even if you have an absolute minimum configuration like that:

server {
  listen *:80;

  server_name           example.com;
  root /var/www/example.com;
}
Enter fullscreen mode Exit fullscreen mode

it can be that your DNS A-Record is pointing to a different location than the AAAA-Record. this can easily happen if you have no direct access to the DNS interface and only the A-Record was changed.

for debian9 (stretch) install the certbot from backports. the shiped version is quite outdated and can lead to Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.

cerbot came up with the, for me, not so helpful error message 300 Multiple Choices and the acme.sh log file also contained only a code='400'

certbot error:

 - The following errors were reported by the server:

   Domain: example.com
   Type:   unauthorized
   Detail: Invalid response from
   http://example.com/.well-known/acme-challenge/TOKEN_REMOVED:
   "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
   <html><head>
   <title>300 Multiple Choices</title>
   </head><body>
   <h1>Multiple C"
Enter fullscreen mode Exit fullscreen mode

acme.sh error:

[Mon May 28 17:37:26 CEST 2018] url='https://acme-staging.api.letsencrypt.org/acme/challenge/TOKEN_REMOVED/ID_REMOVED'
[Mon May 28 17:37:26 CEST 2018] payload='{"resource": "challenge", "keyAuthorization": "KEY_AUTH_REMOVED"}'
[Mon May 28 17:37:26 CEST 2018] POST
[Mon May 28 17:37:26 CEST 2018] _post_url='https://acme-staging.api.letsencrypt.org/acme/challenge/TOKEN_REMOVED/ID_REMOVED'
[Mon May 28 17:37:26 CEST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header  -g '
[Mon May 28 17:37:27 CEST 2018] _ret='0'
[Mon May 28 17:37:27 CEST 2018] code='400'
Enter fullscreen mode Exit fullscreen mode

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (2)

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
c33s profile image
Julian

can you please delete your comment. its simply advertisment for your article

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay