Ad Widget

Collapse

Error Connecting to database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Grabix
    Junior Member
    • Oct 2021
    • 4

    #1

    Error Connecting to database

    Hello, I need your help!
    I can't connect to the db zabbix from the zabbix web interface itself, but if I try from pgadmin, I can connect without problems (as you can see in the attachment).
    I am using postgres12 on centos7.
    In the server configuration file I set the password I'm also using on pgadmin but in the zabbix log (/var/log/zabbix/zabbix_server.log)
    I have the following error:
    "connection to database 'zabbix' failed: [0] FATAL: ident authentication failed for the user zabbix"

    How can I fix it?
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    In order to be able to connect with ID and password from Zabbix server process, it is necessary to allow connection in the setting in pg_hba.conf. By default, connections from 127.0.0.1/32 and ::1/128 are supposed to be ident, but I think trust needs to be changed.

    Comment

    • Grabix
      Junior Member
      • Oct 2021
      • 4

      #3
      I made changes to the file pg_hba.conf but without success. Could I have a working example?

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        According to the memo when I built the environment in the past, I had the following settings.
        Code:
        local all all trust
        host all all 127.0.0.1/32 trust
        host all all ::1/128 trust

        Comment

        Working...