Ad Widget

Collapse

DB connection error during setup

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lmontejo
    Junior Member
    • Feb 2018
    • 2

    #1

    DB connection error during setup

    Hi all.
    I've just installed zabbix 3.4.7 for the first time in CentOS 7.4 with postgreSQL 9.3.10.:
    Code:
    zabbix-agent.x86_64                  3.4.7-1.el7                    @zabbix
    zabbix-release.noarch                3.4-2.el7                      installed
    zabbix-server-pgsql.x86_64           3.4.7-1.el7                    @zabbix
    zabbix-web.noarch                    3.4.7-1.el7                    @zabbix
    zabbix-web-pgsql.noarch              3.4.7-1.el7                    @zabbix
    I receive the folowing error during setup:

    I can connect to database from any user/any server:
    Code:
    lmc@ascella:lmc > psql zabbix -U zabbix -h dracosrv
    Password for user zabbix:
    psql (9.3.5, server 9.3.10)
    Type "help" for help.
    
    zabbix=>
    [root@dracosrv /]# sudo -u zabbix psql zabbix -U zabbix -h localhost
    Password for user zabbix:
    psql (9.3.10)
    Type "help" for help.
    
    zabbix=>
    And during server start I can see connections going on at postgresql log:
    Code:
    < 2018-02-20 08:49:54.165 CET >LOG:  connection received: host=::1 port=34770
    < 2018-02-20 08:49:54.166 CET >LOG:  connection authorized: user=zabbix database=zabbix
    < 2018-02-20 08:49:54.167 CET >LOG:  connection authorized: user=zabbix database=zabbix
    < 2018-02-20 08:49:54.171 CET >LOG:  connection received: host=::1 port=34772
    < 2018-02-20 08:49:54.173 CET >LOG:  connection authorized: user=zabbix database=zabbix
    < 2018-02-20 08:49:55.061 CET >LOG:  connection received: host=::1 port=34774
    < 2018-02-20 08:49:55.064 CET >LOG:  connection authorized: user=zabbix database=zabbix
    < 2018-02-20 08:50:53.975 CET >LOG:  connection received: host=::1 port=34778
    < 2018-02-20 08:50:53.976 CET >LOG:  connection authorized: user=zabbix database=zabbix
    But when trying to connect during the setup proccess I can't see no connection attemp.
    This is zabbix_server.log during server start:
    Code:
    21127:20180220:084953.869 Starting Zabbix Server. Zabbix 3.4.7 (revision 77720).
     21127:20180220:084953.869 ****** Enabled features ******
     21127:20180220:084953.869 SNMP monitoring:           YES
     21127:20180220:084953.869 IPMI monitoring:           YES
     21127:20180220:084953.869 Web monitoring:            YES
     21127:20180220:084953.869 VMware monitoring:         YES
     21127:20180220:084953.869 SMTP authentication:       YES
     21127:20180220:084953.870 Jabber notifications:      YES
     21127:20180220:084953.870 Ez Texting notifications:  YES
     21127:20180220:084953.870 ODBC:                      YES
     21127:20180220:084953.870 SSH2 support:              YES
     21127:20180220:084953.870 IPv6 support:              YES
     21127:20180220:084953.870 TLS support:               YES
     21127:20180220:084953.870 ******************************
     21127:20180220:084953.870 using configuration file: /etc/zabbix/zabbix_server.conf
     21127:20180220:084953.900 current database version (mandatory/optional): 03040000/03040006
     21127:20180220:084953.900 required mandatory version: 03040000
     21127:20180220:084953.956 server #0 started [main process]
     21133:20180220:084953.960 server #3 started [alerter #2]
     21134:20180220:084953.960 server #4 started [alerter #3]
     21132:20180220:084953.960 server #2 started [alerter #1]
     21135:20180220:084953.961 server #5 started [housekeeper #1]
     21131:20180220:084953.961 server #1 started [configuration syncer #1]
     21136:20180220:084953.962 server #6 started [timer #1]
     21138:20180220:084953.963 server #8 started [discoverer #1]
     21137:20180220:084953.974 server #7 started [http poller #1]
     21140:20180220:084953.975 server #9 started [history syncer #1]
     21141:20180220:084953.977 server #10 started [history syncer #2]
     21148:20180220:084953.981 server #17 started [poller #1]
     21143:20180220:084953.988 server #12 started [history syncer #4]
     21145:20180220:084953.990 server #14 started [proxy poller #1]
     21150:20180220:084953.992 server #19 started [poller #3]
     21147:20180220:084953.996 server #16 started [task manager #1]
     21149:20180220:084953.998 server #18 started [poller #2]
     21142:20180220:084954.003 server #11 started [history syncer #3]
     21144:20180220:084954.005 server #13 started [escalator #1]
     21151:20180220:084954.008 server #20 started [poller #4]
     21146:20180220:084954.010 server #15 started [self-monitoring #1]
     21152:20180220:084954.019 server #21 started [poller #5]
     21158:20180220:084954.026 server #24 started [trapper #2]
     21153:20180220:084954.030 server #22 started [unreachable poller #1]
     21160:20180220:084954.036 server #26 started [trapper #4]
     21157:20180220:084954.042 server #23 started [trapper #1]
     21162:20180220:084954.047 server #28 started [icmp pinger #1]
     21159:20180220:084954.047 server #25 started [trapper #3]
     21161:20180220:084954.050 server #27 started [trapper #5]
     21164:20180220:084954.053 server #30 started [preprocessing manager #1]
     21163:20180220:084954.054 server #29 started [alert manager #1]
     21167:20180220:084955.154 server #33 started [preprocessing worker #3]
     21165:20180220:084955.157 server #31 started [preprocessing worker #1]
     21166:20180220:084955.159 server #32 started [preprocessing worker #2]
    Any help?

    Thanks
  • lmontejo
    Junior Member
    • Feb 2018
    • 2

    #2
    This is the content of my pg_hba.conf:
    Code:
    local   all             all                                     md5
    host    all             all             127.0.0.1/32            md5
    host    all             all             all            md5
    host    all             all             ::1/128                 md5
    I have tryied with "trust" instead of "md5"
    And DB access part of my zabbix_server.conf:
    Code:
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=zabbix
    DBPort=5432

    Comment

    • syrea
      Junior Member
      • Sep 2019
      • 1

      #3
      The most of case, this is SELINUX problems.

      Comment

      • ccekli
        Junior Member
        • Dec 2019
        • 4

        #4
        I have installed PostgreSQL 12, Zabbix 4.4 with Apache on Centos 8 and disabled Selinux but still doesn't connect.

        PostgreSQL pg_hba.conf includes "local all all trust" without # prefix.

        When I check zabbix server logs it says; [Z3001] connection to database 'zabbix' failed: [0] FATAL: Ident authentication failed for user "zabbix"

        Is it a bug or incompatible version isssue ?

        Comment

        Working...