I'm developing a docker cluster of Zabbix server (a container based in mysql with the database, and zabbix-server and zabbix-front containers).
The running line to mysql server is:
docker run --name zabbix-db --network zabbixnet -e MYSQL_ROOT_PASSWORD="password" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix" -e MYSQL_DATABASE="zabbix" -d mysql
And the lines to zabbix containers are:
docker run --name zabbix-server --network zabbixnet -e DB_SERVER_HOST="zabbix-db" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix" -d zabbix/zabbix-server-mysql
docker run --name zabbix-front --network zabbixnet --link zabbix-server -p80:8080 -e DB_SERVER_HOST="zabbix-db" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix" -e PHP_TZ="Europe/Madrid" -d zabbix/zabbix-web-apache-mysql
When I start the zabbix-server container, the log is:
** Preparing Zabbix server
** Using MYSQL_USER variable from ENV
** Using MYSQL_PASSWORD variable from ENV
********************
* DB_SERVER_HOST: zabbix-db
* DB_SERVER_PORT: 3306
* DB_SERVER_DBNAME: zabbix
********************
** Database 'zabbix' already exists. Please be careful with database COLLATE!
** Creating 'zabbix' schema in MySQL
** Preparing Zabbix server configuration file
** Updating '/etc/zabbix/zabbix_server.conf' parameter "ListenIP": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "ListenPort": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "ListenBacklog": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "SourceIP": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "LogType": 'console'...updated
** Updating '/etc/zabbix/zabbix_server.conf' parameter "LogFile": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "LogFileSize": ''...removed
[...]
** Updating '/etc/zabbix/zabbix_server.conf' parameter "ProxyDataFrequency": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "SSLCertLocation": '/var/lib/zabbix/ssl/certs/'...updated
** Updating '/etc/zabbix/zabbix_server.conf' parameter "SSLKeyLocation": '/var/lib/zabbix/ssl/keys/'...updated
** Updating '/etc/zabbix/zabbix_server.conf' parameter "SSLCALocation": '/var/lib/zabbix/ssl/ssl_ca/'...updated
** Updating '/etc/zabbix/zabbix_server.conf' parameter "LoadModulePath": '/var/lib/zabbix/modules/'...updated
** Updating '/etc/zabbix/zabbix_server.conf' parameter "HANodeName": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "NodeAddress": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "User": 'zabbix'...updated
Starting Zabbix Server. Zabbix 6.2.2 (revision 3545586).
Press Ctrl+C to exit.
7:20220913:082616.221 Starting Zabbix Server. Zabbix 6.2.2 (revision 3545586).
7:20220913:082616.221 ****** Enabled features ******
7:20220913:082616.221 SNMP monitoring: YES
7:20220913:082616.221 IPMI monitoring: YES
7:20220913:082616.221 Web monitoring: YES
7:20220913:082616.221 VMware monitoring: YES
7:20220913:082616.221 SMTP authentication: YES
7:20220913:082616.221 ODBC: YES
7:20220913:082616.221 SSH support: YES
7:20220913:082616.221 IPv6 support: YES
7:20220913:082616.221 TLS support: YES
7:20220913:082616.221 ******************************
7:20220913:082616.221 using configuration file: /etc/zabbix/zabbix_server.conf
7:20220913:082616.223 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
Effectively, the table is empty:
mysql> select * from users;
Empty set (0.00 sec)
Am I doing something wrong? Am I missing any important steps? Isn't zabbix-server -as seen in the log- supposed to create the entire database schema?