Ad Widget

Collapse

Updated MariaDB server, Zabbix stops working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ojosaghae
    Junior Member
    • Dec 2022
    • 13

    #1

    Updated MariaDB server, Zabbix stops working.

    Hi everyone. Please I need your help - I think I've thoroughly messed things up.
    Zabbix raised an issue with the MariaDB database not being up to the minimum (10.3; it required a 10.6 minimum). I did a backup with Mariabackup following these instructions and did the upgrade following the instructions here.. It worked, but Zabbix complained about it being unsupported (I upgraded to 10.11). So I edited the sources.list files to reflect the 10.6 repo, and reinstalled MariaDB 10.6. It worked (from the terminal end), but that was where everything went awfully wrong. Zabbix stopped working. I tried everything I could, but to no avail. The server simply won't start. It shows the error:

    Code:
    systemctl status zabbix-server
    ● zabbix-server.service - Zabbix Server
    Loaded: loaded (/etc/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
    Active: active (exited) since Thu 2023-04-13 17:24:08 UTC; 43min ago
    Main PID: 7276 (code=exited, status=0/SUCCESS)
    Tasks: 1 (limit: 4618)
    Memory: 2.8M
    CGroup: /system.slice/zabbix-server.service
    └─7286 /usr/local/sbin/zabbix_server
    Apr 13 17:24:08 ip-10-60-102-213 systemd[1]: Starting Zabbix Server...
    Apr 13 17:24:08 ip-10-60-102-213 systemd[1]: Finished Zabbix Server.
    Apr 13 17:24:20 ip-10-60-102-213 systemd[1]: /etc/systemd/system/zabbix-server.service:11: PIDFile= references a path below legacy directory /var/run/, updating /var/run/zabbix/zabbix_server.pid → /run/zabbix/zabbix_server.pid; please update the unit file accordingly.
    Apr 13 17:24:20 ip-10-60-102-213 systemd[1]: /etc/systemd/system/zabbix-server.service:11: PIDFile= references a path below legacy directory /var/run/, updating /var/run/zabbix/zabbix_server.pid → /run/zabbix/zabbix_server.pid; please update the unit file accordingly.
    Apr 13 17:24:20 ip-10-60-102-213 systemd[1]: /etc/systemd/system/zabbix-server.service:11: PIDFile= references a path below legacy directory /var/run/, updating /var/run/zabbix/zabbix_server.pid → /run/zabbix/zabbix_server.pid; please update the unit file accordingly.
    Apr 13 17:24:21 ip-10-60-102-213 systemd[1]: /etc/systemd/system/zabbix-server.service:11: PIDFile= references a path below legacy directory /var/run/, updating /var/run/zabbix/zabbix_server.pid → /run/zabbix/zabbix_server.pid; please update the unit file accordingly.
    Apr 13 17:24:21 ip-10-60-102-213 systemd[1]: /etc/systemd/system/zabbix-server.service:11: PIDFile= references a path below legacy directory /var/run/, updating /var/run/zabbix/zabbix_server.pid → /run/zabbix/zabbix_server.pid; please update the unit file accordingly.
    Apr 13 17:24:21 ip-10-60-102-213 systemd[1]: /etc/systemd/system/zabbix-server.service:11: PIDFile= references a path below legacy directory /var/run/, updating /var/run/zabbix/zabbix_server.pid → /run/zabbix/zabbix_server.pid; please update the unit file accordingly.
    Apr 13 17:24:21 ip-10-60-102-213 systemd[1]: /etc/systemd/system/zabbix-server.service:11: PIDFile= references a path below legacy directory /var/run/, updating /var/run/zabbix/zabbix_server.pid → /run/zabbix/zabbix_server.pid; please update the unit file accordingly.​
    Last resort - I reinstalled Zabbix, and it wiped off all my configurations and presented a new Zabbix set-up. I tried restoring the backup, but it failed. Horribly.
    The above error still persists.
    Worse of all, I still get email alerts from the (previous) Zabbix installation about the database not being available. My previous usernames (and passwords) won't work on this, as it tells me "account has been temporarily blocked".

    At the bottom of the Zabbix web frontend, it flashes the message Zabbix server is not running; the information displayed may not be correct.

    I JUST WANT TO ROLL BACK TO THE PREVIOUS ZABBIX (AND MARIADB) INSTALLATION.

    Please help me out.
    Last edited by ojosaghae; 13-04-2023, 20:15.
  • ingrid@gearnoc.com.br
    Junior Member
    • May 2022
    • 13

    #2
    Hey,

    It seems like the zabbix server is running though... or is it restarting constantly?

    Can you access de frontend or there is a error?

    Can you upload de logs so we can see more of whats happening?

    Comment

    • ingrid@gearnoc.com.br
      Junior Member
      • May 2022
      • 13

      #3
      ;;;;;;;;;;

      Comment


      • ojosaghae
        ojosaghae commented
        Editing a comment
        I'm sorry. I do not quite understand your comment.
    • ingrid@gearnoc.com.br
      Junior Member
      • May 2022
      • 13

      #4
      Sorry, there was an error in the last comment...


      It seems like the zabbix server is running though... or is it restarting constantly?

      Can you access de frontend or there is a error?

      Can you upload de logs so we can see more of whats happening?​

      Comment

      • ojosaghae
        Junior Member
        • Dec 2022
        • 13

        #5
        Originally posted by [email protected]
        Sorry, there was an error in the last comment...


        It seems like the zabbix server is running though... or is it restarting constantly?

        Can you access de frontend or there is a error?

        Can you upload de logs so we can see more of whats happening?​


        It's quite long. here it is:
        Code:
        762:20230413:155822.408 cannot rename log file "/var/log/zabbix_server.log" to "/var/log/zabbix_server.log.old": [13] Permission denied
        762:20230413:155822.408 Logfile "/var/log/zabbix_server.log" size reached configured limit LogFileSize but moving it to "/var/log/zabbix_server.log.old" failed. The logfile was truncated.
        762:20230413:155822.409 database is down: reconnecting in 10 seconds
        748:20230413:155822.554 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        803:20230413:155822.824 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        803:20230413:155822.824 database is down: reconnecting in 10 seconds
        768:20230413:155822.824 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        768:20230413:155822.824 database is down: reconnecting in 10 seconds
        774:20230413:155823.491 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        774:20230413:155823.491 database is down: reconnecting in 10 seconds
        748:20230413:155823.555 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        765:20230413:155824.316 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        765:20230413:155824.316 database is down: reconnecting in 10 seconds
        748:20230413:155824.555 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        748:20230413:155825.557 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        782:20230413:155825.828 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        782:20230413:155825.828 database is down: reconnecting in 10 seconds
        793:20230413:155826.197 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        793:20230413:155826.197 database is down: reconnecting in 10 seconds
        794:20230413:155826.301 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        794:20230413:155826.301 database is down: reconnecting in 10 seconds
        748:20230413:155826.554 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        796:20230413:155826.988 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        796:20230413:155826.989 database is down: reconnecting in 10 seconds
        748:20230413:155827.554 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        748:20230413:155828.556 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        763:20230413:155829.025 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        763:20230413:155829.025 database is down: reconnecting in 10 seconds
        748:20230413:155829.560 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        749:20230413:155829.597 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        749:20230413:155829.597 database is down: reconnecting in 10 seconds
        810:20230413:155829.852 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        810:20230413:155829.852 database is down: reconnecting in 10 seconds
        766:20230413:155829.873 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        766:20230413:155829.873 database is down: reconnecting in 10 seconds
        764:20230413:155830.221 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        764:20230413:155830.221 database is down: reconnecting in 10 seconds
        748:20230413:155830.555 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        792:20230413:155831.047 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        792:20230413:155831.047 database is down: reconnecting in 10 seconds
        750:20230413:155831.132 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        750:20230413:155831.132 database is down: reconnecting in 10 seconds​
        IT goes like this for a long while, then this:
        Code:
        765:20230413:161434.361 database is down: reconnecting in 10 seconds
        748:20230413:161434.554 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        748:20230413:161435.554 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        782:20230413:161435.868 [Z3001] connection to database 'zabbix' failed: [1698] Access denied for user 'zabbix'@'localhost'
        782:20230413:161435.868 Cannot connect to the database. Exiting...
        738:20230413:161435.870 One child process died (PID:782,exitcode/signal:1). Exiting ...
        738:20230413:161435.871 PROCESS EXIT: 782
        761:20230413:161435.893 cannot read LLD manager service request
        748:20230413:161435.896 HA manager has been paused
        748:20230413:161435.916 [Z3001] connection to database 'zabbix' failed: [1698] Access denied for user 'zabbix'@'localhost'
        zabbix_server [738]: Error waiting for process with PID 782: [10] No child processes
        738:20230413:161436.013 [Z3001] connection to database 'zabbix' failed: [1698] Access denied for user 'zabbix'@'localhost'
        738:20230413:161436.013 Cannot connect to the database. Exiting...
        751:20230413:161733.718 Starting Zabbix Server. Zabbix 6.2.2 (revision 35455866073).
        751:20230413:161733.719 ****** Enabled features ******
        751:20230413:161733.719 SNMP monitoring: YES
        751:20230413:161733.719 IPMI monitoring: NO
        751:20230413:161733.719 Web monitoring: YES
        751:20230413:161733.719 VMware monitoring: YES
        751:20230413:161733.719 SMTP authentication: YES
        751:20230413:161733.719 ODBC: NO
        751:20230413:161733.719 SSH support: NO
        751:20230413:161733.719 IPv6 support: YES
        751:20230413:161733.719 TLS support: NO
        751:20230413:161733.719 ******************************
        751:20230413:161733.719 using configuration file: /usr/local/etc/zabbix_server.conf
        751:20230413:161733.730 [Z3001] connection to database 'zabbix' failed: [1698] Access denied for user 'zabbix'@'localhost'
        751:20230413:161733.730 Cannot connect to the database. Exiting...
        1061:20230413:162015.912 Starting Zabbix Server. Zabbix 6.2.2 (revision 35455866073).
        1061:20230413:162015.912 ****** Enabled features ******
        1061:20230413:162015.912 SNMP monitoring: YES
        1061:20230413:162015.912 IPMI monitoring: NO
        1061:20230413:162015.912 Web monitoring: YES
        1061:20230413:162015.912 VMware monitoring: YES
        1061:20230413:162015.912 SMTP authentication: YES
        1061:20230413:162015.912 ODBC: NO
        1061:20230413:162015.912 SSH support: NO
        1061:20230413:162015.912 IPv6 support: YES
        1061:20230413:162015.912 TLS support: NO
        1061:20230413:162015.913 ******************************
        1061:20230413:162015.913 using configuration file: /usr/local/etc/zabbix_server.conf
        1061:20230413:162015.917 [Z3001] connection to database 'zabbix' failed: [1698] Access denied for user 'zabbix'@'localhost'
        1061:20230413:162015.917 Cannot connect to the database. Exiting...
        7060:20230413:171515.386 Starting Zabbix Server. Zabbix 6.2.2 (revision 35455866073).​
        7060:20230413:171515.386 ****** Enabled features ******
        7060:20230413:171515.391 SNMP monitoring: YES
        7060:20230413:171515.391 IPMI monitoring: NO
        7060:20230413:171515.391 Web monitoring: YES
        7060:20230413:171515.391 VMware monitoring: YES
        7060:20230413:171515.391 SMTP authentication: YES
        7060:20230413:171515.391 ODBC: NO
        7060:20230413:171515.391 SSH support: NO
        7060:20230413:171515.391 IPv6 support: YES
        7060:20230413:171515.391 TLS support: NO
        7060:20230413:171515.391 ******************************
        7060:20230413:171515.391 using configuration file: /usr/local/etc/zabbix_server.conf
        7060:20230413:171515.403 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171515.403 database is down: reconnecting in 10 seconds
        7060:20230413:171525.404 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171525.404 database is down: reconnecting in 10 seconds
        7060:20230413:171535.405 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171535.405 database is down: reconnecting in 10 seconds
        7060:20230413:171545.406 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171545.406 database is down: reconnecting in 10 seconds
        7060:20230413:171555.408 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171555.408 database is down: reconnecting in 10 seconds
        7060:20230413:171605.408 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171605.408 database is down: reconnecting in 10 seconds
        7060:20230413:171615.409 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171615.409 database is down: reconnecting in 10 seconds
        7060:20230413:171625.409 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7060:20230413:171625.409 database is down: reconnecting in 10 seconds
        7060:20230413:171632.507 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ...
        7060:20230413:171632.507 Zabbix Server stopped. Zabbix 6.2.2 (revision 35455866073).
        7068:20230413:171632.594 Starting Zabbix Server. Zabbix 6.2.2 (revision 35455866073).
        7068:20230413:171632.594 ****** Enabled features ******
        7068:20230413:171632.595 SNMP monitoring: YES
        7068:20230413:171632.595 IPMI monitoring: NO
        7068:20230413:171632.596 Web monitoring: YES
        7068:20230413:171632.596 VMware monitoring: YES
        7068:20230413:171632.596 SMTP authentication: YES
        7068:20230413:171632.596 ODBC: NO
        7068:20230413:171632.596 SSH support: NO
        7068:20230413:171632.596 IPv6 support: YES
        7068:20230413:171632.596 TLS support: NO
        7068:20230413:171632.596 ******************************
        7068:20230413:171632.596 using configuration file: /usr/local/etc/zabbix_server.conf
        7068:20230413:171632.602 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171632.602 database is down: reconnecting in 10 seconds
        7068:20230413:171642.602 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171642.602 database is down: reconnecting in 10 seconds
        7068:20230413:171652.603 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171652.603 database is down: reconnecting in 10 seconds
        7068:20230413:171702.603 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171702.603 database is down: reconnecting in 10 seconds
        7068:20230413:171712.604 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171712.604 database is down: reconnecting in 10 seconds
        7068:20230413:171722.604 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171722.604 database is down: reconnecting in 10 seconds
        7068:20230413:171732.605 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171732.605 database is down: reconnecting in 10 seconds
        7068:20230413:171742.605 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171742.606 database is down: reconnecting in 10 seconds
        7068:20230413:171752.606 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171752.606 database is down: reconnecting in 10 seconds
        7068:20230413:171802.607 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171802.608 database is down: reconnecting in 10 seconds
        7068:20230413:171812.608 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171812.608 database is down: reconnecting in 10 seconds
        7068:20230413:171822.609 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171822.609 database is down: reconnecting in 10 seconds
        7068:20230413:171832.609 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7068:20230413:171832.609 database is down: reconnecting in 10 seconds
        7068:20230413:171836.664 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ...
        7068:20230413:171836.664 Zabbix Server stopped. Zabbix 6.2.2 (revision 35455866073).
        7085:20230413:171836.696 Starting Zabbix Server. Zabbix 6.2.2 (revision 35455866073).
        7085:20230413:171836.696 ****** Enabled features ******
        7085:20230413:171836.696 SNMP monitoring: YES
        7085:20230413:171836.696 IPMI monitoring: NO
        7085:20230413:171836.696 Web monitoring: YES
        7085:20230413:171836.696 VMware monitoring: YES
        7085:20230413:171836.696 SMTP authentication: YES
        7085:20230413:171836.696 ODBC: NO
        7085:20230413:171836.696 SSH support: NO
        7085:20230413:171836.696 IPv6 support: YES
        7085:20230413:171836.696 TLS support: NO
        7085:20230413:171836.696 ******************************
        7085:20230413:171836.696 using configuration file: /usr/local/etc/zabbix_server.conf
        7085:20230413:171836.700 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171836.700 database is down: reconnecting in 10 seconds
        7085:20230413:171846.700 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171846.700 database is down: reconnecting in 10 seconds
        7085:20230413:171856.701 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171856.701 database is down: reconnecting in 10 seconds
        7085:20230413:171906.701 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171906.701 database is down: reconnecting in 10 seconds
        7085:20230413:171916.702 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171916.702 database is down: reconnecting in 10 seconds
        7085:20230413:171926.702 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171926.702 database is down: reconnecting in 10 seconds
        7085:20230413:171936.703 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171936.703 database is down: reconnecting in 10 seconds
        7085:20230413:171946.703 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171946.703 database is down: reconnecting in 10 seconds
        7085:20230413:171956.704 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:171956.704 database is down: reconnecting in 10 seconds
        7085:20230413:172006.705 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:172006.705 database is down: reconnecting in 10 seconds
        7085:20230413:172016.706 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:172016.706 database is down: reconnecting in 10 seconds
        7085:20230413:172026.706 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:172026.706 database is down: reconnecting in 10 seconds
        7085:20230413:172036.707 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:172036.707 database is down: reconnecting in 10 seconds
        7085:20230413:172046.708 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:172046.708 database is down: reconnecting in 10 seconds
        7085:20230413:172056.708 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7085:20230413:172056.708 database is down: reconnecting in 10 seconds​​​
        And then gets to a point and reverts back to the former error messages:

        Code:
        7286:20230413:174538.564 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
        7286:20230413:174538.564 database is down: reconnecting in 10 seconds
        7286:20230413:174548.564 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174548.564 database is down: reconnecting in 10 seconds
        7286:20230413:174558.564 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174558.564 database is down: reconnecting in 10 seconds
        7286:20230413:174608.565 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174608.565 database is down: reconnecting in 10 seconds
        7286:20230413:174618.565 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174618.565 database is down: reconnecting in 10 seconds
        7286:20230413:174628.566 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174628.566 database is down: reconnecting in 10 seconds
        7286:20230413:174638.566 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174638.566 database is down: reconnecting in 10 seconds
        7286:20230413:174648.566 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174648.566 database is down: reconnecting in 10 seconds
        7286:20230413:174658.567 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174658.567 database is down: reconnecting in 10 seconds
        7286:20230413:174708.567 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174708.567 database is down: reconnecting in 10 seconds
        7286:20230413:174718.567 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174718.567 database is down: reconnecting in 10 seconds
        7286:20230413:174728.568 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174728.568 database is down: reconnecting in 10 seconds
        7286:20230413:174738.568 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174738.568 database is down: reconnecting in 10 seconds
        7286:20230413:174748.568 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174748.568 database is down: reconnecting in 10 seconds
        7286:20230413:174758.569 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174758.569 database is down: reconnecting in 10 seconds
        7286:20230413:174808.569 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174808.569 database is down: reconnecting in 10 seconds
        7286:20230413:174818.569 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174818.570 database is down: reconnecting in 10 seconds
        7286:20230413:174828.570 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:174828.570 database is down: reconnecting in 10 seconds​
        Then it ends with the following lines:

        Code:
        7286:20230413:190158.754 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
        7286:20230413:190158.754 database is down: reconnecting in 10 seconds
        7286:20230413:190206.737 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reaso n:0]. Exiting ...
        7286:20230413:190206.737 Zabbix Server stopped. Zabbix 6.2.2 (revision 35455866073).​
        Last edited by ojosaghae; 13-04-2023, 21:20.

        Comment

        • ojosaghae
          Junior Member
          • Dec 2022
          • 13

          #6
          I can access the front end - but I cannot populate it with the backup because it's not working.

          Comment

          • ingrid@gearnoc.com.br
            Junior Member
            • May 2022
            • 13

            #7
            Here are some things for you to try:

            1) Try reinstalling mysql-server
            2) Check in the mysql config if the path in socket is the same (/run/mysqld/mysqld.sock​) if not try changing it
            3) Check the permissions for /run/mysqld/mysqld.sock
            Last edited by [email protected]; 13-04-2023, 22:02.

            Comment

            • ojosaghae
              Junior Member
              • Dec 2022
              • 13

              #8
              Originally posted by [email protected]
              Here are some things for you to try:

              1) Try reinstalling mysql-server
              2) Check in the mysql config if the path in socket is the same (/run/mysqld/mysqld.sock​) if not try changing it
              3) Check the permissions for /run/mysqld/mysqld.sock
              Thank you so much for your responses. I'm relieved I'm not going at this alone.
              on running
              Code:
              apt install mysql-server
              I got a prompt that it will remove ALL THE MARIADB installations! And that's the format my backup is in. I don't want to do that.

              I think I may have worked in two different database packages. Initially, I was using MariaDB with the old Zabbix (working) installation. But I (accidentally) installed MySQL when installing from scratch i.e. I ran the following commands like I was installing from scratch:
              Code:
              # apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
              
              # mysql -uroot -p
              password
              mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
              mysql> create user zabbix@localhost identified by 'password';
              mysql> grant all privileges on zabbix.* to zabbix@localhost;
              mysql> set global log_bin_trust_function_creators = 1;
              mysql> quit;​
              # zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix​
              # mysql -uroot -p
              password
              mysql> set global log_bin_trust_function_creators = 0;
              mysql> quit;​
              Please how do I remove MySQL? I would like to retain the MariaDB and use it.

              I ran the command apt remove mysql-serverbut it returns Package 'mysql-server' is not installed, so not removed

              Thank you so much for your kind assistance.

              Comment

              • ingrid@gearnoc.com.br
                Junior Member
                • May 2022
                • 13

                #9
                You can try:

                apt-get remove --purge mysql*
                apt-get remove --purge mysql
                apt-get remove --purge mariadb
                apt-get remove --purge mariadb*
                apt-get --purge remove mariadb-server​

                and then reinstall everything and use your backup again to try and recover the old database

                Comment

                • ojosaghae
                  Junior Member
                  • Dec 2022
                  • 13

                  #10
                  Originally posted by [email protected]
                  You can try:

                  apt-get remove --purge mysql*
                  apt-get remove --purge mysql
                  apt-get remove --purge mariadb
                  apt-get remove --purge mariadb*
                  apt-get --purge remove mariadb-server​

                  and then reinstall everything and use your backup again to try and recover the old database
                  Please don't mind my questions
                  If I use the wildcard with MariaDB* will it not affect the backup since it's on the same machine?
                  I really do not want to lose that backup...

                  Comment

                  • ingrid@gearnoc.com.br
                    Junior Member
                    • May 2022
                    • 13

                    #11
                    No problem at all about your questions....

                    When you did the backup it supposed to storage in a different location, so check to see if it is in /var/mariadb/backup/. If it is, you can retrive the backup from this files with no problem, following instructions from where you learned how to do the backup... here it is what i get from there:

                    Preparing the Backup for Restoration
                    $ mariabackup --prepare \
                    --target-dir=/var/mariadb/backup/​

                    Restoring the Backup
                    mariabackup --copy-back \
                    --target-dir=/var/mariadb/backup/​


                    But if you are not confident in doing that, there is no problem too, just try de --purge in mysql and see if it works.

                    Comment

                    • ojosaghae
                      Junior Member
                      • Dec 2022
                      • 13

                      #12
                      Originally posted by [email protected]
                      No problem at all about your questions....

                      When you did the backup it supposed to storage in a different location, so check to see if it is in /var/mariadb/backup/. If it is, you can retrive the backup from this files with no problem, following instructions from where you learned how to do the backup... here it is what i get from there:

                      Preparing the Backup for Restoration
                      $ mariabackup --prepare \
                      --target-dir=/var/mariadb/backup/​

                      Restoring the Backup
                      mariabackup --copy-back \
                      --target-dir=/var/mariadb/backup/​


                      But if you are not confident in doing that, there is no problem too, just try de --purge in mysql and see if it works.

                      I tried following that, but it generated a "cannot create folder" error, so I used a different path for the --target-dir. And it backed up successfully.

                      If I want to reinstall, should I reference the custom path I used for the --target-dir? Or should I manually create a /var/mariadb/backup/ folder and copy the contents of the custom folder to it?
                      I've checked the backup and it's intact in the custom path/directory.

                      I'm just worried that the purge command will affect the files...

                      Comment

                      • ojosaghae
                        Junior Member
                        • Dec 2022
                        • 13

                        #13
                        I have run the commands you sent. But if I run a
                        Code:
                         locate mariadb
                        I see a whole lot of mariadb files.

                        Do I need to remove them too? Or just do a fresh/clean install over them?

                        Comment

                      • ingrid@gearnoc.com.br
                        Junior Member
                        • May 2022
                        • 13

                        #14
                        Yes, in the reinstall you should use the path you created. If you make sure that the backup was successful and the files are there, in the reinstall you just reference to that and it should get the backup.

                        Ideally you should test the backup before using it to make sure it’s ok and doesn’t have any corrupted files

                        Comment

                        • ojosaghae
                          Junior Member
                          • Dec 2022
                          • 13

                          #15
                          Originally posted by [email protected]
                          Yes, in the reinstall you should use the path you created. If you make sure that the backup was successful and the files are there, in the reinstall you just reference to that and it should get the backup.

                          Ideally you should test the backup before using it to make sure it’s ok and doesn’t have any corrupted files
                          You are a lifesaver. Thank you so much so far. Some few questions:

                          I have installed mariadb-server and other components following the instructions here https://mariadb.com/kb/en/installing-mariadb-deb-files/. Everything went smoothly.

                          What next now - the restore? I was thinking of using the backup to create a backup of this blank MariaDB installation beforehand so I won't have to go through this again (in case of an error).

                          Also, I tried running systemctl status mariadb-server but it returns a 'mariadb-server.service not found' error message.
                          Could it be because I haven't run systemctl enable and systemctl start?

                          Comment

                          Working...