Sporadic 'Connection refused' errors in 4.2.4

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
kernow5000
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by kernow5000 »

Will do.

That past alert was actually real too, still tackling that one!

I love nagios :)
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by dwhitfield »

It's probably best to start a new thread if the alert did not work properly. However, I think the alert did work, you only got connection refused, which didn't seem appropriate to you. Is that correct?

If the server/application did go down, connection refused doesn't sound odd at all to me, but maybe I am misunderstanding the situation. Maybe you could explain a bit more about the actual alert in the other thread, if you feel it is warranted.
kernow5000
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by kernow5000 »

That's correct.

I got an absolute ton of email only alerts and a few sms's last night, nothing was down.

Going to do a bit of investigation today but I can hardly increase timeouts any more from 60 seconds.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by tgriep »

A couple of other things to check on for the intermittent issue for your checks is is network outages, if you have any firewalls that are blocking the Nagios system temporarily.
Do you see any errors in the logs of the web site you are checking?
Be sure to check out our Knowledgebase for helpful articles and solutions!
kernow5000
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by kernow5000 »

I'll have a look, but no firewall configuration changes - or activity I can correlate to the alerts.

Checking logs to see if anything untoward is happening, is a good idea though.

I'll have a look.
kernow5000
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by kernow5000 »

Nagios box:

Same error 11 in /var/log/messages at 12:02 AM

***** Nagios *****
Notification Type: PROBLEM
Service: HTTPS check
Host: REDACTED
Address: REDACTED
State: CRITICAL
Date/Time: Thu Jan 12 12:02:00 GMT 2017
Additional Info:
connect to address REDACTED and port 443: Connection refused



The box being checked:

[12/Jan/2017:00:02:03 +0000] <NAGIOS-IP> TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET / HTTP/1.1" 1



So it registers the hit on the apache log on the box being checked, but nagios says 'connection refused' and fires an alert.
I have no idea why as this is checked every ten minutes, all day every day.
kernow5000
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by kernow5000 »

nagios:
***** Nagios *****
Notification Type: PROBLEM
Host: REDACTED
State: DOWN
Address: REDACTED
Info: CRITICAL - Socket timeout
Date/Time: Thu Jan 12 14:39:10 GMT 2017

box being checked
<NAGIOS IP> - - [08/Jan/2017:14:39:11 +0000] "GET /REDACTED HTTP/1.1" 200 3

Doesn't make sense.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by tgriep »

It could be that the check is on the edge of the timeout setting that the check_http plugin has and it is causing the connection / timeout intermittent issues.
Try increasing the timeout to 59 seconds for your check_http command by adding the following option to it.

Code: Select all

-t 59
Be sure to check out our Knowledgebase for helpful articles and solutions!
kernow5000
Posts: 58
Joined: Mon Jan 09, 2017 9:06 am

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by kernow5000 »

I did notice that 60 second limit actually on external commands.

I'll play about on Monday!

Have a great weekend guys.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Sporadic 'Connection refused' errors in 4.2.4

Post by dwhitfield »

Is it possible to send a passive check? I know it's not an ideal solution, but it seems like if other people were getting false positive notifications we'd know about it.

Of course, waiting to hear back about the -t 59 too!
Locked