Broken Hestia Installation

Dear Team,

I was a running a hestiacp server in good condition until few weeks ago.
Then this issue occured : Backups Module Missing
However I was able to relogin to server after sudo apt upgrade and updating hestiacp. But most websites were throwing 500 internal server error, some websites will load, but on clicking any link, again 500 or 404 not found error will come, and when checking list of services, php fpm versions were down, and couldn’t restart, also nginx, mariadb services were also not showing… so when i checked other threads on forum, I have run the following commands to reinstall hestiacp with broken packages:

v-update-sys-hestia-git hestiacp

then as of now, eve after reboot, I am getting access denied error on all websites, and the web control panel login page is showing up a plain text without any css… Kindly help me to fix the broken installation of hestiacp.

Have you looked in the WebServer Error logs for each site when this happens?

The ONLY time I’ve ever had ANY problems like this it was related to FASTCGI.
I turned it on and off on a couple of sites, hasn’t come back to bite me.

So go to user101 and check their web101 error logs.
Then sign in as user101 and check web102 error logs.

I definitely name everything like that. It makes it easier during scripting.

So the userNAME is 101, 102, 103, etc.
the userCAPTION is cust1domain.com, cust2domain.com, etc.

I can see everything from the frontend easily. And I do have to enumerate through users here and there, and to ME it makes a lot of sense to have all the users named sequentially. I’m kindof a ‘plan-ahead’ type of guy in that sense.

I think that if you were signed in as ROOT or ADMIN you might be able to
tail /home/u101/web/cust1domain.com/web/logs/error.log

and then
tail /home/u102/web/cust2domain.com/web/logs/error.log
tail /home/u103/web/cust3domain.com/web/logs/error.log

I don’t know that exact path, but that would allow you to check in a bunch of error logs without hopping through the gui.

But for ME? the gui is the fastest way to do this. I have a $30 vps running HestiaCP and it’s the FASTEST thing I’ve ever seen!

1 Like

Hi


As you can see nginx template / fastcgi is not being shown in the list.

Attaching the error log here : <!doctype html><html class="no-js" lang="sq"><head><meta charset="utf-8" - Pastebin.com

And during reinstall, further errors to note

