Bug 192628 - 'Unable to connect to server' but CUPS is running
'Unable to connect to server' but CUPS is running
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On: 192930
Blocks: FC6Target
  Show dependency treegraph
 
Reported: 2006-05-21 19:45 EDT by euphgeek
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 1.2.1-1.7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-20 05:45:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/cups/error_log (10.22 KB, text/plain)
2006-05-21 19:45 EDT, euphgeek
no flags Details
lpstat.log (14.78 KB, text/plain)
2006-05-22 18:08 EDT, euphgeek
no flags Details

  None (edit)
Description euphgeek 2006-05-21 19:45:35 EDT
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.
Comment 1 euphgeek 2006-05-21 19:45:35 EDT
Created attachment 129788 [details]
/var/log/cups/error_log
Comment 2 Tim Waugh 2006-05-22 05:27:02 EDT
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!
Comment 3 euphgeek 2006-05-22 18:04:49 EDT
1. This machine has been upgraded from FC4.

2. No non-Fedora print drivers are on my system.

3. No it doesn't.
Comment 4 euphgeek 2006-05-22 18:08:40 EDT
Created attachment 129832 [details]
lpstat.log

4. Here is the output of 'strace /usr/bin/lpstat.cups -s'
Comment 5 Tim Waugh 2006-05-23 04:19:01 EDT
Looks like it's having trouble resolving 'localhost.localdomain'.

What's in /etc/hosts?
Comment 6 euphgeek 2006-05-23 21:19:12 EDT
$ 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.
Comment 7 Tim Waugh 2006-05-24 04:15:06 EDT
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?
Comment 8 Tim Waugh 2006-05-24 04:21:21 EDT
Hmm, looking at the code, CUPS is meant to handle 'localhost' failures specially
for just situations like this.  Investigating.
Comment 9 Tim Waugh 2006-05-24 12:13:43 EDT
Reported upstream:

  http://cups.org/str.php?L1723
Comment 10 euphgeek 2006-05-24 21:22:21 EDT
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.
Comment 11 Tim Waugh 2006-06-08 06:50:17 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.