Re: [Nagios-users] Re: Monitor DHCP Server []
> [Jason, Frank] > The second most obvious is that something else is already listening on that > port. I'd check that next." > [John P. Rouillard] > Well since most of the obvious causes are taken care of is anything > already bound to port 68? Check netstat That was it! # grep 68 /etc/services ... bootpc 68/tcp# Bootstrap Protocol Client bootpc 68/udp# Bootstrap Protocol Client ... # netstat -a | grep bootpc udp 0 0 *:bootpc After closing all bootpc connections (due to dhcp-client on some interfaces) it all worked fine :-) Thank you very much for your support --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Re: Monitor DHCP Server []
In message <[EMAIL PROTECTED]>, Rene Fertig writes: >Am Freitag, 21. April 2006 08:31 schrieb Melkiades: >> More info: >> NAGIOS: SuSE Linux 10 OSS (kernel 2.6.13-15.8-smp) && Nagios v2.1 >> DHCP: Win2003 + MS DHCP Server >> >I am running nagios on SuSE 10, too, and without problems like this. > >check_dhcp is set suid (by make install, AFAIR): > >ll check_dhcp >-rwsr-xr-x 1 root root 56032 Mar 20 15:16 check_dhcp > >./check_dhcp -s 192.168.130.200 >DHCP ok: Received 1 DHCPOFFER(s), 1 of 1 requested servers responded, max >lease time = 3600 sec. > >I don't know if that matters, but I have compiled nagios an the plugings >(still 1.4.2) by myself. I'm not using the rpm's comming with SuSE. > >Perhaps you have played with /etc/permissions? Check /var/log/messages if >there is any hint. Another idea. See if SE (security enhanced) linux is running. -- rouilj John Rouillard === My employers don't acknowledge my existence much less my opinions. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@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
RE: [Nagios-users] Re: Monitor DHCP Server []
There are several reasons to fail to bind a low numbered port. The most obvious is not having root privileges. If you running as root (regardless if the program is setuid root), that is not in play. The second most obvious is that something else is already listening on that port. I'd check that next. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Melkiades Sent: Friday, April 21, 2006 4:35 AM To: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] Re: Monitor DHCP Server [] > [Rene] > You're still in the compliation directory. check_dhcp is not set suid. > If you do "make install" it will be copied to the plugin directory > (usually /usr/local/nagios/libexec) and will get suid BUT as it seems > you're execute check_dhcp as root in the example above (according to > the '#'). This should work! Perhaps the problem isn't check_dhcp, but > there's missing something... > Please try to run check_dhcp directly as root without sudo. So, as root # rm /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp # rm /usr/local/nagios/libexec/check_dhcp # cd /opt/nagios/nagios-plugins-1.4.2/plugins/ # make check_dhcp gcc -g -O2 -L. -o check_dhcp check_dhcp.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lnsl -lresolv -I/usr/include # make install make[1]: Entering directory `/opt/nagios/nagios-plugins-1.4.2/plugins' mkdir -m 0755 -p -- /usr/local/nagios/libexec /usr/bin/install -c check_dhcp /usr/local/nagios/libexec/check_dhcp ... # ll /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp -rwxr-xr-x 1 root root 56028 Apr 21 11:26 check_dhcp # ll /usr/local/nagios/libexec/check_dhcp -rwxr-xr-x 1 root root 56028 Apr 21 11:26 check_dhcp # cd /usr/local/nagios/libexec # ./check_dhcp -s 10.1.2.97 -v DHCP socket: 3 Error: Could not bind to DHCP socket (port 68)! Check your privileges... :-( Thanks for your help, Rene --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 ___ Nagios-users mailing list Nagios-users@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 This message (including any attachments) may contain confidential or otherwise privileged information and is intended only for the individual(s) to which it is addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message or that arise as a result of e-mail transmission. If verification is required please request a hard-copy version from the sender. SOURCECORP, Incorporated www.srcp.com --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Re: Monitor DHCP Server []
> [Rene] > You're still in the compliation directory. check_dhcp is not set suid. > If you do "make install" it will be copied to the plugin directory > (usually /usr/local/nagios/libexec) and will get suid > BUT as it seems you're execute check_dhcp as root in the example above > (according to the '#'). This should work! Perhaps the problem isn't > check_dhcp, but there's missing something... > Please try to run check_dhcp directly as root without sudo. So, as root # rm /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp # rm /usr/local/nagios/libexec/check_dhcp # cd /opt/nagios/nagios-plugins-1.4.2/plugins/ # make check_dhcp gcc -g -O2 -L. -o check_dhcp check_dhcp.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lnsl -lresolv -I/usr/include # make install make[1]: Entering directory `/opt/nagios/nagios-plugins-1.4.2/plugins' mkdir -m 0755 -p -- /usr/local/nagios/libexec /usr/bin/install -c check_dhcp /usr/local/nagios/libexec/check_dhcp ... # ll /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp -rwxr-xr-x 1 root root 56028 Apr 21 11:26 check_dhcp # ll /usr/local/nagios/libexec/check_dhcp -rwxr-xr-x 1 root root 56028 Apr 21 11:26 check_dhcp # cd /usr/local/nagios/libexec # ./check_dhcp -s 10.1.2.97 -v DHCP socket: 3 Error: Could not bind to DHCP socket (port 68)! Check your privileges... :-( Thanks for your help, Rene --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 ___ Nagios-users mailing list Nagios-users@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
[Nagios-users] Re: Monitor DHCP Server []
Am Freitag, 21. April 2006 10:23 schrieb Melkiades: > # make check_dhcp > gcc -g -O2 -L. -o check_dhcp check_dhcp.o netutils.o utils.o > ../lib/libnagiosplug.a ../lib/libcoreutils.a -lnsl -lresolv -I/usr/include > > # ls -ls|grep dhcp > 56 -rwxr-xr-x 1 root root 56028 Apr 21 10:21 check_dhcp > 36 -rw-r--r-- 1 root root 34869 Jan 25 2005 check_dhcp.c > 32 -rw-r--r-- 1 root root 31540 Mar 14 14:57 check_dhcp.o > > # sudo /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp -s > my.dhcp.server -v DHCP socket: 3 > Error: Could not bind to DHCP socket (port 68)! Check your privileges... You're still in the compliation directory. check_dhcp is not set suid. If you do "make install" it will be copied to the plugin directory (usually /usr/local/nagios/libexec) and will get suid BUT as it seems you're execute check_dhcp as root in the example above (according to the '#'). This should work! Perhaps the problem isn't check_dhcp, but there's missing something... Please try to run check_dhcp directly as root without sudo. If this work, try chmod u+s check_dhcp and then run it as a normal user like su - rene cd /opt/nagios/nagios-plugins-1.4.2/plugins ./check_dhcp -s my.dhcp.server In the meantime I have compiled and updated to plugins 1.4.3. There are no problems with check_dhcp, execpt that make install didn't set the execution permissions for all users. So if nagios runs as user daemon one need to make chmod a+x check_dhcp Bye, Rene --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@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
[Nagios-users] Re: Monitor DHCP Server []
> [Rene] > I don't know if that matters, but I have compiled nagios an the plugings > (still 1.4.2) by myself. I'm not using the rpm's comming with SuSE. Hi, me too. I've installed from Nagio's tgz. # pwd /opt/nagios/nagios-plugins-1.4.2/plugins # ls -lsa | grep dhcp 56 -rwxr-xr-x 1 root root 56028 Mar 14 14:57 check_dhcp 36 -rw-r--r-- 1 root root 34869 Jan 25 2005 check_dhcp.c 32 -rw-r--r-- 1 root root 31540 Mar 14 14:57 check_dhcp.o # rm check_dhcp # make check_dhcp gcc -g -O2 -L. -o check_dhcp check_dhcp.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lnsl -lresolv -I/usr/include # ls -ls|grep dhcp 56 -rwxr-xr-x 1 root root 56028 Apr 21 10:21 check_dhcp 36 -rw-r--r-- 1 root root 34869 Jan 25 2005 check_dhcp.c 32 -rw-r--r-- 1 root root 31540 Mar 14 14:57 check_dhcp.o # sudo /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp -s my.dhcp.server -v DHCP socket: 3 Error: Could not bind to DHCP socket (port 68)! Check your privileges... --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 ___ Nagios-users mailing list Nagios-users@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
[Nagios-users] Re: Monitor DHCP Server []
Hi. Am Freitag, 21. April 2006 08:31 schrieb Melkiades: > More info: > NAGIOS: SuSE Linux 10 OSS (kernel 2.6.13-15.8-smp) && Nagios v2.1 > DHCP: Win2003 + MS DHCP Server > I am running nagios on SuSE 10, too, and without problems like this. check_dhcp is set suid (by make install, AFAIR): ll check_dhcp -rwsr-xr-x 1 root root 56032 Mar 20 15:16 check_dhcp ./check_dhcp -s 192.168.130.200 DHCP ok: Received 1 DHCPOFFER(s), 1 of 1 requested servers responded, max lease time = 3600 sec. I don't know if that matters, but I have compiled nagios an the plugings (still 1.4.2) by myself. I'm not using the rpm's comming with SuSE. Perhaps you have played with /etc/permissions? Check /var/log/messages if there is any hint. Bye, Rene --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@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