Host sometimes Succeeds with Empty Output

Martin McCormick martin at
Fri Sep 14 14:48:59 UTC 2012

I needed to delete the CNAME record of After the deletion, the host command
would silently exit successfully as if this alias was still
there. I have seen this behavior a few times before but am not
sure what triggers it as one normally gets the usual "host not found" and host exits non zero.

	If I specifically command

host -tCNAME

I receive that there is no CNAME record named but host still exits as if successful
in finding it.

	There is a CNAME record
and this maybe has something to do with the unusual reply.

	I had a script that was using the return status of host
and it works great guns unless you run in to this situation in
which it thinks the alias still exists. This causes an infinite
loop because it is waiting for the lookup to fail which it
normally does as soon as the nsupdate command's results
propagate out in a very short time.

	I did check our zone for any other records for which, of course, would be an error
after having had a CNAME record of that name, but there wre

Thanks for any light you can shed on why host still thinks there
is something there.

Martin McCormick

More information about the bind-users mailing list