I have undertaken an upgrade of our Ubuntu server from 18
to 20.04
.
During the installation I had no errors reported and, once completed, I was able to log onto the server directly (through PuTTY) and all seemed fine.
However, this server is used as our Moodle server and the website failed (refused to connect).
One of our technicians sent me the following information...
On running the command sudo systemctl start apache2
, we receive an error and prompt to run a status command.
On running the status command sudo systemctl status apache2
, the server confirms that the apache2 service is reporting a syntax error on line 140 of /etc/apache2/apache2.conf
. By catting this file (or better, opening to edit via WinSCP) we can see that line 140 has command IncludeOptional mods-enabled/*.load
.
This command is attempting to import the auto_ntlm_winbind
module, located at /usr/lib/apache2/modules/mod_auth_ntlm_winbind.so
which does not appear to exist. I've attempted to manually re-add the missing .so file but this has not changed the issue.
So, today I tried to reinstall Apache2. This flagged up that mysql-server-8.0
was not working correctly.
So, I tried to repair mysql-server-8.0
but to no avail. The reinstallation kept telling me that the error logs were in /var/log/mysql/
but I cannot access this directory (mysql
); permission denied (I have an admin user account and should have total control over the server). I have tried chown
(with sudo
) but still no luck.
The first error I spot with any of the alterations I have tried is:
2023-08-01T13:44:06.810792Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
If I run systemctl status mysql.services
I get...
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start) since Tue 2023-08-01 14:50:34 BST; 5s ago
Process: 2814768 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 2814779 (mysqld)
Status: "Server startup in progress"
Tasks: 12 (limit: 9424)
Memory: 278.0M
CGroup: /system.slice/mysql.service
└─2814779 /usr/sbin/mysqld
And if I do journalctl -xe
then everything it reports seems fine (all relevant services queued have been started).
Continuing with the error list I have I get...
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2023-08-01 14:44:18 BST; 34ms ago
Process: 2812282 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 2812304 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 2812304 (code=exited, status=1/FAILURE)
Status: "Server shutdown complete"
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
Errors were encountered while processing:
mysql-server-8.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
So, it appears that I cannot run Apache2 because mysql is not running, which is not running because mysql-server-8 is not running; but I seem to be chasing my tail here.
Many of the advice steps I find are about flushing the database and I do NOT want to do that!
Any help please?