| SYSTEM INFORMATION|| |------------------------------|-------------------------------| | OS type and version | Ubuntu 20.0.4 | | Webmin version | 2.101 | | Virtualmin version | 7.7 | | Related packages | SSL Setting |
Hello.
Our website hasn’t been running since a while ago.
We have been receiving for a few hours when we try to connect to our web site, the following error:
However, our site online for about 2 months, was working until a while ago. BUT WEIRDLY, we have been completely unable to connect for a few hours.
We are disappointed because it is a brand new project that we are launching and we are still at our beginning. If in the long run, we have to be confronted with these problem people, then we might as well not move forward.
Is there any way to restore our Website site please without reinstalling it exactly how it was ???
Why and how to fix that DataBase error ???
MySQL or Mariadb (probably mariadb, but that depends on when you installed Virtualmin, on Ubuntu) is not running.
Try to start it, and see what errors you get.
systemctl restart mysql
Then check status:
systemctl status mysql
If it is running, your apps should be working again. If it is not running, you need to figure out why. Look at (and actually read) the messages on the status, and then also check the journal for the mysql unit.
root@host:~# systemctl restart mysql
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
returns us:
root@host:# systemctl status mysql
● mariadb.service - MariaDB 10.3.38 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2023-08-13 02:09:22 CEST; 2min 9s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 261005 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Aug 13 02:09:20 host.w...klx.tech systemd[1]: Starting MariaDB 10.3.38 database server...
Aug 13 02:09:22 host.w...klx.tech systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 02:09:22 host.w...klx.tech systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 13 02:09:22 host.w...klx.tech systemd[1]: Failed to start MariaDB 10.3.38 database server.
This returns us:
root@host:# journalctl --since=yesterday -u mysql
-- Logs begin at Sat 2023-08-12 02:35:36 CEST, end at Sun 2023-08-13 02:35:58 CEST. --
-- No entries --
root@host:#
root@host:# journalctl --since=yesterday -u mariadb
-- Logs begin at Sat 2023-08-12 02:35:36 CEST, end at Sun 2023-08-13 02:42:10 CEST. --
Aug 12 23:33:28 host.w...lx.tech systemd[1]: Stopping MariaDB 10.3.38 database server...
Aug 12 23:33:31 host.w...lx.tech systemd[1]: mariadb.service: Succeeded.
Aug 12 23:33:31 host.w...lx.tech systemd[1]: Stopped MariaDB 10.3.38 database server.
Aug 12 23:33:31 host.w...lx.tech systemd[1]: Starting MariaDB 10.3.38 database server...
Aug 12 23:33:33 host.w...lx.tech systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 12 23:33:33 host.w...lx.tech systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 12 23:33:33 host.w...lx.tech systemd[1]: Failed to start MariaDB 10.3.38 database server.
Aug 13 01:24:13 host.w...lx.tech systemd[1]: Starting MariaDB 10.3.38 database server...
Aug 13 01:24:16 host.w...lx.tech systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 01:24:16 host.w...lx.tech systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 13 01:24:16 host.w...lx.tech systemd[1]: Failed to start MariaDB 10.3.38 database server.
Aug 13 01:29:55 host.w...lx.tech systemd[1]: Starting MariaDB 10.3.38 database server...
Aug 13 01:29:58 host.w...lx.tech systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 01:29:58 host.w...lx.tech systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 13 01:29:58 host.w...lx.tech systemd[1]: Failed to start MariaDB 10.3.38 database server.
Aug 13 02:09:20 host.w...lx.tech systemd[1]: Starting MariaDB 10.3.38 database server...
Aug 13 02:09:22 host.w...lx.tech systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 02:09:22 host.w...lx.tech systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 13 02:09:22 host.w...lx.tech systemd[1]: Failed to start MariaDB 10.3.38 database server.
Aug 13 02:30:28 host.w...lx.tech systemd[1]: Starting MariaDB 10.3.38 database server...
Aug 13 02:30:32 host.w...lx.tech systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 02:30:32 host.w...lx.tech systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 13 02:30:32 host.w...lx.tech systemd[1]: Failed to start MariaDB 10.3.38 database server.
Aug 13 02:31:59 host.w...lx.tech systemd[1]: Starting MariaDB 10.3.38 database server...
Aug 13 02:32:01 host.w...lx.tech systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 02:32:01 host.w...lx.tech systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 13 02:32:01 host.w...lx.tech systemd[1]: Failed to start MariaDB 10.3.38 database server.
root@host:#
Do you a allow remote connections to MySQL/MariaDB (direct connections to the database from hosts other than the server itself…i.e. not local PHP apps, but some system outside of yours making a connection to MariaDB on port 3306)?
If not, just disable SSL/TLS unless/until you’re able to sort out the problem with the certificate.
Browse to Webmin->Servers->MariaDB Database Server->SSL Certificate
Thinking about it, I think that problem appeared after generating a new Let’s Encrypt Wildcard SSL Certificatfor one of Virtual Server and clicking on “Set as Default Services Certificate” circled in RED on the following Screenchot:
Keep scrolling. The two images are just one post in a long thread, where jimr1 explains another way to fix it (it’s the same solution I gave above, but using the command line…since doing it in Webmin didn’t work for reasons I can’t guess, might as well do it on the command line…since it will resolve your problem, if you disable SSL in MariaDB).