NEED HELP! Let's Encrypt was removed after updates?

I am running Let’s encrypt on Ubuntu 16.04 and the latest version of Apache2.

I did a sudo apt-get update and sudo apt-get upgrade.
After this, Let’s Encrypt was deinstalled? The folder /etc/letsencrypt was there no more?
So apache did not start because it can not complete the configtest.

I need my websites back up, how to fix this issue? I have reinstalled Let’s encrypt certbot but it if i want to add a certificate for a site it says apache is not running (which it isn’t) because there is now certificate.

This is the apache error log:

root@WebServer:~# systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Sun 2017-07-02 15:40:19 CEST; 2min 44s ago
Docs: man:systemd-sysv-generator(8)
Process: 20599 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jul 02 15:40:19 WebServer apache2[20599]: *
Jul 02 15:40:19 WebServer apache2[20599]: * The apache2 configtest failed.
Jul 02 15:40:19 WebServer apache2[20599]: Output of config test was:
Jul 02 15:40:19 WebServer apache2[20599]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/duidelijkintekst.nl-le-ssl.conf: No such file or directory
Jul 02 15:40:19 WebServer apache2[20599]: Action ‘configtest’ failed.
Jul 02 15:40:19 WebServer apache2[20599]: The Apache error log may have more information.
Jul 02 15:40:19 WebServer systemd[1]: apache2.service: Control process exited, code=exited status=1
Jul 02 15:40:19 WebServer systemd[1]: Failed to start LSB: Apache2 web server.
Jul 02 15:40:19 WebServer systemd[1]: apache2.service: Unit entered failed state.
Jul 02 15:40:19 WebServer systemd[1]: apache2.service: Failed with result ‘exit-code’.

Please help if you have any solution!

@jaccovdwijgaart, I’m not sure how this could have happened—maybe @bmw can look into the packaging/update question.

In terms of being able to re-run Certbot, you can move all of the -le-ssl.conf files out of /etc/apache2/sites-enabled and into somewhere else (like /tmp or your home directory), and then Apache should be able to restart, and then you should be able to re-perform the certificate issuance process.

If you have made any changes to the -le-ssl.conf file(s), you could then manually re-integrate those.

From the man page of apt-get:

upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. An update must be performed first so that apt-get knows that new versions of packages are available.

apt-get update && apt-get upgrade should never remove your packages or you’ve found a bug in apt-get. Is it possible letsencrypt was removed before this command was run?

apt should not remove any files. Check your apt log in /var/log/apt/history.log and see what the upgrade did.
Also, check to see if the files are in /etc/apache2/sites-available. If so, you may just need to reenable the site with apache2ctl.

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