Ad Widget

Collapse

zabbix installation with PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darkhorse
    Junior Member
    • Aug 2016
    • 2

    #1

    zabbix installation with PostgreSQL

    I am setting up zabbix 3.0 on RHEL 7 with PostgreSQL and during the setup, on the Configure DB connection step I receive the error "Cannot connect to the database" (attached screenshot). Any suggestions?
    I a able to login to the DB using the zabbix user id using command line.
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    A couple things to check:

    If you have selinux enabled, you may need to update the rules there to allow zabbix to connect to the database. This link will point you in the right direction there: http://serverfault.com/questions/665...resql-database

    Also, another thing to check are the settings in /var/lib/pgsql/data/pg_hba.conf.

    __Jason

    Comment

    • darkhorse
      Junior Member
      • Aug 2016
      • 2

      #3
      Originally posted by guzzijason

      Also, another thing to check are the settings in /var/lib/pgsql/data/pg_hba.conf.

      __Jason
      Hi Jason.
      when I try to use the psql from the server and use the -h option it fails but without it it works fine.

      psql -U zabbix -d zabbix -h localhost
      psql: FATAL: Ident authentication failed for user "zabbix"


      psql -U zabbix -d zabbix
      psql (9.2.15)
      Type "help" for help.

      zabbix=>

      I have these entries in my /var/lib/pgsql/data/pg_hba.conf
      local all all peer
      host all all 127.0.0.1/32 ident

      Thanks

      Comment

      • guzzijason
        Senior Member
        • Dec 2015
        • 106

        #4
        Originally posted by darkhorse
        Hi Jason.
        local all all peer
        host all all 127.0.0.1/32 ident
        Thanks
        Try changing to:


        Code:
        local   all             all                                     md5
        host    all             all             127.0.0.1/32            md5
        __Jason
        Last edited by guzzijason; 02-09-2016, 19:50.

        Comment

        • guzzijason
          Senior Member
          • Dec 2015
          • 106

          #5
          actually, you might want to change the local method to "md5" as well (used by connections using unix domain sockets).

          (edited my previous response to reflect this)

          __Jason

          Comment

          Working...