Re: getaddrinfo() starts failing with EAI_AGAIN. Libinfo-278 build fails: ../include/DSmemberdMIG.defs: No such file or directory
Re: getaddrinfo() starts failing with EAI_AGAIN. Libinfo-278 build fails: ../include/DSmemberdMIG.defs: No such file or directory
- Subject: Re: getaddrinfo() starts failing with EAI_AGAIN. Libinfo-278 build fails: ../include/DSmemberdMIG.defs: No such file or directory
- From: Peter Oberauer <email@hidden>
- Date: Sat, 17 May 2008 00:48:00 +0100
Thanks for the quick response, Paul
> 1. Use tcpdump to find out why your dns server is not on the net
I'm now running:
tcpdump -i en0 udp dst port 53 or udp src port 53
and have modified the child script to call:
host thehostname
nslookup thehostname
ping -c1 thehostname
svn thehostname
(where thehostname is an unqualified hostname of another machine on
the same subnet) with a "sleep 5s" between each to, help me match up
the commands and their traffic by time.
tcpdump displays:
- for host: requests and responses, and the command succeeds
- for nslookup: a request and response, and the command succeeds
- for ping and svn, however tcpdump is silent and the commands fail.
Is my tcpdump invocation correct - or is this expected?
Next I ping the same unqualified host name from an unrelated bash
shell, but as the same user, on the same machine:
ping works - (though tcpdump is silent - because getaddrinfo() has
cached the address?).
From that unrelated process, if I ping an imaginary hostname, tcpdump
does show the request and response, but only the first time per
hostname.
Next I tried inserting pings to imaginary hosts in the shell script,
to be called by the long-running process - these DNS lookups are also
not shown by tcpdump.
If my tcpdump invocation is correct, and there is only one ethernet
port (en0) and no wireless/alternative interfaces:
it looks like getaddrinfo() - under children of my long-running-
process - at some stage started failing with EAI_AGAIN before/without
sending a DNS lookup for either a previously used host *or* a unique
imaginary one.
So I'd still like to try and debug getaddrinfo() ...
> You may have a problem where a daemon starts and calls res_init
before /etc/resolv.conf is written properly
To clarify, my long running process was started by hand long after the
system booted, rather than on init, so I think that /etc/resolv.conf
would have been written properly already - unless something else
rewrites it periodically?
Thank you
Peter
BakBone Software Ltd
Registered in England and Wales, Company No. 3825597
Registered Office: 100 Longwater Avenue, Green Park, Reading, RG2 6GP,
United Kingdom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden