From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Cohen, Andy" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: h22agent: Socket error Date: Thu, 27 Mar 2003 13:09:12 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <9D592DB37A92234AB635C5585D2D08193C4E4A@cobra.pc.cognex.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1048788581 30771 80.91.224.249 (27 Mar 2003 18:09:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2003 18:09:41 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Thu Mar 27 19:09:39 2003 Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18ybop-000803-00 for ; Thu, 27 Mar 2003 19:09:39 +0100 Original-Received: (qmail 8265 invoked by uid 5); 27 Mar 2003 18:09:34 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 8256 invoked by uid 49493); 27 Mar 2003 18:09:34 -0000 Original-Received: from Andy.Cohen@cognex.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-1.2/5.0):. Processed in 0.644974 secs); 27 Mar 2003 18:09:34 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (160.91.86.17) by 0 with SMTP; 27 Mar 2003 18:09:33 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HCF0003E6FRJ0@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 27 Mar 2003 13:09:32 -0500 (EST) Original-Received: from camcolo2-smrly1.gtei.net (camcolo2-smrly1.gtei.net [128.11.173.4]) by emroute2.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HCF00I8P6FNWR@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 27 Mar 2003 13:09:24 -0500 (EST) Original-Received: from cognex-cp.cognex.com (cognex-cp.cognex.com [198.232.30.75]) by camcolo2-smrly1.gtei.net (Postfix) with SMTP id B11BC32B24 for ; Thu, 27 Mar 2003 18:09:22 +0000 (GMT) Original-Received: from cognex-gw.cognex.com ([198.232.25.129]) by cognex-cp.cognex.com; Thu, 27 Mar 2003 13:09:21 -0500 (EST) Original-To: "Tru64-Unix-Managers \(E-mail\)" X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:3814 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3814 Thanks to Dr. Tom Blinn for the following which got me thinking in the right direction: ============================================================ The classic reason for an error in gethostbyaddr() (which has a man page, it's a standard C library function) is that the host address can not be found in the "hosts" database. It's a bit messier than that, but that's the usual cause. The man page doesn't tell you that the error codes are defined in /usr/include/netdb.h and if you go look in that file you'll see that an error code of 0 is defined as NETDB_SUCCESS with the comment "/* no problem */", so there may be a bug in the h22agent program's handling of the errors, or there may be a real error occurring and the reporting logic is wrong (see the man page to get a sense of how messy this is). Of the two, I'd bet that there's a bug in the h22agent code, but I have no idea where to find that code (that software isn't part of the Tru64 UNIX code base so it's not in any source pool repository to which I have access). In any case, I'm betting that something is trying to connect to the h22agent program and passing it an IP address it's supposed to use for some purpose, and the h22agent is attempting to back-translate the address to a host name, and the gethostbyaddr() lookup is not returning a name, and instead of just dealing with this, the h22agent thinks it needs to log a message. If you can figure out what host it is trying to backtranslate, you might be able to fix this problem by getting that host name entered into your BIND server. I'd bet it is the NT machine, especially if that system is supported by DHCP and the pool of IP addresses parcelled out by the DHCP server are not in your BIND service with names. If you know the NT system's IP address you can just try a good old UNIX command line "nslookup" giving it the IP address and see if it returns a name. "nslookup" uses good old gethostbyaddr() when you pass it an IP address, after all. ============================================================ I believe it's been solved now. I'm not sure exactly what fixed it but basically it was this: The pc running swcc was old and had not been changed to DHCP (which we went to about a year ago). The name of the pc was pc-name with a domain of company.com. It wasn't listed in any DNS table; i.e. I couldn't 'ping pc-name'. We reconfigured the pc to use DHCP, changed the domain to pc.company.com (which is what we use now for all pc's), rebooted and I haven't gotten any of those annoying messages since (oh yes and I changed the entry for the pc name in the agent and restarted it via swcc_config). NOTE: Sorry if I haven't explained the solution accurately -- somebody from the network grouped fixed it and I may not have gotten all the particulars correct. Basically I think the unix server tried to lookup up the name of the pc in a DNS and couldn't find an entry for it so produced the message. Peter Gergen also sent this: ============================================================ This happens when the password from the SWCC is given to the unix server. ============================================================ I was going to look into this next but I don't think I need to now. Thanks again everybody, Andy ORIGINAL QUESTION ================= Hi, I've got SWCC running on an NT machine attempting to manage an RA3000 unit on a DS20E running 4.0F. I keep getting these messages in my /var/adm/syslog.dated/current/daemon.log: Mar 25 19:02:50 odin h22agent[6340]: WARNING: Socket error - gethostbyaddr(): Error 0 occurred. (SP_SOCKET: socketAccept) Mar 25 19:32:53 odin h22agent[6340]: WARNING: Socket error - gethostbyaddr(): Error 0 occurred. (SP_SOCKET: socketAccept) every 30 minutes. I saw in the archives that somebody posted this question a couple of years ago but there was no reply. Anybody have an idea how to fix this? Thanks alot! Andy