Thanks for your time. May I please get assistance with the following?
I have automatic updates via Webmin enabled on my Ubuntu VM and it upgraded my Zabbix agent, frontend-php, nginx-conf, server-mysql and sql-scripts from 6.2.0 to 6.2.6. All was running fine until last night, when I rebooted my esxi which rebooted my Zabbix VM. Now, I am receiving an error in the zabbix_server.log:
Initially, I was receiving:
Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
****** Enabled features ******
SNMP monitoring: YES
IPMI monitoring: YES
Web monitoring: YES
VMware monitoring: YES
SMTP authentication: YES
ODBC: YES
SSH support: YES
IPv6 support: YES
TLS support: YES
******************************
using configuration file: /etc/zabbix/zabbix_server.conf
current database version (mandatory/optional): 06020000/06020006
required mandatory version: 06020000
optional patches were found
starting automatic database upgrade
$ sudo systemctl status zabbix-server mysql
● zabbix-server.service - Zabbix Server
Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
Active: activating (start) since Thu 2023-01-05 00:14:17 MST; 1s ago
Cntrl PID: 2147 (zabbix_server)
Tasks: 2 (limit: 8155)
Memory: 2.8M
CPU: 15ms
CGroup: /system.slice/zabbix-server.service
└─2147 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
Jan 05 00:14:17 zabbix6 systemd[1]: Starting Zabbix Server...
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-01-04 23:53:18 MST; 21min ago
Process: 824 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 938 (mysqld)
Status: "Server is operational"
Tasks: 45 (limit: 8155)
Memory: 558.6M
CPU: 11.024s
CGroup: /system.slice/mysql.service
└─938 /usr/sbin/mysqld
Jan 04 23:53:16 zabbix6 systemd[1]: Starting MySQL Community Server...
Jan 04 23:53:18 zabbix6 systemd[1]: Started MySQL Community Server.
My zabbix_server.conf
$ sudo grep -e DBName -eDBUser -eDBPassword /etc/zabbix/zabbix_server.conf | grep -v "#"
DBName=zabbix_db
DBUser=zabbix
DBPassword=zabbixpass
My zabbix.conf.php
$ sudo cat /etc/zabbix/web/zabbix.conf.php | more
<?php
// Zabbix GUI configuration file.
$DB['TYPE'] = 'MYSQL';
$DB['SERVER'] = 'localhost';
$DB['PORT'] = '0';
$DB['DATABASE'] = 'zabbix_db';
$DB['USER'] = 'zabbix';
$DB['PASSWORD'] = 'zabbixpass';
mysql errata:
$ mysql -u zabbix -h localhost --database=zabbix_db -p zabbixpass
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 640
Server version: 8.0.31-0ubuntu0.22.04.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
-------------------------------------------------------------------------------------------------
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| zabbix_db |
+--------------------+
-------------------------------------------------------------------------------------------------
mysql> SHOW GRANTS FOR CURRENT_USER;
+--------------------------------------------------------------------------------------------------------------------------------+
| Grants for zabbix@localhost |
+--------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, REFERENCES, ALTER ON *.* TO `zabbix`@`localhost` WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `zabbix_db`.* TO `zabbix`@`localhost` |
+--------------------------------------------------------------------------------------------------------------------------------+
-------------------------------------------------------------------------------------------------
mysql> SHOW VARIABLES LIKE '%plugin%';
+-----------------------------------------------+------------------------+
| Variable_name | Value |
+-----------------------------------------------+------------------------+
| default_authentication_plugin | caching_sha2_password |
| plugin_dir | /usr/lib/mysql/plugin/ |
| replication_optimize_for_static_plugin_config | OFF |
+-----------------------------------------------+------------------------+
-------------------------------------------------------------------------------------------------
mysql> SHOW CREATE USER 'zabbix'@'localhost';
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER for zabbix@localhost |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER `zabbix`@`localhost` IDENTIFIED WITH 'caching_sha2_password' AS '$V$447$juPL^9_=x_\'20eq
h}bLMbjI4ooA3h0nW8Cb2djNn6ZlWe/zK/8ItsMwTkxrW' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
OS Info:
$ cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
I have automatic updates via Webmin enabled on my Ubuntu VM and it upgraded my Zabbix agent, frontend-php, nginx-conf, server-mysql and sql-scripts from 6.2.0 to 6.2.6. All was running fine until last night, when I rebooted my esxi which rebooted my Zabbix VM. Now, I am receiving an error in the zabbix_server.log:
Initially, I was receiving:
Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
****** Enabled features ******
SNMP monitoring: YES
IPMI monitoring: YES
Web monitoring: YES
VMware monitoring: YES
SMTP authentication: YES
ODBC: YES
SSH support: YES
IPv6 support: YES
TLS support: YES
******************************
using configuration file: /etc/zabbix/zabbix_server.conf
current database version (mandatory/optional): 06020000/06020006
required mandatory version: 06020000
optional patches were found
starting automatic database upgrade
- [Z3005] query failed: [1419] You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) [create trigger hosts_name_upper_insert before insert on hosts for each row set new.name_upper=upper(new.name)]
- database upgrade failed
- [Z3001] connection to database 'zabbix_db' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
- database is down: reconnecting in 10 seconds
$ sudo systemctl status zabbix-server mysql
● zabbix-server.service - Zabbix Server
Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
Active: activating (start) since Thu 2023-01-05 00:14:17 MST; 1s ago
Cntrl PID: 2147 (zabbix_server)
Tasks: 2 (limit: 8155)
Memory: 2.8M
CPU: 15ms
CGroup: /system.slice/zabbix-server.service
└─2147 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
Jan 05 00:14:17 zabbix6 systemd[1]: Starting Zabbix Server...
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-01-04 23:53:18 MST; 21min ago
Process: 824 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 938 (mysqld)
Status: "Server is operational"
Tasks: 45 (limit: 8155)
Memory: 558.6M
CPU: 11.024s
CGroup: /system.slice/mysql.service
└─938 /usr/sbin/mysqld
Jan 04 23:53:16 zabbix6 systemd[1]: Starting MySQL Community Server...
Jan 04 23:53:18 zabbix6 systemd[1]: Started MySQL Community Server.
My zabbix_server.conf
$ sudo grep -e DBName -eDBUser -eDBPassword /etc/zabbix/zabbix_server.conf | grep -v "#"
DBName=zabbix_db
DBUser=zabbix
DBPassword=zabbixpass
My zabbix.conf.php
$ sudo cat /etc/zabbix/web/zabbix.conf.php | more
<?php
// Zabbix GUI configuration file.
$DB['TYPE'] = 'MYSQL';
$DB['SERVER'] = 'localhost';
$DB['PORT'] = '0';
$DB['DATABASE'] = 'zabbix_db';
$DB['USER'] = 'zabbix';
$DB['PASSWORD'] = 'zabbixpass';
mysql errata:
$ mysql -u zabbix -h localhost --database=zabbix_db -p zabbixpass
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 640
Server version: 8.0.31-0ubuntu0.22.04.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
-------------------------------------------------------------------------------------------------
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| zabbix_db |
+--------------------+
-------------------------------------------------------------------------------------------------
mysql> SHOW GRANTS FOR CURRENT_USER;
+--------------------------------------------------------------------------------------------------------------------------------+
| Grants for zabbix@localhost |
+--------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, REFERENCES, ALTER ON *.* TO `zabbix`@`localhost` WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `zabbix_db`.* TO `zabbix`@`localhost` |
+--------------------------------------------------------------------------------------------------------------------------------+
-------------------------------------------------------------------------------------------------
mysql> SHOW VARIABLES LIKE '%plugin%';
+-----------------------------------------------+------------------------+
| Variable_name | Value |
+-----------------------------------------------+------------------------+
| default_authentication_plugin | caching_sha2_password |
| plugin_dir | /usr/lib/mysql/plugin/ |
| replication_optimize_for_static_plugin_config | OFF |
+-----------------------------------------------+------------------------+
-------------------------------------------------------------------------------------------------
mysql> SHOW CREATE USER 'zabbix'@'localhost';
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER for zabbix@localhost |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER `zabbix`@`localhost` IDENTIFIED WITH 'caching_sha2_password' AS '$V$447$juPL^9_=x_\'20eq
h}bLMbjI4ooA3h0nW8Cb2djNn6ZlWe/zK/8ItsMwTkxrW' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
OS Info:
$ cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
Comment