CHECK_FTP returns "Connection refused"

Marc Powell marc at ena.com
Thu Jan 11 18:58:32 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Bret Goodfellow
> Sent: Thursday, January 11, 2007 11:47 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] CHECK_FTP returns "Connection refused"
> 
> I am running the check_ftp plugin against a server that is running
ftp.
> If I run the plugin from the command line (either as root or nagios),
the
> plugin appears to work, and gives me the following repsonse:
> 
> [root at dev02 plugins]# ./check_ftp -H dev01
> FTP OK - 0.004 second response time on port 21 [220 (vsFTPd
> 2.0.1)]|time=0.003810s;0.000000;0.000000;0.000000;10.000000
> [root at dev02 plugins]#

Always run plugin tests as the nagios user. Tests as any other user are
not valid.
 
> But, when this plugin runs from Nagios, the browser display shows the
> Service information to be: "Connection refused", and the nagios log
has
> the following entry:
> 
> [1168498800] CURRENT SERVICE STATE: dev01;ftp;CRITICAL;
HARD;3;Connection
> refused
> 
> Any ideas on this one?

Look at your host definition. The 'address' is most likely incorrect or
unresolve-able by the nagios user. Check to make sure that you're
testing the plugin in exactly the same way that it's run by nagios. You
can see what nagios is running by echoing your plugin command to a tmp
file like below. If you can't figure it out, please post the complete
host, service and command definitions.

define somecommand {
...
	command_line echo "$USER1$/check_ftp <other stuff here>" >>
/tmp/nagios-runs-me
}

--
Marc

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list