# Autorenew gives errors using nginx and ubuntu

**URL:** <https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373>\
**Category:** Help\
**Created:** [February 6, 2018, 5:19pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373 "2018-02-06T17:19:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobinReborn](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/robinreborn/32/17911_2.png) [@RobinReborn](https://community.letsencrypt.org/u/RobinReborn)\
**Post date:** [February 6, 2018, 5:19pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/1 "2018-02-06T17:19:11Z")

</div>

I’m trying to set up auto-renew and I’m not sure if it’s working, here is an abridged output of the command:

sudo certbot renew --dry-run

Congratulations, all renewals succeeded. The following certs have been renewed:  
/etc/letsencrypt/live/ultimaterehabestimator.com/fullchain.pem (success)  
/etc/letsencrypt/live/ultimaterehabestimator.com-0001/fullchain.pem (success)  
/etc/letsencrypt/live/www.ultimaterehabestimator.com/fullchain.pem (success)  
\*\* DRY RUN: simulating ‘certbot renew’ close to cert expiry  
\*\* (The test certificates above have not been saved.)  
Running post-hook command: nginx

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:444 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:444 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:444 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:444 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)  
nginx: [emerg] bind() to 0.0.0.0:444 failed (98: Address already in use)  
nginx: [emerg] still could not bind()

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [February 6, 2018, 6:22pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/2 "2018-02-06T18:22:56Z")

</div>

Hi @RobinReborn,

How did you originally obtain these certificates? (What commands did you run?)

---

<div class="post-metadata">

**Author:** ![RobinReborn](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/robinreborn/32/17911_2.png) [@RobinReborn](https://community.letsencrypt.org/u/RobinReborn)\
**Post date:** [February 6, 2018, 6:26pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/3 "2018-02-06T18:26:07Z")

</div>

It’s a legacy project so the certificates were there before I started working on it.

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [February 6, 2018, 6:29pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/4 "2018-02-06T18:29:48Z")

</div>

OK, can you post the result of running this command as root?

`cat /etc/letsencrypt/renewal/*`

---

<div class="post-metadata">

**Author:** ![RobinReborn](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/robinreborn/32/17911_2.png) [@RobinReborn](https://community.letsencrypt.org/u/RobinReborn)\
**Post date:** [February 6, 2018, 6:31pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/5 "2018-02-06T18:31:16Z")

</div>

# renew\_before\_expiry = 30 days

version = 0.17.0  
archive\_dir = /etc/letsencrypt/archive/ultimaterehabestimator.com-0001  
cert = /etc/letsencrypt/live/ultimaterehabestimator.com-0001/cert.pem  
privkey = /etc/letsencrypt/live/ultimaterehabestimator.com-0001/privkey.pem  
chain = /etc/letsencrypt/live/ultimaterehabestimator.com-0001/chain.pem  
fullchain = /etc/letsencrypt/live/ultimaterehabestimator.com-0001/fullchain.pem

# Options used in the renewal process

[renewalparams]  
authenticator = nginx  
installer = nginx  
account = aa6e30c1172b7d6dbfdd3e9b7c2ad224

# renew\_before\_expiry = 30 days

cert = /etc/letsencrypt/live/ultimaterehabestimator.com/cert.pem  
privkey = /etc/letsencrypt/live/ultimaterehabestimator.com/privkey.pem  
chain = /etc/letsencrypt/live/ultimaterehabestimator.com/chain.pem  
fullchain = /etc/letsencrypt/live/ultimaterehabestimator.com/fullchain.pem  
version = 0.17.0  
archive\_dir = /etc/letsencrypt/archive/ultimaterehabestimator.com

# Options and defaults used in the renewal process

[renewalparams]  
installer = nginx  
authenticator = standalone  
account = aa6e30c1172b7d6dbfdd3e9b7c2ad224  
pre\_hook = nginx -s stop  
post\_hook = nginx

# renew\_before\_expiry = 30 days

cert = /etc/letsencrypt/live/www.ultimaterehabestimator.com/cert.pem  
privkey = /etc/letsencrypt/live/www.ultimaterehabestimator.com/privkey.pem  
chain = /etc/letsencrypt/live/www.ultimaterehabestimator.com/chain.pem  
fullchain = /etc/letsencrypt/live/www.ultimaterehabestimator.com/fullchain.pem  
version = 0.17.0  
archive\_dir = /etc/letsencrypt/archive/www.ultimaterehabestimator.com

# Options and defaults used in the renewal process

[renewalparams]  
installer = nginx  
authenticator = nginx  
account = aa6e30c1172b7d6dbfdd3e9b7c2ad224

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [February 6, 2018, 6:34pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/6 "2018-02-06T18:34:38Z")

</div>

Interesting, it looks like the previous person who obtained the certificates tried a couple of slightly contradictory methods for obtaining them, perhaps without realizing that all of the old methods were being saved rather than being replaced by the new ones.

I think there will be an option for deleting some of these and just keeping the one that works best, but it might be a little subtle to figure out which one that is. Could you also please run `certbot certificates` so we can see exactly which domain names each of these covers?

---

<div class="post-metadata">

**Author:** ![Patches](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/patches/32/17145_2.png) [@Patches](https://community.letsencrypt.org/u/Patches)\
**Post date:** [February 12, 2018, 10:36pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/7 "2018-02-12T22:36:22Z")

</div>

3 posts were split to a new topic: [Nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)](https://community.letsencrypt.org/t/nginx-emerg-bind-to-80-failed-98-address-already-in-use/52914)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [March 14, 2018, 10:36pm UTC](https://community.letsencrypt.org/t/autorenew-gives-errors-using-nginx-and-ubuntu/52373/8 "2018-03-14T22:36:33Z")

</div>

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