I have seen this error in my Apache 2 logs on my Debian server for a while, and I found the solution:
Symptoms: the Apache 2 error.log file (usually /var/log/apache2/error.log) shows a somewhat constant flow of errors which simply state “Invalid query name 1″.
Cause: The error is caused by a bug in the host util that is used for IP and DNS lookups.
Solution: Replace the default host utility with the Bind9 host util, easily done with APT:
apt-get remove hostapt-get install bind9-host
On some systems the removal of the original host utility also removes the dnsutils package, which can easliy be reinstalled with the command:
apt-get install dnsutils