Building Hestia Control Panel package...
release.tar.gz                [      <=>                          ]   2.85M  2.68MB/s    in 1.1s
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@csstools/[email protected]',
npm WARN EBADENGINE   required: { node: '^14 || ^16 || >=18' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@csstools/[email protected]',
npm WARN EBADENGINE   required: { node: '^14 || ^16 || >=18' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@csstools/[email protected]',
npm WARN EBADENGINE   required: { node: '^14 || ^16 || >=18' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@csstools/[email protected]',
npm WARN EBADENGINE   required: { node: '^14 || ^16 || >=18' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@vitejs/[email protected]',
npm WARN EBADENGINE   required: { node: '^14.18.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=16 || 14 >=14.17' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14', npm: '>=8' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.18.0 || ^16.14.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.18.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^16.14.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^18 || >=20' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.16' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.18.0', npm: '>=8.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.13.1 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.13.1 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.13.1 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.18' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.18.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.18.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>= 14' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }

> [email protected] preinstall
> npx only-allow npm


> [email protected] prepare
> husky install

fatal: not a git repository (or any of the parent directories): .git
husky - git command not found, skipping install

added 498 packages, and audited 499 packages in 9s

170 packages are looking for funding
  run `npm fund` for details

6 vulnerabilities (4 moderate, 2 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> [email protected] build
> node build.js

/tmp/hestiacp-src/hestiacp-release/node_modules/lightningcss/node/composeVisitors.js:67
      return v?.(item.value);
               ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:85:18)
    at Object.<anonymous> (/tmp/hestiacp-src/hestiacp-release/node_modules/lightningcss/node/index.js:26:34)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
/tmp/hestiacp-src/hestia_1.8.12_arm64/D 100%[============================================================================>]     544  --.-KB/s    in 0s
/tmp/hestiacp-src/hestia_1.8.12_arm64/D 100%[============================================================================>]   1.35K  --.-KB/s    in 0s
/tmp/hestiacp-src/hestia_1.8.12_arm64/D 100%[============================================================================>]     717  --.-KB/s    in 0s
/tmp/hestiacp-src/hestia_1.8.12_arm64/D 100%[============================================================================>]   3.47K  --.-KB/s    in 0s
Building Hestia DEB
dpkg-deb: building package 'hestia' in '/tmp/hestiacp-src/deb//hestia_1.8.12_arm64.deb'.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING - Development builds should not be installed on
systems with live production data without understanding
the potential risks that are involved!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Do you wish to proceed with the installation? [y/n] y
Installing packages...
(Reading database ... 180784 files and directories currently installed.)
Preparing to unpack .../deb//hestia_1.8.12_arm64.deb ...
Unpacking hestia (1.8.12) over (1.8.12) ...
Setting up hestia (1.8.12) ...

                  _   _           _   _        ____ ____
                 | | | | ___  ___| |_(_) __ _ / ___|  _ \
                 | |_| |/ _ \/ __| __| |/ _` | |   | |_) |
                 |  _  |  __/\__ \ |_| | (_| | |___|  __/
                 |_| |_|\___||___/\__|_|\__,_|\____|_|

                    Hestia Control Panel Software Update
                               Version: 1.8.12

=============================================================================

[ ! ] IMPORTANT INFORMATION:

Default configuration files and templates may be modified or replaced
during the upgrade process. You may restore these files from:

Backup directory: /root/hst_backups/100920242230/
Installation log: /root/hst_backups/100920242230/hst-upgrade-100920242230.log
=============================================================================
[ * ] Backing up existing templates and configuration files...
=============================================================================
[ ! ] Performing system health check before proceeding with installation...
[ * ] Health check complete. Starting upgrade from 1.8.12 to 1.8.12...
=============================================================================

[ ! ] The latest version of Hestia Control Panel is already installed.
      Verifying configuration...

The user `hestiamail' is already a member of `hestia-users'.
[ ! ] Updating default web domain templates...
[ ! ] Updating default mail domain templates...
[ ! ] Updating default DNS zone templates...
[ * ] File Manager is up to date (7.10.1)...
[ ! ] Updating File Manager configuration...
[ ! ] Upgrading Roundcube to version 1.6.8...
ERROR: Mysql not available. Installation aborted
[ ! ] Update Hestia PHP dependencies...
=============================================================================
Installation tasks complete, performing clean-up...
=============================================================================
[ * ] Rebuilding user accounts and domains, this may take a few minutes...
      - admin...
      - rithurag...
      - goldencloud...
      - keralamechanic...
[ * ] Restarting services...
Error: ERROR: Restart of php5.6-fpm failed.
Error: ERROR: Restart of php7.1-fpm failed.
Error: ERROR: Restart of php7.2-fpm failed.
Error: ERROR: Restart of php7.3-fpm failed.
Error: ERROR: Restart of php7.4-fpm failed.
Error: ERROR: Restart of php8.1-fpm failed.
=============================================================================

Upgrade complete! If you encounter any issues or find a bug,
please take a moment to report it to us on GitHub at the URL below:
https://github.com/hestiacp/hestiacp/issues

Read the release notes to learn about new fixes and features:
https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md

We hope that you enjoy using this version of Hestia Control Panel,
have a wonderful day!

Sincerely,
The Hestia Control Panel development team

Web:      https://www.hestiacp.com/
Docs:     https://docs.hestiacp.com/
Forum:    https://forum.hestiacp.com/
GitHub:   https://github.com/hestiacp/hestiacp/

Help support the Hestia Control Panel project by donating via PayPal:
https://www.hestiacp.com/donate

Made with love & pride by the open-source community around the world.

=============================================================================

Cannot load the ionCube PHP Loader - it was built with configuration API320190902,NTS, whereas running engine is API420200930,NTS

Hi

Atleast i need to take backup of my websites with database, but phpmyadmin shows page not found error. also DB and backups is not shown inside control panel.


Kindly suggest a workaround

Please help

I’m afraid you have a big mess in your server.

Check if mysql/mariadb is runing and then check if your databases are there:

sudo su -
systemctl status mysql --no-pager -l
mysql -uroot -e 'show databases;'

Show your Hestia’s conf:

v-list-sys-config json | jq

Hi

MySql is not running

× mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-09-10 22:49:02 IST; 1 day 4h ago
    Process: 749272 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
        CPU: 2ms

Sep 10 22:49:02 cloud.webreflex.in systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Sep 10 22:49:02 cloud.webreflex.in systemd[1]: Stopped MySQL Community Server.
Sep 10 22:49:02 cloud.webreflex.in systemd[1]: mysql.service: Start request repeated too quickly.
Sep 10 22:49:02 cloud.webreflex.in systemd[1]: mysql.service: Failed with result 'exit-code'.
Sep 10 22:49:02 cloud.webreflex.in systemd[1]: Failed to start MySQL Community Server.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Hestia Config

{
  "config": {
    "WEB_SYSTEM": "apache2",
    "WEB_RGROUPS": "",
    "WEB_PORT": "",
    "WEB_SSL": "",
    "WEB_SSL_PORT": "",
    "WEB_BACKEND": "php-fpm",
    "PROXY_SYSTEM": "",
    "PROXY_PORT": "",
    "PROXY_SSL_PORT": "",
    "FTP_SYSTEM": "",
    "MAIL_SYSTEM": "",
    "IMAP_SYSTEM": "",
    "ANTIVIRUS_SYSTEM": "",
    "ANTISPAM_SYSTEM": "",
    "DB_SYSTEM": "",
    "DNS_SYSTEM": "",
    "DNS_CLUSTER": "",
    "DNS_CLUSTER_SYSTEM": "hestia",
    "SUPPORT_DNSSEC": "",
    "STATS_SYSTEM": "",
    "BACKUP_SYSTEM": "",
    "CRON_SYSTEM": "cron",
    "DISK_QUOTA": "no",
    "FIREWALL_SYSTEM": "iptables",
    "FIREWALL_EXTENSION": "",
    "FILE_MANAGER": "true",
    "REPOSITORY": "",
    "VERSION": "1.8.12",
    "RELEASE_BRANCH": "release",
    "UPGRADE_SEND_EMAIL": "true",
    "UPGRADE_SEND_EMAIL_LOG": "false",
    "SMTP_RELAY": "",
    "SMTP_RELAY_HOST": "",
    "SMTP_RELAY_PORT": "",
    "SMTP_RELAY_USER": "",
    "DEMO_MODE": "",
    "THEME": "dark",
    "LANGUAGE": "en",
    "BACKUP_GZIP": "4",
    "BACKUP": "/backup",
    "BACKUP_MODE": "zstd",
    "WEBMAIL_ALIAS": "webmail",
    "WEBMAIL_SYSTEM": "roundcube",
    "DB_PMA_ALIAS": "phpMyAdmin",
    "DB_PGA_ALIAS": "",
    "LOGIN_STYLE": "default",
    "INACTIVE_SESSION_TIMEOUT": "60",
    "PHPMYADMIN_KEY": "",
    "ENFORCE_SUBDOMAIN_OWNERSHIP": "yes",
    "DEBUG_MODE": "false",
    "API": "no",
    "API_SYSTEM": "0",
    "API_ALLOWED_IP": "",
    "UPDATE_AVAILABLE": "",
    "PLUGIN_APP_INSTALLER": "true",
    "PLUGIN_FILE_MANAGER": "",
    "POLICY_SYSTEM_ENABLE_BACON": "false",
    "POLICY_SYSTEM_PROTECTED_ADMIN": "no",
    "POLICY_SYSTEM_HIDE_ADMIN": "",
    "POLICY_SYSTEM_HIDE_SERVICES": "no",
    "POLICY_SYSTEM_PASSWORD_RESET": "no",
    "POLICY_USER_VIEW_SUSPENDED": "no",
    "POLICY_BACKUP_SUSPENDED_USERS": "no",
    "POLICY_USER_EDIT_DETAILS": "yes",
    "POLICY_USER_EDIT_WEB_TEMPLATES": "yes",
    "POLICY_USER_EDIT_DNS_TEMPLATES": "yes",
    "POLICY_USER_DELETE_LOGS": "yes",
    "POLICY_USER_VIEW_LOGS": "yes",
    "POLICY_USER_CHANGE_THEME": "yes",
    "POLICY_CSRF_STRICTNESS": "1",
    "POLICY_SYNC_SKELETON": "yes",
    "POLICY_SYNC_ERROR_DOCUMENTS": "yes",
    "USE_SERVER_SMTP": "false",
    "SERVER_SMTP_HOST": "",
    "SERVER_SMTP_PORT": "",
    "SERVER_SMTP_SECURITY": "",
    "SERVER_SMTP_USER": "",
    "SERVER_SMTP_PASSWD": "",
    "SERVER_SMTP_ADDR": "",
    "DISABLE_IP_CHECK": "no",
    "FROM_NAME": "",
    "FROM_EMAIL": "",
    "APP_NAME": "Hestia Control Panel",
    "TITLE": "{{page}} - {{hostname}} - {{appname}}",
    "SUBJECT_EMAIL": "{{subject}}",
    "HIDE_DOCS": "no"
  }
}

as you said the server is messed up big time I believe, please help for repair of the server or if not possible, please help me get backup of 2 important websites so that I can rebuild the server with hestia again and import backup.

Repair… I don’t think so but let’s try to recover your DBs. I see you are using MySQL now, previously, did you have installed MySQL or MariaDB?

dpkg -l | grep -Ei '^..\s*mysql|^..\s*mariadb'
systemctl restart mysql
tail -n25 /var/log/mysql/error.log

MariaDB it was


root@cloud:~# dpkg -l | grep -Ei '^..\s*mysql|^..\s*mariadb'
rc  mariadb-client-10.6                    1:10.6.18-0ubuntu0.22.04.1                   arm64        MariaDB database client binaries
ii  mariadb-common                         1:10.6.19+maria~ubu2004                      all          MariaDB database common files (e.g. /etc/mysql/mariadb.conf.d/)
rc  mariadb-server-10.6                    1:10.6.18-0ubuntu0.22.04.1                   arm64        MariaDB database server binaries
ii  mysql-client-8.0                       8.0.39-0ubuntu0.22.04.1                      arm64        MySQL database client binaries
ii  mysql-client-core-8.0                  8.0.39-0ubuntu0.22.04.1                      arm64        MySQL database core client binaries
ii  mysql-common                           1:10.6.19+maria~ubu2004                      all          MariaDB client common configuration files package (e.g. /etc/mysql/my.cnf)
ii  mysql-server                           8.0.39-0ubuntu0.22.04.1                      all          MySQL database server (metapackage depending on the latest version)
ii  mysql-server-8.0                       8.0.39-0ubuntu0.22.04.1                      arm64        MySQL database server binaries and system database setup
ii  mysql-server-c
systemctl restart mysql
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.

tail -n25 /var/log/mysql/error.log gives no output

So you installed MariaDB and your DBs were in MariaDB but now you have uninstalled MariaDB and installed MySQL? What happened here?

ls -l /var/lib/mysql
ls -l /etc/mysql

Couldn’t figure out how the mariadb was uninstalled…


root@cloud:~# ls -l /var/lib/mysql
total 389160
-rw-rw---- 1 mysql mysql  16531456 Sep  7 14:31 aria_log.00000001
-rw-rw---- 1 mysql mysql        52 Sep  7 14:31 aria_log_control
-rw-rw---- 1 mysql mysql         9 Sep  4 23:43 ddl_recovery-backup.log
-rw-r--r-- 1 root  root          0 Jul  8 06:20 debian-10.6.flag
-rw-rw---- 1 mysql mysql     18821 Sep  7 14:31 ib_buffer_pool
-rw-rw---- 1 mysql mysql 100663296 Sep  7 14:31 ib_logfile0
-rw-rw---- 1 mysql mysql 281018368 Sep  7 14:31 ibdata1
drwx------ 2 mysql mysql      4096 Apr 14 19:35 keralamechanic_12378
-rw-rw---- 1 mysql mysql         0 Feb  2  2022 multi-master.info
drwx------ 2 mysql mysql      4096 Aug 13  2022 mysql
-rw-rw---- 1 mysql mysql        15 Aug 13  2022 mysql_upgrade_info
drwx------ 2 mysql mysql      4096 Aug 13  2022 performance_schema
drwx------ 2 mysql mysql      4096 Feb  2  2022 phpmyadmin
drwx------ 2 mysql mysql      4096 Jul  6  2023 rithurag_42317
drwx------ 2 mysql mysql     12288 Apr  3  2023 rithurag_49047
drwx------ 2 mysql mysql     12288 Jul  7  2023 rithurag_64842
drwx------ 2 mysql mysql     20480 Jul  7 22:16 rithurag_68723
drwx------ 2 mysql mysql      4096 Jul  7 22:02 rithurag_69445
drwx------ 2 mysql mysql     12288 Nov 11  2022 rithurag_75727
drwx------ 2 mysql mysql      4096 Nov 26  2022 rithurag_87732
drwx------ 2 mysql mysql      4096 Nov 15  2022 rithurag_cinema
drwx------ 2 mysql mysql      4096 Jun 19 21:20 rithurag_dcoupons
drwx------ 2 mysql mysql     12288 Aug 15  2022 rithurag_dealseb
drwx------ 2 mysql mysql      4096 Nov 13  2022 rithurag_kpsc
drwx------ 2 mysql mysql      4096 Mar  2  2022 rithurag_mlrecipes
drwx------ 2 mysql mysql     12288 Feb  6  2022 rithurag_mpold
drwx------ 2 mysql mysql      4096 Feb 18  2022 rithurag_pnxcommunity
drwx------ 2 mysql mysql      4096 Sep  5 05:12 rithurag_quck
drwx------ 2 mysql mysql      4096 Aug 14  2022 rithurag_quckapps
drwx------ 2 mysql mysql     12288 Aug 18  2022 rithurag_quckshop
drwx------ 2 mysql mysql      4096 Aug 12  2022 rithurag_qucktv
drwx------ 2 mysql mysql      4096 Oct  2  2022 rithurag_rank
drwx------ 2 mysql mysql      4096 Feb  2  2022 rithurag_rithurag_main
drwx------ 2 mysql mysql     12288 Jul  8 22:57 rithurag_rithurag_pachakam
drwx------ 2 mysql mysql     20480 Jul  9 03:21 rithurag_rithurag_pnxlive
drwx------ 2 mysql mysql     12288 Jan 17  2024 rithurag_sgcollege
drwx------ 2 mysql mysql      4096 Sep 12  2022 rithurag_smm
drwx------ 2 mysql mysql      4096 Aug 14  2022 rithurag_test
drwx------ 2 mysql mysql      4096 Dec 14  2023 rithurag_trollpoint
drwx------ 2 mysql mysql      4096 Nov 26  2022 rithurag_vidown
drwx------ 2 mysql mysql      4096 Nov 26  2022 rithurag_wrtools
drwx------ 2 mysql mysql      4096 Aug  5  2022 roundcube
drwx------ 2 mysql mysql     12288 Aug 13  2022 sys

root@cloud:~# ls -l /etc/mysql
total 36
lrwxrwxrwx 1 root root   54 Sep  7 14:31 FROZEN -> ../../usr/share/doc/mysql-common/frozen-mode/downgrade
drwxr-xr-x 2 root root 4096 Nov  6  2021 conf.d
-rwxr-xr-x 1 root root  120 Jul 24 16:38 debian-start
-rw------- 1 root root  544 Feb  2  2022 debian.cnf
-rw-r--r-- 1 root root 1127 Aug 14  2022 mariadb.cnf
drwxr-xr-x 3 root root 4096 Jul  8 06:20 mariadb.conf.d
-rw-r--r-- 1 root root 1127 Sep  4 23:42 my.cnf
-rw-r--r-- 1 root root 1150 Aug 14  2022 my.cnf.vst.back
-rw-r--r-- 1 root root  682 Jun 15  2023 mysql.cnf
drwxr-xr-x 2 root root 4096 Sep  7 14:31 mysql.conf.d

hope we can recover files and dbs

You have a FROZEN file in /etc/mysql/ dir and if you check the doc:

$ cat /usr/share/doc/mysql-common/frozen-mode/downgrade
This MySQL or variant installation has entered "frozen mode". Maintainer
scripts will avoid making changes or starting the daemon until manually
released from this state. See /usr/share/doc/mysql-common/README for
general information about this mode.

In this particular case, an incompatible downgrade attempt has been
detected. This can be resolved in one of two ways:

1. Change the contents of /var/lib/mysql/ to contain database data that
is compatible with the currently installed MySQL or variant daemon
version. For example: you could restore from a backup. Alternatively you
could do a dump using a future version binary and then a restore using
the current version binary.

2. Switch to a MySQL or variant daemon version that is compatible with
the data currently in /var/lib/mysql/. For example, if you have
attempted a downgrade from mysql-server-5.7 to mysql-server-5.6, you
could "apt install mysql-server-5.7" again.

Please resolve this situation and only then remove the /etc/mysql/FROZEN
symlink. You can then run "dpkg-reconfigure <package>" where <package>
should usually be in the form <variant>-server-<version>.

I would make a backup for /etc/mysql and /var/lib/mysql, will remove mysql and will reinstall mariadb.

mkdir -p /root/backup_mysql/etc
mkdir -p /root/backup_mysql/var/lib
cp -rf /etc/mysql /root/backup_mysql/etc/
cp -rf /var/lib/mysql /root/backup_mysql/var/lib/
apt remove mysql-server mysql-client mysql-common
rm /etc/mysql/FROZEN
apt install mariadb-server mariadb-client mariadb-common
cp -f /usr/local/hestia/install/deb/mysql/my-medium.cnf /etc/mysql/my.cnf
systemctl restart mysql
systemctl status mysql --no-pager -l
mysql -uroot -e 'show databases;'