Ad Widget

Collapse

Zabbix 1.8 Wizard Failing DB Connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeffkelly
    Junior Member
    • Oct 2009
    • 8

    #1

    Zabbix 1.8 Wizard Failing DB Connection

    Hello,

    A few weeks ago, I built a server using v1.6 on Ubuntu 9.10. I followed Johnusa's procedure to the letter. The frontend loader (wizard) passed everything, but the Zabbix control panel said the Zabbix server wasn't running. Given v1.8 was release shortly afterward, I decided to wipe the server and reinstall using the same procedure. I have issues in v1.8 that didn't exist in v1.6.

    After the new installation, I ran the frontend loader (wizard) and it failed on step 3: PHP memory limit, PHP, post max size and PHP MB string overload. Using posts on this forum, I changed a few values in php.ini and step 3 now passes. My current issue is in step 4: configure DB connection. After entering the correct info and pressing "Test Connection", I get three errors:

    Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "xxx.xxx.xxx.xxx" and accepting TCP/IP connections on port 5432? in /home/zabbix/public_html/include/db.inc.php on line 81

    Warning: Cannot modify header information - headers already sent by (output started at /home/zabbix/public_html/include/db.inc.php:81) in /home/zabbix/public_html/include/page_header.php on line 72

    Warning: Cannot modify header information - headers already sent by (output started at /home/zabbix/public_html/include/db.inc.php:81) in /home/zabbix/public_html/include/func.inc.php on line 247

    I'm guessing the bottom two are because of the first error. I've spent much time searching for a solution without success. Can someone help me solve the problem. As I stated, I followed Johnusa's revised procedure verbatim. With Zabbix 1.6, no problem with the frontend loader...with v1.8 I'm having issues and am stuck.

    Thanks in advance,

    Jeff
  • jeffkelly
    Junior Member
    • Oct 2009
    • 8

    #2
    I decided to try again and got the same results. Can someone please tell me why this is happening? The DB connection worked on 1.6.5, but doesn't with 1.8.

    I'm running Ubuntu 9.10, PHP 5.2.10, and PostgreSQL. The server is on the same subnet as my test workstation. To my knowledge, I'm not blocking anything. I've attached a screenshot of the problem.

    Please help. Thanks
    Attached Files

    Comment

    • nmail_uk
      Member
      • May 2009
      • 65

      #3
      What do you get if you telnet from your Zabbix server to your database server?

      # telnet 192.168.0.45 5432

      Are you absolutely certain PostgreSQL is up and running, and it hasn't crashed since you wiped the last Zabbix install off?

      Comment

      • jeffkelly
        Junior Member
        • Oct 2009
        • 8

        #4
        Originally posted by nmail_uk
        What do you get if you telnet from your Zabbix server to your database server?

        # telnet 192.168.0.45 5432

        Are you absolutely certain PostgreSQL is up and running, and it hasn't crashed since you wiped the last Zabbix install off?
        Attempting a telnet connection fails...Could not open connection to the host, on port 5432: Connect failed.

        Each time I installed Zabbix, I reinstalled Ubuntu and told it to use the entire disk. I assume this reformats the disk?

        PhpPgAdmin launches fine (A few pics attached). The postgres process list is as follows:

        zabbix@NMS:~$ ps aux | grep postgres
        postgres 863 0.0 0.2 45324 5280 ? S Dec21 0:01 /usr/lib/postgresql/8.4/bin/postgres -D /var/lib/postgresql/8.4/main -c config_file=/etc/postgresql/8.4/main/postgresql.conf
        postgres 866 0.0 0.0 45324 1772 ? Ss Dec21 0:02 postgres: writer process
        postgres 867 0.0 0.0 45324 1252 ? Ss Dec21 0:01 postgres: wal writer process
        postgres 868 0.0 0.0 45620 1580 ? Ss Dec21 0:01 postgres: autovacuum launcher process
        postgres 869 0.0 0.0 13628 1292 ? Ss Dec21 0:02 postgres: stats collector process
        zabbix 4343 0.0 0.0 3040 868 pts/0 S+ 09:44 0:00 grep --color=auto postgres

        Thanks in advance for your replies.
        Attached Files

        Comment

        • nmail_uk
          Member
          • May 2009
          • 65

          #5
          OK, it looks as though PostgreSQL is only listening on localhost so your Zabbix server can't talk to it (I assume it's a different box - if it isn't, point Zabbix to "localhost" instead of 192.168.0.45.)

          To get PostgreSQL listening on your 192... IP address, you need to modify the postgresql.conf file located in the root of PostgreSQL (it looks like /var/lib/postgresql/8.4/main in your case.)

          Find the line that says "listen_addresses = ..." and change it to say:

          listen_addresses = "*"
          Then restart PostgreSQL ("service postgres restart" or "service postgresql restart" if you're on a recent Ubuntu version) and try it again.

          Comment

          • jeffkelly
            Junior Member
            • Oct 2009
            • 8

            #6
            I should have mentioned Zabbix and Postgres are installed on the same computer (a workstation). I am running a server copy of Ubuntu 9.10. This is proof of concept testing. If all goes well, I will commission a server and configure for our enterprise.

            I decided to re-install the OS, Zabbix, etc. I'm trying the older v1.65 to see if it is stable as in the past. If so, I will likely try moving to v1.8 again. More to come...

            Comment

            Working...