Certbot failed with error code (1) Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Lorem
Posts: 10
Joined: Mon Oct 05, 2020 11:45 pm

Certbot failed with error code (1)

Post by Lorem »

Hello again!

I've decided I'd probably like to access Nextcloud outside of my home so decided to setup SSL following @Joulinar's very helpful guidelines on another post!

I've set up a domain via no-ip, installed this onto the Pi and checked the IP updates successfuly.
I've then logged into my router (ZTE) and configured port forwarding for 80 and 443 with my LAN IP.

When I run dietpi-letsencrypt and initiate I get 'Certbot failed with error code (1)'

Code: Select all

Domain: XXXXXXXX.hopto.org
   Type:   connection
   Detail: Fetching
   http://XXXXXXXXX.hopto.org/.well-known/acme-challenge/PsZVYR5deG1BHIYF4Eaq3eCe04urXXXvweJ7ZCDGBzlEuN8:
   Timeout during connect (likely firewall problem)

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.
[FAILED] Certbot failed with error code (1), please check its terminal output. Aborting...
As far as I'm aware I've set it up as instructed, I've also set firewall settings to 'Low' as opposed to the previous 'High' thinking this could help based on the above.

Thanks in advance!
User avatar
Joulinar
Posts: 2277
Joined: Sat Nov 16, 2019 12:49 am

Re: Certbot failed with error code (1)

Post by Joulinar »

Hi,
  1. Can you check if your system is reachable via DDNS on port 80/http from internet? This is something that would need to work to get a certificate created.
  2. As well you can check on NoIP website if your IP address was correctly registered.
  3. To double check, you have forwarded port 80/443 TCP (not UDP) on your router?
  4. Do you have a VPN client running on your DietPi device?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lorem
Posts: 10
Joined: Mon Oct 05, 2020 11:45 pm

Re: Certbot failed with error code (1)

Post by Lorem »

Hi @Joulinar!

I've had a little play and can only access the NOIP Link when the IP it points to is the local ip of the Pi (ie 192.168.1.123) – once it updates to the dynamic IP it doesn't work anymore.

No VPN is running on the device :)

Thanks
L
User avatar
Joulinar
Posts: 2277
Joined: Sat Nov 16, 2019 12:49 am

Re: Certbot failed with error code (1)

Post by Joulinar »

Do you have forwarded port 80/443 TCP (not UDP) on your router to DietPi device?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lorem
Posts: 10
Joined: Mon Oct 05, 2020 11:45 pm

Re: Certbot failed with error code (1)

Post by Lorem »

I believe so. I''ve forwarded port 80 and 443 to the Pi's LAN IP.
I'm on 64bit - could this have anything to do with the error?
User avatar
Joulinar
Posts: 2277
Joined: Sat Nov 16, 2019 12:49 am

Re: Certbot failed with error code (1)

Post by Joulinar »

this should not matter. do you have any firewall or additional security software installed?

Pls can you double check port forwarding on your router
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lorem
Posts: 10
Joined: Mon Oct 05, 2020 11:45 pm

Re: Certbot failed with error code (1)

Post by Lorem »

No additional security installed and I've set firewall settings to Low on my Router / Macbook.
Port forwarding is set up – my ISP said I need a static IP for this to work but I presume NO IP solves this problem?

Screenshot 2020-10-11 at 13.10.03.png

Thanks
User avatar
Joulinar
Posts: 2277
Joined: Sat Nov 16, 2019 12:49 am

Re: Certbot failed with error code (1)

Post by Joulinar »

Can you check if external IP on your internet router is same as the one registered at NoIP? Can you check if you are able to access your system using the external IP directly?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lorem
Posts: 10
Joined: Mon Oct 05, 2020 11:45 pm

Re: Certbot failed with error code (1)

Post by Lorem »

All resolved – Turns out my ISP was using CG-NAT so I had to purchase a static IP.
All working now! :)
Thanks again for the help
User avatar
Joulinar
Posts: 2277
Joined: Sat Nov 16, 2019 12:49 am

Re: Certbot failed with error code (1)

Post by Joulinar »

ah ok, good that you found it. To bad that you need to purchase something in addition.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply