The server experienced an internal error ("status": 405)

I have a Ubuntu 16.04 server with 20 domains. It’s my 1st time to install SSL on this server.

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot python-certbot-apache

I followed the official docs by running these commands and everything works fine until i run the last command below

 sudo certbot --apache

After running this command, i got this error.

An unexpected error occurred:
The server experienced an internal error :: Error retrieving account “https://acme-v02.api.letsencrypt.org/acme/acct/69870145
Please see the logfiles in /var/log/letsencrypt for more details.

IMPORTANT NOTES:

  • Your account credentials have been saved in your Certbot
    configuration directory at /etc/letsencrypt. You should make a
    secure backup of this folder now. This configuration directory will
    also contain certificates and private keys obtained by Certbot so
    making regular backups of this folder is ideal.

By visiting the link above, i got this full details error message.

{
“type”: “urn:ietf:params:acme:error:malformed”,
“detail”: “Method not allowed”,
“status”: 405
}

Anyone can help ? Please advice. Thanks!

Does this happen every time you try?

If so, it means that something has gone wrong on the Let's Encrypt server that has made your account unusable.

It's probably not your fault, and the best way to fix it is simply to use a different Let's Encrypt account.

Account deactivation probably won't work, so a way you can try to do this is to move your account folder:

mv /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org.old

and then:

certbot register

Thank you for your fast reply. For this server, it’s a fresh install for letsencrypt… I didn’t install any other SSL on this server before…

I meant to say that if you run certbot --apache a few times, it might work the second time. i.e. the issue with your account might have been temporary.

But if it fails consistently, then try using a different account, by following my earlier suggested instructions.

I removed some expired domains on server and run “sudo certbot --apache” again and it installed successfully. However, all the websites are not able to display after choosing

2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you’re confident your site works on HTTPS. You can undo this
change by editing your web server’s configuration.

Urgent! please help !

What are your domain names?

the domain is angoby.com

It seems like you don’t have port 443 (HTTPS) open on your server’s firewall.

If you use ufw, you can do this with:

ufw allow https

You may also want to check inside your Alibaba control panel to see if there is an additional firewall there.

1 Like

I received this details after running “ufw allow https”

Rules updated
Rules updated (v6)

Could it be the firewall issue?

That doesn’t seem to have had an effect.

I think you will need to check with your cloud provider to see how you can unblock port 443. Something like this - https://www.alibabacloud.com/help/doc-detail/25471.htm - but I’m not sure whether it’s applicable to the hosting product you use.

1 Like

awesome! I have add a new rule for port 443 , now everything works fine. Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.