Hello Friends,
I am having issues with PostgreSQL connection
Environment
Zabbix : 6.0.18
PostgreSQL 14
I am trying to set up three different servers 1 for each zabbix, postgreSQL and Frontend
I have imported the schema on the DB server running PostgreSQL using below command
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
The tables are created and have allowed all permissions on pg_hba.conf to allow connections from any where. 0.0.0.0/0
DB Server is listening on all interfaces but i am getting issues when configuring frontend. it throws below error during the FE configuration.
Details Cannot connect to the database.
Unable to determine current Zabbix database version: the table "dbversion" was not found.
The zabbix server running on different server can connect to DB without any issues
DB Server:
root@db01:/var/log/postgresql# tail -f postgresql-14-main.log
2023-06-18 05:44:09.105 UTC [3809] LOG: aborting any active transactions
2023-06-18 05:44:09.121 UTC [3809] LOG: background worker "logical replication launcher" (PID 3816) exited with exit code 1
2023-06-18 05:44:09.123 UTC [3811] LOG: shutting down
2023-06-18 05:44:09.147 UTC [3809] LOG: database system is shut down
2023-06-18 05:44:09.414 UTC [4035] LOG: starting PostgreSQL 14.8 (Ubuntu 14.8-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, 64-bit
2023-06-18 05:44:09.414 UTC [4035] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-06-18 05:44:09.414 UTC [4035] LOG: listening on IPv6 address "::", port 5432
2023-06-18 05:44:09.416 UTC [4035] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-06-18 05:44:09.421 UTC [4036] LOG: database system was shut down at 2023-06-18 05:44:09 UTC
2023-06-18 05:44:09.431 UTC [4035] LOG: database system is ready to accept connections
Zabbix Server, I can see that there is database version listed in the logs and also i can see that the table is present.
3921:20230618:061309.624 database is down: reconnecting in 10 seconds
706:20230618:061415.150 Starting Zabbix Server. Zabbix 6.0.18 (revision d2032721bc8).
706:20230618:061415.163 ****** Enabled features ******
706:20230618:061415.163 SNMP monitoring: YES
706:20230618:061415.163 IPMI monitoring: YES
706:20230618:061415.163 Web monitoring: YES
706:20230618:061415.163 VMware monitoring: YES
706:20230618:061415.163 SMTP authentication: YES
706:20230618:061415.163 ODBC: YES
706:20230618:061415.163 SSH support: YES
706:20230618:061415.163 IPv6 support: YES
706:20230618:061415.163 TLS support: YES
706:20230618:061415.163 ******************************
706:20230618:061415.163 using configuration file: /etc/zabbix/zabbix_server.conf
706:20230618:061417.196 current database version (mandatory/optional): 06000000/06000020
706:20230618:061417.196 required mandatory version: 06000000
728:20230618:061418.023 starting HA manager
728:20230618:061418.335 HA manager started in active mode
DB version table on DB server
List of relations
Schema | Name | Type | Owner
--------+----------------------------+----------+--------
public | acknowledges | table | zabbix
public | actions | table | zabbix
public | alerts | table | zabbix
public | auditlog | table | zabbix
public | autoreg_host | table | zabbix
public | conditions | table | zabbix
public | config | table | zabbix
public | config_autoreg_tls | table | zabbix
public | corr_condition | table | zabbix
public | corr_condition_group | table | zabbix
public | corr_condition_tag | table | zabbix
public | corr_condition_tagpair | table | zabbix
public | corr_condition_tagvalue | table | zabbix
public | corr_operation | table | zabbix
public | correlation | table | zabbix
public | dashboard | table | zabbix
public | dashboard_page | table | zabbix
public | dashboard_user | table | zabbix
public | dashboard_usrgrp | table | zabbix
public | dbversion | table | zabbix
zabbix=> SELECT * FROM dbversion;
dbversionid | mandatory | optional
-------------+-----------+----------
1 | 6000000 | 6000020
(1 row)
I am able to telnet DB server on port 5432 from FE server but issue persists.
Any pointers will be helpful
TIA
Hitesh
Comment