Auto renewal not working

My domain is: xxxxxx.nl

I ran this command: sudo certbot renew

It produced this output:

root@ext:/home/user# sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/s01.xxxxxxx.nl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing…
Could not choose appropriate plugin: The apache plugin is not working; there may be problems with your existing configuration.
The error was: PluginError(‘There has been an error in parsing the file /etc/apache2/sites-enabled/traccar.conf on line 23: Syntax error’,)
Attempting to renew cert (s01.echotech.nl) from /etc/letsencrypt/renewal/s01.xxxxxxx.nl.conf produced an unexpected error: The apache plugin is not working; there may be problems with your existing configuration.
The error was: PluginError(‘There has been an error in parsing the file /etc/apache2/sites-enabled/traccar.conf on line 23: Syntax error’,). Skipping.
All renewal attempts failed. The following certs could not be renewed:
** /etc/letsencrypt/live/s01.xxxxxxx.nl/fullchain.pem (failure)**

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

All renewal attempts failed. The following certs could not be renewed:
** /etc/letsencrypt/live/s01.xxxxxxxx.nl/fullchain.pem (failure)**
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)

My web server is (include version): Apache

The operating system my web server runs on is (include version): Ubuntu 18.04.2 LTS

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

Our webserver is redirected from port 80 to 443 in /etc/apache2/sites-enabled/traccar.conf
Hope somebody knows what i have to change to get de auto renewal working again.

Thanks!

You'll want to repair the syntax error on line 23 of traccar.conf.

Certbot doesn't work if your Apache configuration is in a state of disrepair.

1 Like

The config file only has 22 lines:

<IfModule mod_ssl.c
         <VirtualHost _default_:80>
               ServerName s01.xxxxx.nl
               Redirect / https://s01.xxxxxx.nl
         </VirtualHost>

<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerName s01.xxxxxxx.nl
                ServerAdmin webmaster@localhost
                DocumentRoot /var/www/html
                ProxyPass /api/socket ws://localhost:8082/api/socket
                ProxyPassReverse /api/socket ws://localhost:8082/api/socket
                ProxyPass / http://localhost:8082/
                ProxyPassReverse / http://localhost:8082/
                SSLEngine on
                SSLCertificateFile /etc/letsencrypt/live/s01.xxxxxxx.nl/fullchain.pem
                SSLCertificateKeyFile /etc/letsencrypt/live/s01.xxxxxxx.nl/privkey.pem
                Include /etc/letsencrypt/options-ssl-apache.conf
        </VirtualHost>
</IfModule>
1 Like

Edit: simpler fix is just to remove the very first line of the file:

<IfModule mod_ssl.c
2 Likes

Wow, your the best!

Thank you for the very quick reply’s…

1 Like

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