Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 192628 - 'Unable to connect to server' but CUPS is running
Summary: 'Unable to connect to server' but CUPS is running
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 5
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On: 192930
Blocks: FC6Target
TreeView+ depends on / blocked
 
Reported: 2006-05-21 23:45 UTC by euphgeek
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 1.2.1-1.7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-06-20 09:45:43 UTC


Attachments (Terms of Use)
/var/log/cups/error_log (deleted)
2006-05-21 23:45 UTC, euphgeek
no flags Details
lpstat.log (deleted)
2006-05-22 22:08 UTC, euphgeek
no flags Details

Description euphgeek 2006-05-21 23:45:35 UTC
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 23:45:35 UTC
Created attachment 129788 [details]
/var/log/cups/error_log

Comment 2 Tim Waugh 2006-05-22 09:27:02 UTC
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 22:04:49 UTC
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 22:08:40 UTC
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 08:19:01 UTC
Looks like it's having trouble resolving 'localhost.localdomain'.

What's in /etc/hosts?

Comment 6 euphgeek 2006-05-24 01:19:12 UTC
$ 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 08:15:06 UTC
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 08:21:21 UTC
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 16:13:43 UTC
Reported upstream:

  http://cups.org/str.php?L1723

Comment 10 euphgeek 2006-05-25 01:22:21 UTC
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 10:50:17 UTC
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.