AW: Cannot map "tcp" to protocol number

Jason Signalness jason at btiadmin.net
Tue Nov 2 16:24:52 CET 2004


Success!!  Thank you, Andreas.  When you mentioned that your 
getprotobyname does not open ldap.secrets, it hit me.  We use LDAP as a 
name service for hosts, and the nsswitch.conf  specified (probably by 
default, I just never noticed until now) that LDAP should be referenced 
for protocols.

In my nsswitch.conf, I commented out the existing entry and replaced it 
with the uncommented one below, and it worked immediately:

#protocols:  ldap [NOTFOUND=return] files
protocols:  files

Thanks everyone for your help.  It's greatly appreciated.

-Jason


Andreas Ericsson wrote:

> Jason Signalness wrote:
>
>> Hello again,
>>
>> Thanks for the tip.  Unfortunately, I don't see any reference to the 
>> protocols file when I do an strace on an execution of check_httpd.  
>> The only problems I see opening files are attempts to open a file 
>> called /etc/ld.so.preload and a file called /etc/ldap.secret.
>>
>> Andreas suggested that, at this point, I rebuild my glibc libraries.  
>> That sounds rather risky, and I haven't noticed any other problems on 
>> this system.  I'm not convinced this is a Nagios problem, but isn't 
>> messing with glibc risky on a production system?
>>
>
> Indeed, but having a flawed one might be even worse.
> The getprotobyname(3) manpage clearly state that it should use 
> /etc/protocols for returning a protocol entry matching the supplied 
> name. If yours doesn't, it's most likely broken or at some point 
> decides not to use the protocols file. My getprotobyname(3) doesn't 
> look for ldap.secrets, for instance. Perhaps libldap provides a 
> getprotobyname as well? That could be an issue.
>




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
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