Ispconfig3 mysql does not start after apt update upgrade

Discussion in 'Installation/Configuration' started by ilchubby, Jan 2, 2020.

  1. ilchubby

    ilchubby New Member

    My ISPconfig 3, Ubuntu 18.04 install stopped working after i ran and update.
    Mysql does not start with error:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    I am new to this and have ran our of ideas.
    Mysql --version
    mysql Ver 14.14 Distrib 5.7.28, for Linux (x86_64) using EditLine wrapper
    Please help.
     
    Last edited: Jan 2, 2020
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Restart mysql and then check the syslog and mysql logs for the reason why it does not start.
     
  3. ilchubby

    ilchubby New Member

    Hi,
    I have attempted to start mysql using
    /etc/init.d/mysql start
    Go the message:
    mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2020-01-04 09:20:16 GMT; 41s ago Process: 22820 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
    Also checked the /var/log/mysql/error.log
    It is empty ...
    Not sure what else to look into :-(
     
  4. Steini86

    Steini86 Active Member

    show result of:
    Code:
    systemctl status mysqld.service
    systemctl start mysqld.service
    journalctl -xe
    Sometimes mysql/mariadb is configured to log into /var/log/syslog, which is a good file to look for problems ;)
    You can read this file even from the ispc webinterface
     
    Last edited: Jan 5, 2020
  5. ilchubby

    ilchubby New Member

    Hello people.
    systemctl status mysqld.service returned
    Unit mysqld.service could not be found.

    systemctl start mysqld.service returned
    Failed to start mysqld.service: Unit mysqld.service not found.

    The log is below mmm ...
    Jan 5 09:43:06 ds1604 dovecot: auth-worker(25378): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 25 seconds before retry Not sure what happened with my server, please help.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  7. Steini86

    Steini86 Active Member

    Mhm. ubuntu o_O Try with mysql.service instead of mysqld.service
    This log just shows that mysqld is not running. You have to show more lines where you started mysqld and where it stops. Search google on how to read and search the logfiles. This is necessary knowledge to administrate a server!
     
    ilchubby likes this.
  8. ilchubby

    ilchubby New Member

    Teleman, Till and other thank you ...
    Yes the srver was fully operational with all systems running and ICPCONFIG interface functioning.
    After apt update and apt upgrade on the 1st of Jan it died.
    The server first said that thee was a php error and that apache2 was unable to load mod_fastcgi.so, I have uncommented that. The error is gone the apache2 starts.
    Mysql does not work at all.
    The below is the htf_report:
    Code:
    ##### SERVER ##### IP-address (as per hostname): ***.***.***.*** [WARN] could not determine server's ip address by ifconfig [INFO] OS version is Ubuntu 18.04.3 LTS [INFO] ISPConfig is installed. ##### ISPCONFIG ##### ISPConfig version is 3.1.15p2 [WARN] Could not connect to mysql with given user data. [WARN] Could not use mysql command line to connect to the database. Check your mysql config! ##### VERSION CHECK ##### [INFO] php (cli) version is 7.2.24-0ubuntu***.***.***.*** ##### PORT CHECK ##### [WARN] Port 21 (FTP server) seems NOT to be listening [WARN] Port 22 (SSH server) seems NOT to be listening ##### MAIL SERVER CHECK ##### ##### RUNNING SERVER PROCESSES ##### [INFO] I found the following web server(s): Apache 2 (PID 1770) [INFO] I found the following mail server(s): Postfix (PID 1906) [INFO] I found the following pop3 server(s): Dovecot (PID 1411) [INFO] I found the following imap server(s): Dovecot (PID 1411) [WARN] I could not determine which ftp server is running. ##### LISTENING PORTS ##### (only () Local (Address) [anywhere]:110 (1411/dovecot) [anywhere]:143 (1411/dovecot) [anywhere]:465 (1906/master) ***.***.***.***:53 (1227/named) [localhost]:53 (1227/named) ***.***.***.***:53 (776/systemd-resolve) [anywhere]:1974 (1592/sshd) [anywhere]:25 (1906/master) [localhost]:953 (1227/named) [anywhere]:993 (1411/dovecot) [anywhere]:995 (1411/dovecot) [localhost]:10025 (1906/master) [localhost]:10027 (1906/master) [anywhere]:587 (1906/master) [localhost]:11211 (1242/memcached) [localhost]10 (1411/dovecot) [localhost]43 (1411/dovecot) *:*:*:*::*:8080 (1770/apache2) *:*:*:*::*:80 (1770/apache2) *:*:*:*::*:465 (1906/master) *:*:*:*::*:8081 (1770/apache2) *:*:*:*::*:53 (1227/named) [localhost]974 (1592/sshd) *:*:*:*::*:25 (1906/master) *:*:*:*::*:953 (1227/named) *:*:*:*::*:443 (1770/apache2) *:*:*:*::*:993 (1411/dovecot) *:*:*:*::*:995 (1411/dovecot) *:*:*:*::*:587 (1906/master) ##### IPTABLES ##### Chain INPUT (policy ACCEPT) target prot opt source destination f2b-dovecot-pop3imap tcp -- [anywhere]/0 [anywhere]/0 multiport dports 110,995,143,993 f2b-pureftpd tcp -- [anywhere]/0 [anywhere]/0 multiport dports 21 f2b-postfix-sasl tcp -- [anywhere]/0 [anywhere]/0 multiport dports 25,587,465 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain f2b-dovecot-pop3imap (1 references)
    
    (The rest was the list of IP addresses banned)
     
    Last edited: Jan 8, 2020
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The report you posted in an almost incomprehensible format states:
    Have you done that?
    Going forward, please do post stuff like that in CODE tags so it is somewhat readable.
    Is your database running at all? What shows (And post results in CODE tags)
    Code:
    systemctl --state=failed
    If this started after upgrade, did that upgrade complete? You can read the log of the upgrade in file /var/log/dpkg.log.
    You can try if there is still stuff pending, what shows when run as root
    Code:
    apt-get dist-upgrade
    . Remember the CODE tags.
     
    ilchubby likes this.
  10. ilchubby

    ilchubby New Member

    It appears that my Mysql package is frozen:
    Code:
    [email protected]:/etc/mysql# ls -l
    total 32
    drwxr-xr-x 2 root root 4096 Jan 9 14:38 conf.d
    -rw------- 1 root root 307 Jan 2 02:19 debian.cnf
    -rwxr-xr-x 1 root root 120 Nov 15 13:23 debian-start
    lrwxrwxrwx 1 root root 54 Jan 2 08:55 FROZEN -> ../../usr/share/doc/mysql-common/frozen-mode/downgrade
    -rw-r--r-- 1 root root 869 Jan 16 2018 mariadb.cnf
    drwxr-xr-x 2 root root 4096 Jan 9 14:13 mariadb.conf.d
    lrwxrwxrwx 1 root root 24 Jan 17 2018 my.cnf -> /etc/alternatives/my.cnf
    -rw-r--r-- 1 root root 839 Jan 21 2017 my.cnf.fallback
    -rw-r--r-- 1 root root 682 Jan 12 2018 mysql.cnf
    drwxr-xr-x 2 root root 4096 Jan 9 14:21 mysql.conf.d
    
    Is there a safe way to fix this preserving databases?
     
  11. Steini86

    Steini86 Active Member

    Seems like you have installed mysqld and mariadb at the same time. Since they share the same configuration/data, they cannot run at the same time. Read the file /etc/mysql/FROZEN for more info. Seems like you have messed up your server. It is difficult to advice without knowing the whole story. You could try to remove both, mysql and mariadb and then only reinstall the system you want to use.
     
  12. ilchubby

    ilchubby New Member

  13. ilchubby

    ilchubby New Member

    My set up got screwed during the upgrade.
    I have had a look at the history of the install on that day.
    Mariadb was missing, fastcgi was dismoded, php packages missing.
    All fixed back to normal.
    Thank you for the guidance.
     

Share This Page