Comment 8 for bug 291161

Revision history for this message
Matt Keys (mk6032) wrote :

I ran into this error on a different (CentOS 6 x86_64) system. Simply executing "nslookup" would return the error "nslookup: parse of /etc/resolv.conf failed". Upon close inspection of the contents nothing was out of order. Permissions and ownership also looked good and I was executing nslookup as root. It was then I noticed lsattr /etc/resolv.conf was showing the "e" flag set.

The customer had copied resolv.conf over from a different server (also ext4 formatted). I believe it may be that this attribute was set on the previous filesystem, and when moved to the new ext4 file system the extent mappings were incorrect, which caused the read/parse problem. Since you can't remove the attribute with chattr I was able to resolve the issue by simply copying the contents, deleting the old /etc/resolv.conf, creating a new /etc/resolv.conf, then pasting in the contents from clipboard and saving.