Page 1 of 2

Recurrent errors in Apache http log

Posted: Fri Apr 29, 2016 4:34 pm
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?

Re: Recurrent errors in Apache http log

Posted: Sun May 01, 2016 11:48 pm
by Box293
Is the service running?

Code: Select all

service postgresql status

Re: Recurrent errors in Apache http log

Posted: Mon May 02, 2016 9:56 am
by vmesquita
Yes:

Code: Select all

$ service postgresql status
postmaster (pid  2203) is running...

Re: Recurrent errors in Apache http log

Posted: Mon May 02, 2016 12:45 pm
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?

Re: Recurrent errors in Apache http log

Posted: Mon May 02, 2016 2:57 pm
by vmesquita
I attached the output of the command to this message. But I didn't understand the PM over profile, can you clarify?

Re: Recurrent errors in Apache http log

Posted: Mon May 02, 2016 3:23 pm
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.

Re: Recurrent errors in Apache http log

Posted: Mon May 02, 2016 4:32 pm
by vmesquita
Ok, I sent to you both!

Re: Recurrent errors in Apache http log

Posted: Mon May 02, 2016 4:42 pm
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

Re: Recurrent errors in Apache http log

Posted: Mon May 02, 2016 4:44 pm
by rkennedy
Additionally, did you previously upgrade from an earlier version? Which version?

Re: Recurrent errors in Apache http log

Posted: Tue May 03, 2016 10:31 am
by vmesquita
We upgraded from 5.2.5 to 5.2.7 recently, but this issue has been happening for a while.