Description of problem: When I tried to run lpq or lpstat I get the error, "Unable to connect to server". When I run system-config-printer and try to print a test page it comes back with the error, "There was a problem sending CUPS test page to 'hp' queue: /usr/bin/lpr: No such file or directory". When I do a ls -l /usr/bin/lpr I get: $ ls -l /usr/bin/lpr lrwxrwxrwx 1 root root 23 Feb 7 2004 /usr/bin/lpr -> /etc/alternatives/print My rpm -q --last kernel returns this: kernel-2.6.16-1.2111_FC5 Fri 05 May 2006 10:34:25 PM EDT kernel-2.6.15-1.2054_FC5 Tue 21 Mar 2006 02:14:18 PM EST Version-Release number of selected component (if applicable): cups 1.2.0-1.1 How reproducible: Try to print Steps to Reproduce: 1. upgrade to cups 1.2.0-1.1 2. try to print a test page from system-config-printer Actual results: "There was a problem sending CUPS test page to 'hp' queue: /usr/bin/lpr: No such file or directory." Expected results: Test page should print Additional info: Printer is a Hewlett Packard DeskJet 812C, and the printer doesn't show up in other applications. Konqueror returns the error, "An error occurred while retrieving the printer list: Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: the IPP request failed for an unknown reason." "/sbin/service cups status" shows cups is running.
Created attachment 129788 [details] /var/log/cups/error_log
Thanks. There's some more information I need: 1. What's the history of this machine? Did it start out as a fresh FC5 install, or was it running FC4 before? 2. Have you installed any non-Fedora print drivers? 3. Does 'setenforce 0' (to turn off SELinux) make any difference? 4. Please run this command: strace /usr/bin/lpstat.cups -s 2>lpstat.log and attach the lpstat.log file that is created. Thanks!
1. This machine has been upgraded from FC4. 2. No non-Fedora print drivers are on my system. 3. No it doesn't.
Created attachment 129832 [details] lpstat.log 4. Here is the output of 'strace /usr/bin/lpstat.cups -s'
Looks like it's having trouble resolving 'localhost.localdomain'. What's in /etc/hosts?
$ cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 primary 127.0.0.1 localhost.localdomain According to 'ls -l' it's been like that for over a year.
You're missing 'localhost' from the end of the second 127.0.0.1 line. So adjust it like this: 127.0.0.1 primary 127.0.0.1 localhost.localdomain localhost Any idea why /etc/hosts is like it is?
Hmm, looking at the code, CUPS is meant to handle 'localhost' failures specially for just situations like this. Investigating.
Reported upstream: http://cups.org/str.php?L1723
I don't know why it's that way. It may have been set up like that when I installed Fedora. I don't think I changed it, but anything's possible. Anyway, adding 'localhost' to the end of the second line seems to have fixed it.
This test update should fix the problem: https://www.redhat.com/archives/fedora-test-list/2006-June/msg00081.html With it, your original /etc/hosts file should work without any CUPS problems.