Recurrent errors in Apache http log

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Recurrent errors in Apache http log

Post by vmesquita »

There are some errors being showing up in the nagios error log almost with every entry, making the log huge:

Code: Select all

[Sun Apr 24 03:28:29 2016] [error] [client 172.27.15.48] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://nagios.selic.bc/nagiosxi/includes/components/nocscreen/noc.php
[Sun Apr 24 03:28:29 2016] [error] [client 172.27.15.48] PHP Notice:  Undefined variable: result in /usr/local/nagiosxi/html/includes/db.inc.php on line 249, referer: http://nagios.selic.bc/nagiosxi/includes/components/nocscreen/noc.php
[Sun Apr 24 03:28:29 2016] [error] [client 172.27.15.178] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432?\ncould not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://nagios.selic.bc/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=libracont.selic.bc&service=mainframe_metering_15&dest=auto
Any idea of what is causing this and how it can be fixed?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Recurrent errors in Apache http log

Post by Box293 »

Is the service running?

Code: Select all

service postgresql status
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: Recurrent errors in Apache http log

Post by vmesquita »

Yes:

Code: Select all

$ service postgresql status
postmaster (pid  2203) is running...
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Recurrent errors in Apache http log

Post by rkennedy »

Can you PM over a profile so that we can take a look at your environment? Additionally, what is the full output of netstat -an?
Former Nagios Employee
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: Recurrent errors in Apache http log

Post by vmesquita »

I attached the output of the command to this message. But I didn't understand the PM over profile, can you clarify?
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Recurrent errors in Apache http log

Post by ssax »

You can download your profile by going to Admin > System Config > System Profile and click the Download Profile button in the top right corner. Then just PM it to one of use by clicking on one of our names and then click the "Send a private message" link, make sure to click "Add the file" after you select your profile.
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: Recurrent errors in Apache http log

Post by vmesquita »

Ok, I sent to you both!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Recurrent errors in Apache http log

Post by ssax »

I'm not seeing anything from your profile that stands out.

Please PM this file as well:

Code: Select all

/var/lib/pgsql/data/pg_hba.conf
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Recurrent errors in Apache http log

Post by rkennedy »

Additionally, did you previously upgrade from an earlier version? Which version?
Former Nagios Employee
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: Recurrent errors in Apache http log

Post by vmesquita »

We upgraded from 5.2.5 to 5.2.7 recently, but this issue has been happening for a while.
Locked