server-error-service-unavailable in cups

[email protected] (bithead) Sat, 13 May 2006 08:51:16 +0000 (UTC)
Newsgroups gmane.linux.printing.general
Organization http://www.linuxprinting.org/
Message-ID <[email protected]>
I have seen many threads covering this subject, but none of them solved my
problem.  Here is the solution that worked for me.

I discovered that if used telnet
telnet 127.0.0.1 631
that cups responded, but if I used
telnet localhost 631
I got "connection refused".

I looked in /etc/hosts, and saw that it was empty!  I recently ran
yum -y update
which installed many packages, some one of which I am accusing of killing my
hosts file.

I reinserted the lines
127.0.0.1     localhost
127.0.0.1     localhost.localdomain


and cups started working again.

Hope this helps somebody.