Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-7795

PostgreSQL unix sock connections issues

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 2.2.1
    • Documentation (D)
    • openSUSE 12.3
      PostgreSQL 9.2-2.1.1

      I encountered a problem during upgrade from Zabbix server 2.0.9 to 2.2.1, via openSUSE monitoring repo packages. Previously Zabbix (2.0.7, 2.0.8, & 2.0.9) was connecting using a unix-style socket file (instead of a listening network socket). After upgrading, this type of connection seems to be failing - from the server log:

      -------------------------
      13632:20140204:174820.079 Database is down. Reconnecting in 10 seconds.
      13632:20140204:174830.080 [Z3001] connection to database 'zabbix' failed: [0] could not connect to server: No such file or directory
      Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
      -------------------------

      Note this /tmp/.s.PGSQL.5432 file does exist, with proper permissions. While troubleshooting this, I verified that SELinux is not active, that I can connect using psql (command line tool), and that PostgreSQL & Zabbix server ARE actually running. Since no postgres config changed were made during the upgrade, I suspect this may be due to a change in Zabbix 2.2 branch.

      Previously I'd followed instructions for the zabbix-server.conf file for using unix sockets with Zabbix, by setting DBHost to blank. Relevant snippet below:

      --------------
      DBHost=
      DBName=zabbix
      DBUser=zabbix
      DBSocket=/tmp/.s.PGSQL.5432
      --------------

      At this point I am wondering if the syntax in zabbix-server.conf required to force Unix domain socket connections has changed, or is broken, between 2.0.9 and 2.2.1. I've tried fiddling with different combos of this syntax, but so far no luck.

      For now I've allowed Postgres to listen on localhost via network socket, and am (successfully) allowing Zabbix to connect that way instead. The database was upgraded properly & new setup is (mostly) working, but I'd like to go back to using Unix sockets if possible.

      I've searched for similar existing bugs, but not found any recent related to this. Am willing to help troubleshoot with add'tl info/testing as needed. Thanks!

            Unassigned Unassigned
            dconry Don Conry
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: