Hello Guys,
I have 1 server for the zabbix server and 1 server for the database. When I try to launch Zabbix I get this error:
[Z3001] connection to database 'zabbix' failed: [2002] Can't connect to server on '10.126.101.156' (13)
20897:20230928:170535.069 Starting Zabbix Server. Zabbix 6.4.7 (revision 4e555c6d64d).
20897:20230928:170535.069 ****** Enabled features ******
20897:20230928:170535.069 SNMP monitoring: YES
20897:20230928:170535.069 IPMI monitoring: YES
20897:20230928:170535.069 Web monitoring: YES
20897:20230928:170535.069 VMware monitoring: YES
20897:20230928:170535.069 SMTP authentication: YES
20897:20230928:170535.069 ODBC: YES
20897:20230928:170535.069 SSH support: YES
20897:20230928:170535.069 IPv6 support: YES
20897:20230928:170535.069 TLS support: YES
20897:20230928:170535.069 ******************************
20897:20230928:170535.069 using configuration file: /etc/zabbix/zabbix_server.conf
20897:20230928:170535.070 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to server on '10.126.101.156' (13)
20897:20230928:170535.070 database is down: reconnecting in 10 seconds
The mysql service is running on the database server
[root@dcvx-zbxdb-p1 agents]# systemctl status mysqld.service
● mysqld.service - MySQL 8.0 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: d>
Active: active (running) since Thu 2023-09-28 17:17:47 WEST; 5s ago
Process: 170219 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, >
Process: 170243 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.servi>
Main PID: 170277 (mysqld)
Status: "Server is operational"
Tasks: 39 (limit: 48693)
Memory: 392.9M
CPU: 1.082s
CGroup: /system.slice/mysqld.service
└─170277 /usr/libexec/mysqld --basedir=/usr
Sep 28 17:17:46 dcvx-zbxdb-p1 systemd[1]: Starting MySQL 8.0 database server...
Sep 28 17:17:47 dcvx-zbxdb-p1 systemd[1]: Started MySQL 8.0 database server.
The error message says that it is not possible to connect to the database, but when I remotely access the database through the zabbix server, I can connect to the database
[root@dcvx-zbxmon-p1 agents]# mysql -uzabbix -p -h 10.126.101.156 zabbix
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 8.0.32 Source distribution
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
I have disabled the Selinux
SELINUX=disabled
This is my setup on file /etc/zabbix/zabbix_server.conf
DBHost=10.126.101.156
DBName=zabbix
DBPassword=password
DBPort=3306
What am I doing wrong? Could you help me please?
I have 1 server for the zabbix server and 1 server for the database. When I try to launch Zabbix I get this error:
[Z3001] connection to database 'zabbix' failed: [2002] Can't connect to server on '10.126.101.156' (13)
20897:20230928:170535.069 Starting Zabbix Server. Zabbix 6.4.7 (revision 4e555c6d64d).
20897:20230928:170535.069 ****** Enabled features ******
20897:20230928:170535.069 SNMP monitoring: YES
20897:20230928:170535.069 IPMI monitoring: YES
20897:20230928:170535.069 Web monitoring: YES
20897:20230928:170535.069 VMware monitoring: YES
20897:20230928:170535.069 SMTP authentication: YES
20897:20230928:170535.069 ODBC: YES
20897:20230928:170535.069 SSH support: YES
20897:20230928:170535.069 IPv6 support: YES
20897:20230928:170535.069 TLS support: YES
20897:20230928:170535.069 ******************************
20897:20230928:170535.069 using configuration file: /etc/zabbix/zabbix_server.conf
20897:20230928:170535.070 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to server on '10.126.101.156' (13)
20897:20230928:170535.070 database is down: reconnecting in 10 seconds
The mysql service is running on the database server
[root@dcvx-zbxdb-p1 agents]# systemctl status mysqld.service
● mysqld.service - MySQL 8.0 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: d>
Active: active (running) since Thu 2023-09-28 17:17:47 WEST; 5s ago
Process: 170219 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, >
Process: 170243 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.servi>
Main PID: 170277 (mysqld)
Status: "Server is operational"
Tasks: 39 (limit: 48693)
Memory: 392.9M
CPU: 1.082s
CGroup: /system.slice/mysqld.service
└─170277 /usr/libexec/mysqld --basedir=/usr
Sep 28 17:17:46 dcvx-zbxdb-p1 systemd[1]: Starting MySQL 8.0 database server...
Sep 28 17:17:47 dcvx-zbxdb-p1 systemd[1]: Started MySQL 8.0 database server.
The error message says that it is not possible to connect to the database, but when I remotely access the database through the zabbix server, I can connect to the database
[root@dcvx-zbxmon-p1 agents]# mysql -uzabbix -p -h 10.126.101.156 zabbix
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 8.0.32 Source distribution
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
I have disabled the Selinux
SELINUX=disabled
This is my setup on file /etc/zabbix/zabbix_server.conf
DBHost=10.126.101.156
DBName=zabbix
DBPassword=password
DBPort=3306
What am I doing wrong? Could you help me please?
Comment