Thursday, May 29, 2014

Linux/Unix - the little things

If you are writing software which cares about the fully qualified domain name of the server; remember the correct order of /etc/hosts host/alias info.

i.e.
<ip address>  <fqdn> <alias1> <alias n>

If you swap the <fqdn> and an alias - the server will not report itself as <fqdn> and if you have software which expects/utilizes the domain info; it won't work.

I have run into this with scripts/batch jobs which broke mysteriously when trying to key off of what should be <fqdn> when looking up information - but only for one or a small set of servers.


No comments:

Post a Comment