I found a very similar thread, but it did not resolve my issue.
After installation of Zabbix, opening the web page to configure it fails on the "Configure DB Connection" page.
It says "Cannot connect to the database" and "Unable to select configuration"
Details of the installation are as follows:
Based on questions asked on other threads, this further information may assist:
After installation of Zabbix, opening the web page to configure it fails on the "Configure DB Connection" page.
It says "Cannot connect to the database" and "Unable to select configuration"
Details of the installation are as follows:
Code:
installed from
zabbix-release_7.0-2+debian12_all.deb
uname -a
Linux hostname 6.8.11-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.8.11-1kali2 (2024-05-30) x86_64 GNU/Linux
mysql --version
mysql Ver 15.1 Distrib 10.11.8-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
(note: looking at the files for mysql, all the mysql binaries appear to actually just be sym links to the mariadb binaries, I assume that is what the installation process does?)
apache2 --version
[Thu Jul 18 12:54:48.940825 2024] [core:warn] [pid 39066] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
(note: despite the error above, apache appears to be working and all the configureations mentioned are set correctly in the apache files.)
Based on questions asked on other threads, this further information may assist:
Code:
I can successfully log into mysql/mariadb as root, using the password I configures, and I can successfully log in as zabbix, using the password configured for that.
sudo mysql -uroot -p
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| zabbix |
+--------------------+
5 rows in set (0.000 sec)
mysql -uzabbix -p zabbix
MariaDB [zabbix]> select * from users;
Empty set (0.001 sec)
MariaDB [zabbix]> show tables;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| actions |
....
| widget_field |
+----------------------------+
203 rows in set (0.002 sec)
grep DBPassword /etc/zabbix/zabbix_server.conf
### Option: DBPassword
DBPassword=password
MariaDB [zabbix]> show grants;
+---------------------------------------------------------------------------------------------------------------+
| Grants for zabbix@localhost |
+---------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `zabbix`@`localhost` IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' |
| GRANT ALL PRIVILEGES ON `zabbix`.* TO `zabbix`@`localhost` |
+---------------------------------------------------------------------------------------------------------------+
2 rows in set (0.000 sec)
dpkg-query -l | grep zabbix
ii zabbix-agent 1:7.0.0+dfsg-2 amd64 network monitoring solution - agent
ii zabbix-apache-conf 1:7.0.0-1+debian12 all Zabbix network monitoring solution - apache configuration for front-end
ii zabbix-frontend-php 1:7.0.0+dfsg-2 all network monitoring solution - PHP front-end
ii zabbix-release 1:7.0-2+debian12 all Zabbix official repository configuration
ii zabbix-sender 1:7.0.0+dfsg-2 amd64 Zabbix network monitoring solution - sender
ii zabbix-server-mysql 1:7.0.0+dfsg-2 amd64 network monitoring solution - server (using MySQL)
ii zabbix-sql-scripts 1:7.0.0-1+debian12 all Zabbix network monitoring solution - sql-scripts
tail /var/log/zabbix-server/zabbix_server.log
18695:20240718:121343.060 Web monitoring: YES
18695:20240718:121343.060 VMware monitoring: YES
18695:20240718:121343.060 SMTP authentication: YES
18695:20240718:121343.060 ODBC: YES
18695:20240718:121343.060 SSH support: YES
18695:20240718:121343.060 IPv6 support: YES
18695:20240718:121343.060 TLS support: YES
18695:20240718:121343.060 ******************************
18695:20240718:121343.060 using configuration file: /etc/zabbix/zabbix_server.conf
18695:20240718:121343.064 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
Comment