MariaDB fails during installation

Hi there, I’ve faced an FATAL error during installation on Ubuntu 18.04.

NOTE: This process may take 10 to 15 minutes to complete, please wait…

() Configuring system settings…
(
) Configuring Hestia Control Panel…
() Generating default self-signed SSL certificate…
(
) Adding SSL certificate to Hestia Control Panel…
() Configuring NGINX…
(
) Configuring Apache Web Server…
() Configuring PHP-FPM…
(
) Configuring PHP…
() Configuring Vsftpd server…
(
) Configuring MariaDB database server…
Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xe” for details.
Error: mariadb start failed


The output of systemctl status mariadb.service:

● mariadb.service - MariaDB 10.4.13 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Sun 2020-06-21 21:51:21 +0430; 5min ago
Docs: man:mysqld(8)
systemd - MariaDB Knowledge Base
Process: 3304 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 3210 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=cd /usr/bin/..; /usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environmen
Process: 3204 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 3196 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 3304 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

Jun 21 21:51:20 mypanel systemd[1]: Starting MariaDB 10.4.13 database server…
Jun 21 21:51:20 mypanel mysqld[3304]: 2020-06-21 21:51:20 0 [Note] /usr/sbin/mysqld (mysqld 10.4.13-MariaDB-1:10.4.13+maria~bionic) starting as process 3304 …
Jun 21 21:51:21 mypanel systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jun 21 21:51:21 mypanel systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Jun 21 21:51:21 mypanel systemd[1]: Failed to start MariaDB 10.4.13 database server.

What’s the issue? And What Can I do now?

My first try for this installation was:

sudo bash hst-install.sh --apache yes --nginx yes --phpfpm yes --multiphp yes --vsftpd yes --proftpd no --named yes --mysql yes --postgresql yes --exim yes --dovecot yes --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api yes --force yes --interactive yes --port 5602 --lang en

Did you installed it on a clean server? Do you have a file under /var/lib/mysql/tc.log?

Yes, it was a clean version of Ubuntu 18.04

/var/lib/mysql# ls -la

total 8
drwxr-xr-x 2 mysql mysql 4096 Jun 21 22:25 .
drwxr-xr-x 57 root root 4096 Jun 21 22:11 …
-rw-rw---- 1 mysql mysql 0 Jun 21 22:11 aria_log_control
-rw-r–r-- 1 root root 0 Jun 21 22:11 debian-10.4.flag
-rw-rw---- 1 mysql mysql 0 Jun 21 22:11 ibdata1

Can you share a bit more informations about your system? If it is a vps maybe also the provider?

It’s a VPS from a not famous provider, its based on VMware.
CPU: 8 cores
RAM: 8GB
Disk: 50GB

The issue is fixed now, unfortunately my provider made a mistake and gave me only 5GB hard disk space, so HestiaCP installation failed without any known and vivid error.

So as a suggestion I suggest adding the following features in the next releases:

1- before starting the installation check if the system has at least 13GB free space.

2- When we change the default port by using --port 5600 ,in the installation output it still says 8083:
Admin URL: https://my.panel.com:8083

3- After completion of the installation it says: it needs to be rebooted, Are u sure to reboot? choose [Y/N]
This is written in the last line which most of people pay attention to only this line, while the most important part of the output is this:
Admin URL: https://my.panel.com:8083
Username: admin
Password: bpUCX5sagX5Fz2Dk1

So before let him reboot, tell him: hey man, don’t forget to copy the provided Username+Password somewhere else and now Are u sure to reboot? choose [Y/N]

Hi @tommy

Glad you solved your issue!

We will discuss this internaly.

This is due to a missleading installation string, in your case the --force parameter - this one should be on last position. This is in some way a known issue with the external install string generator - we currently work on a own implementation (which is already in our github repository, but not yet on our website): GitHub - hestiacp/hestiacp-generator

Probaly v-change-user-password is your new friend after a direct reboot, but you should also get a email with the credentials (or should get, it may be stopped due to wrong spf records or anti spam). So there is no additional change needed.

Is there any live version of this script out there GitHub - hestiacp/hestiacp-generator that we can use it?

Edit: I’ve cloned it myself and used it, thanks.
One more question:
I’ve added —port 5602 parameter but at last I’ve surprisingly seen that it still uses the port 8083
Why? How to change port? is it also because of missleading installation string of --force?

sudo bash hst-install.sh --apache yes --nginx yes --phpfpm yes --multiphp yes --vsftpd yes --proftpd no --named yes --mysql yes --postgresql yes --exim yes --dovecot yes --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api yes --force yes --interactive yes --port 5602 --lang en

Is there any live script out there for https://github.com/hestiacp/hestiacp-generator that we can use it?

No not yet we are working on a new site…

sudo bash hst-install.sh --apache yes --nginx yes --phpfpm yes --multiphp yes --vsftpd yes --proftpd no --named yes --mysql yes --postgresql yes --exim yes --dovecot yes --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api yes --interactive yes --port 5602 --lang en --force yes

Should work fine

To change the port now use v-change-sys-port port

1 Like

I’ve cloned your Installation generator and it gave:

sudo bash ./hst-install.sh --nginx
yes --apache yes --phpfpm yes --multiphp yes --mysql yes --postgresql
yes --vsftpd yes --proftpd no --exim yes --dovecot yes --clamav yes
–spamassassin no --iptables yes --fail2ban yes --quota no --port 5602
–lang en --api yes --interactive yes --force

So, which one is correct?

–force

–force yes

Both are good the install script accept both