Problem with check_ftp and check_pop
Anders Nerheim
anders at jblinux.net
Fri Dec 13 21:12:57 CET 2002
this is the results of the nagios-plugins-1.3.0-beta2.tar.gz package. I
tried the package from cvs a few daysago, with same result
[root at nagios libexec]# ./check_pop -H mailserver -v
POP OK - 0.002 second response time on port 110|time= 0.002
Segmentation fault
[root at nagios libexec]# ./check_ftp -H ftp.uninett.no -v
FTP OK - 0.047 second response time on port 21|time= 0.047
Segmentation fault
[root at nagios libexec]#
another odd thing is this
[root at nagios libexec]# ./check_dns -H yahoo.com
Segmentation fault
[root at nagios libexec]# ./check_dns -H yahoo.com -s 195.159.0.100
DNS ok - 0 seconds response time, Address(es) is/are 64.58.79.230
[root at nagios libexec]# strace -o check_ftp.strace ./check_ftp -H
ftp.uninett.no -v
FTP OK - 0.057 second response time on port 21|time= 0.057
[root at nagios libexec]# ./check_ftp -H ftp.uninett.no
-v
FTP OK - 0.045 second response time on port 21|time= 0.045
Segmentation fault
check_ftp.strace is put in as an attachment.
On Fri, 2002-12-13 at 20:30, Jasmine Chua wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Try to test it without your Nagios server.. with -v option to debug it.
>
> On Saturday 14 December 2002 03:19, Jasmine Chua wrote:
> > Try the CVS release.
> > Yes they are all linked to check_tcp but running on different ports. Since
> > the rest of them are working, I dont see why you cant run check_ftp.
> >
> > On Saturday 14 December 2002 03:02, you wrote:
> > > I did configure the plugins with the prefix, cgibin, and http directives
> > > pointing to the correct location. Everything else seems to work just
> > > fine, including check_tcp. I should ask that, in my system check_ftp,
> > > check_imap, check_nntp and check_pop are all symlinked to check_tcp. Is
> > > that correct? Anyway, everything else seems to work fine as far as the
> > > plugins.
> > >
> > > Dan
> > >
> > > -----Original Message-----
> > > From: Jasmine Chua [mailto:jasmine.chua at securecirt.com]
> > > Sent: Friday, December 13, 2002 12:58 PM
> > > To: nagios-users at lists.sourceforge.net
> > > Cc: Dan Spray
> > > Subject: Re: [Nagios-users] Problem with check_ftp and check_pop
> > >
> > > maybe because its not locating "utils.pm".
> > >
> > > use "/usr/local/nagios/libexec";
> > >
> > > use utils qw (.....);
> > >
> > > > Read the INSTALL file. Make sure you set the -PREFIXthingy
> > > > to your nagios install, and set the -CGIPATHthingy to /nagios/cgi-bin
> > > > (if you installed nagios with defaults). That's in ./configure
> > > >
> > > > After that run "make"
> > > > Then "make install"
> > > >
> > > > Plugins should now be under /somedir/nagios/libexec
> > >
> > > On Saturday 14 December 2002 02:38, you wrote:
> > > > I am using nagios-plugins-1.3.0-beta2.tar.gz on RH 7.3. What
> > >
> > > libraries
> > >
> > > > are you talking about?
> > > >
> > > > -----Original Message-----
> > > > From: Jasmine Chua [mailto:jasmine.chua at securecirt.com]
> > > > Sent: Friday, December 13, 2002 12:36 PM
> > > > To: nagios-users at lists.sourceforge.net
> > > > Cc: Dan Spray
> > > > Subject: Re: [Nagios-users] Problem with check_ftp and check_pop
> > > >
> > > > Check to see if the libraries are there.
> > > >
> > > > What version of plugins are you running? And on what O/S?
> > > >
> > > > On Saturday 14 December 2002 02:29, you wrote:
> > > > > I did a configured them, made them, and a make install. Is there
> > > > > something I'm missing in there?
> > > > >
> > > > > -----Original Message-----
> > > > > From: Jasmine Chua [mailto:jasmine.chua at securecirt.com]
> > > > > Sent: Friday, December 13, 2002 12:27 PM
> > > > > To: nagios-users at lists.sourceforge.net
> > > > > Cc: Dan Spray
> > > > > Subject: Re: [Nagios-users] Problem with check_ftp and check_pop
> > > > >
> > > > > Looks like you dint compile your plugins properly.
> > > > >
> > > > > On Saturday 14 December 2002 02:08, Dan Spray wrote:
> > > > > > Hello all,
> > > > > >
> > > > > > I just started using check_ftp and check_pop for a couple of
> > > >
> > > > servers.
> > > >
> > > > > I
> > > > >
> > > > > > set it all up and Nagios seems to like my commands and all,
> > >
> > > however,
> > >
> > > > > > under Service Detail it says "(No output!) " so I said okay and
> > >
> > > ran
> > >
> > > > it
> > > >
> > > > > > from the command line, here is what I get:
> > > > > >
> > > > > > [root at NABU libexec]# ./check_ftp -H nabu
> > > > > > FTP OK - 0.001 second response time on port 21|time= 0.001
> > > > > > Segmentation fault
> > > > > >
> > > > > > Anyone have any ideas on this? Thanks inadvance,
> > > > > >
> > > > > > Dan
>
> - --
> Jasmine Chua
> Security Engineer, SecureCiRT (A SBU of Z-Vance Pte Ltd)
> http://www.securecirt.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE9+jVxNgvTa7Hj2AURAvVwAJsEUlEjxApVndROXg7g+QSHL5uWHQCgkY5T
> 2WVHRpsorDQoxjOLbY+F4fU=
> =al89
> -----END PGP SIGNATURE-----
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> With Great Power, Comes Great Responsibility
> Learn to use your power at OSDN's High Performance Computing Channel
> http://hpc.devchannel.org/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
>
-------------- next part --------------
execve("./check_ftp", ["./check_ftp", "-H", "ftp.uninett.no", "-v"], [/* 21 vars */]) = 0
uname({sys="Linux", node="nagios.xxxxxxxxxxxx.no", ...}) = 0
brk(0) = 0x804c3a4
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=24107, ...}) = 0
old_mmap(NULL, 24107, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/lib/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`:\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=89424, ...}) = 0
old_mmap(NULL, 84636, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000
mprotect(0x4002c000, 10908, PROT_NONE) = 0
old_mmap(0x4002c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12000) = 0x4002c000
old_mmap(0x4002d000, 6812, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4002d000
close(3) = 0
open("/lib/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\'\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=68925, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4002f000
old_mmap(NULL, 69408, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40030000
mprotect(0x4003e000, 12064, PROT_NONE) = 0
old_mmap(0x4003e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0x4003e000
old_mmap(0x4003f000, 7968, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4003f000
close(3) = 0
open("/lib/libssl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\221"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=211067, ...}) = 0
old_mmap(NULL, 182912, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40041000
mprotect(0x4006b000, 10880, PROT_NONE) = 0
old_mmap(0x4006b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2a000) = 0x4006b000
close(3) = 0
open("/lib/libcrypto.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340S\2"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=925227, ...}) = 0
old_mmap(NULL, 801888, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4006e000
mprotect(0x40123000, 60512, PROT_NONE) = 0
old_mmap(0x40123000, 49152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb4000) = 0x40123000
old_mmap(0x4012f000, 11360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4012f000
close(3) = 0
open("/lib/libutil.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\16\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=11174, ...}) = 0
old_mmap(NULL, 11080, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40132000
mprotect(0x40134000, 2888, PROT_NONE) = 0
old_mmap(0x40134000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x40134000
close(3) = 0
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0Pv\1B4\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1402035, ...}) = 0
old_mmap(0x42000000, 1264960, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x42000000
mprotect(0x4212c000, 36160, PROT_NONE) = 0
old_mmap(0x4212c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12c000) = 0x4212c000
old_mmap(0x42131000, 15680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42131000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\31"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=12102, ...}) = 0
old_mmap(NULL, 11640, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40135000
mprotect(0x40137000, 3448, PROT_NONE) = 0
old_mmap(0x40137000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x40137000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40138000
mprotect(0x4006e000, 741376, PROT_READ|PROT_WRITE) = 0
mprotect(0x4006e000, 741376, PROT_READ|PROT_EXEC) = 0
munmap(0x40014000, 24107) = 0
brk(0) = 0x804c3a4
brk(0x804c3d4) = 0x804c3d4
brk(0x804d000) = 0x804d000
rt_sigaction(SIGALRM, {0x8049ff4, [ALRM], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
alarm(10) = 0
gettimeofday({1039810077, 981001}, NULL) = 0
gettimeofday({1039810077, 981202}, NULL) = 0
getpid() = 25701
open("/etc/resolv.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
read(3, "nameserver 195.159.0.100\n", 4096) = 25
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40014000, 4096) = 0
uname({sys="Linux", node="nagios.xxxxxxxxxxxxxxxxx.no", ...}) = 0
socket(PF_UNIX, SOCK_STREAM, 0) = 3
connect(3, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1750, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1750
brk(0x804e000) = 0x804e000
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40014000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=24107, ...}) = 0
old_mmap(NULL, 24107, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\35\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=45415, ...}) = 0
old_mmap(NULL, 37848, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40139000
mprotect(0x40142000, 984, PROT_NONE) = 0
old_mmap(0x40142000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x40142000
close(3) = 0
munmap(0x40014000, 24107) = 0
open("/etc/host.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
read(3, "order hosts,bind\n", 4096) = 17
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40014000, 4096) = 0
open("/etc/hosts", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=175, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
read(3, "# Do not remove the following li"..., 4096) = 175
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40014000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=24107, ...}) = 0
old_mmap(NULL, 24107, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/lib/libnss_nisplus.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\33"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=46117, ...}) = 0
old_mmap(NULL, 41872, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40143000
mprotect(0x4014d000, 912, PROT_NONE) = 0
old_mmap(0x4014d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x4014d000
close(3) = 0
munmap(0x40014000, 24107) = 0
uname({sys="Linux", node="nagios.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.no", ...}) = 0
open("/var/nis/NIS_COLD_START", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/var/nis/NIS_COLD_START", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=24107, ...}) = 0
old_mmap(NULL, 24107, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/lib/libnss_dns.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\r\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=16051, ...}) = 0
old_mmap(NULL, 15912, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4014e000
mprotect(0x40151000, 3624, PROT_NONE) = 0
old_mmap(0x40151000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x40151000
close(3) = 0
munmap(0x40014000, 24107) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("195.159.0.100")}}, 28) = 0
send(3, "\242\253\1\0\0\1\0\0\0\0\0\0\3ftp\7uninett\2no\0\0\1\0"..., 32, 0) = 32
gettimeofday({1039810077, 994023}, NULL) = 0
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
recvfrom(3, "\242\253\201\200\0\1\0\2\0\4\0\4\3ftp\7uninett\2no\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("195.159.0.100")}}, [16]) = 216
close(3) = 0
open("/etc/protocols", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=5834, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
read(3, "# /etc/protocols:\n# $Id: protoco"..., 4096) = 4096
close(3) = 0
munmap(0x40014000, 4096) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
connect(3, {sin_family=AF_INET, sin_port=htons(21), sin_addr=inet_addr("158.36.2.10")}}, 16) = 0
send(3, "QUIT\r\n", 6, 0) = 6
close(3) = 0
gettimeofday({1039810078, 37786}, NULL) = 0
alarm(0) = 10
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
write(1, "FTP OK - 0.057 second response"..., 62) = 62
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
More information about the Users
mailing list