From owner-freebsd-bugs Thu May 1 11:32:00 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA08389 for bugs-outgoing; Thu, 1 May 1997 11:32:00 -0700 (PDT) Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA08351 for ; Thu, 1 May 1997 11:31:49 -0700 (PDT) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id OAA22892; Thu, 1 May 1997 14:31:55 -0400 From: Bill Paul Message-Id: <199705011831.OAA22892@skynet.ctr.columbia.edu> Subject: Re: Problem To: bugs@freebsd.org, rls@mail.id.net Date: Thu, 1 May 1997 14:31:53 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >The problem: > In certain software packages, the gethostbyname call appears to fail. >The software: > (so far) sendmail, and harvest >The scenario: > Webserver - Approximately 100 virtual hosts. Running nothing but YP > client, webservices, and sendmail with client (forward) configuration. You left something out: >Sendmail complains: >=================== >... >May 1 08:43:33 www001 sendmail[4405]: gethostbyaddr() failed for 199.125.2.95 >May 1 08:43:33 www001 sendmail[4405]: gethostbyaddr() failed for 199.125.2.96 >May 1 08:43:33 www001 sendmail[4405]: gethostbyaddr() failed for 199.125.2.97 >May 1 08:43:33 www001 sendmail[4405]: gethostbyaddr() failed for 199.125.2.98 >May 1 08:43:33 www001 sendmail[4405]: gethostbyaddr() failed for 199.125.2.99 There's a reason it's complaining: there IP addresses are not registered with the DNS: Server: sirius.ctr.columbia.edu Address: 128.59.64.60 *** sirius.ctr.columbia.edu can't find 199.125.2.95: Non-existent host/domain *** sirius.ctr.columbia.edu can't find 199.125.2.96: Non-existent host/domain *** sirius.ctr.columbia.edu can't find 199.125.2.97: Non-existent host/domain *** sirius.ctr.columbia.edu can't find 199.125.2.98: Non-existent host/domain Sendmail normally tries to do DNS lookups directly unless you tweak its config file a little. Consequently, it may go out and query BIND regardless of what /etc/host.conf says. (It may also talk to NIS, if you compile sendmail with NIS support enabled.) The correct thing do to here is to register these IP addresses correctly. If you want to fake out sendmail, you need to first set it up so that it doesn't do its own DNS queries (the flag in the older config file format was OI; OITrue would force on DNS requests), then change /etc/host.conf so that 'hosts' and/or 'nis' come before 'bind.' Then add entries to /etc/hosts and to your NIS hosts maps for these addresses (they won't be 'legal' of course, but sendmail won't know that.) You did not say whether or not you had entries for these addresses in your NIS hosts maps already, so I don't know if this is something you've already thought to try. >Harvest complains: >================== >broker: 970430 23:43:07: select returned: 1 >broker: 970430 23:43:07: host_cache: get_host (199.125.2.24) >broker: 970430 23:43:07: getfullhostname: gethostbyname(www001.id.net) returned >NULL. >broker: 970430 23:43:07: host_cache: get_host (www001.id.net) >broker: 970430 23:43:07: host_cache: hash index = 425 >broker: 970430 23:43:07: new_host: Adding www001.id.net >broker: 970430 23:43:07: xmalloc: Allocated 14 bytes for 0x75a530. >broker: 970430 23:43:07: new_host: gethostbyname(www001.id.net) failed. >broker: 970430 23:43:07: new_host: www001.id.net: unknown host >broker: 970430 23:43:07: xfree: Deallocating space for 0x75a530 >broker: 970430 23:43:07: Can't get my own host info!? Hm. I'm not exactly sure what's happening here. Lemme see: [/homes/rwpaul]:sirius{123}# nslookup www001.id.net Server: sirius.ctr.columbia.edu Address: 128.59.64.60 Non-authoritative answer: Name: www001.id.net Address: 199.125.2.11 Okay. Now what about the reverse lookup: [/homes/rwpaul]:sirius{124}# nslookup 199.125.2.11 Server: sirius.ctr.columbia.edu Address: 128.59.64.60 Name: webserver.id.net Address: 199.125.2.11 Hm. There may be a problem here because the A and PTR records don't agree, but I'm not certain of that. You might try checking /var/adm/messages for any incriminating log messages. If that doesn't work, post more details about your NIS/DNS/hosts setup; it's hard to make an educated guess without more information. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" =============================================================================