Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strange gethostsbyname error...



The quesry should be a local query since it should read /etc/hosts and 
succeed. By bracketing the call you effectively reset the query. It's a 
stab in the dark. 
Also, you might write a separate test program to simulate the traffic. 

Gerring the value of h_errno is certainly very important. There may also be 
a bug in the netdb set of functions. 
On 18 Jun 2002 at 14:51, Frank Ramsay wrote:

> the gethostbyname call starts to fail about a 1/2 hour after the server 
> software is taken down for the night.  I got the client to agree to let me 
> test with it for the day so we're running one right now with h_errno being 
> printed out via hstrerror but it's going to be about 20 minutes until it 
> starts to fail.
> 
> Now could this have anything to do with the TCP socket being open on one 
> system and closed on the other?  Or when the socket times out?  I'm asking 
> because currently there is still a socket connection on the Linux box from 
> when the server code was up and running on the AS/400.
> 
> When it looses the connection to the server it runs this procedure every two 
> or three seconds:
> {
> gethostbyname
> 
> socket(AF_INET...)
> setsocketopt(...SO_SNDBUF...)
> setsocketopt(...SO_RCVBUF...)
> 
> connect
> setsocketopt(...SO_REUSEADDR...)
> setsocketopt(...SO_KEEPALIVE...)
> 
> send handshake message
> }
> but as I said, after about a 1/2 hour gethostbyname starts to fail.
> 
> 
> >From: "Jerry Feldman" <gerald.feldman at hp.com>
> >To: discuss at blu.org
> >Subject: Re: strange gethostsbyname error...
> >Date: Tue, 18 Jun 2002 10:21:39 -0400
> >
> >How often does this occur? Does this occur every day?
> >Again, without having any additional analysis, if it occurs several times a
> >day, then bracketing the gethostbyname() function might help, since it
> >effectively opens the local host database.
> >On 18 Jun 2002 at 14:03, Frank Ramsay wrote:
> >
> > >
> > > typoe on my part.  it says files.  (hard to concentrate with the client
> > > walking in every five minutes asking if it's fixed yet.
> >
> >--
> >Jerry Feldman
> >Enterprise Systems Group
> >Hewlett-Packard Company
> >200 Forest Street MRO1-3/F1
> >Marlboro, Ma. 01752
> >508-467-4315 http://www.testdrive.compaq.com/linux/
> >
> >_______________________________________________
> >Discuss mailing list
> >Discuss at blu.org
> >http://www.blu.org/mailman/listinfo/discuss
> 
> 
> 
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 


--
Jerry Feldman <gaf at blu.org>
Associate Director
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org