Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266678 - cups-1.3.10 breaks printing system-wide (?!)
Summary: cups-1.3.10 breaks printing system-wide (?!)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Printing Team
URL: http://cups.org/str.php?L3162
Whiteboard:
Keywords:
: 267093 268686 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-18 18:58 UTC by Matt
Modified: 2009-06-13 12:50 UTC (History)
14 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
my cupsd.conf (cupsd.conf,2.46 KB, text/plain)
2009-04-21 17:37 UTC, Alexandre Rostovtsev (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt 2009-04-18 18:58:10 UTC
after having emerge cups 1.3.10 (upgrade from 1.3.9*) I can't print with apps anymore (acroread, kpdf [qt3], gtk-apps):

e.g. in acroread the properties (printer settings dialog can't be opened)

other symptoms:
Job, Image Quality and Advanced tab in gtk-printer (e.g. in firefox) when trying to print a page doesn't exist

besides that the "Print" button is greyed out

hopefully this will be fixed during ebuild-updating

Reproducible: Always

Steps to Reproduce:
1. have a system running with cups 1.3.9*
2. upgrade to 1.3.10, etc-update
3. /etc/init.d/cupsd restart
4. printing doesn't work anymore
5. going back to 1.3.9 lets it work again



Expected Results:  
it should work in spite of the upgrade
Comment 1 Izad-Yar Daniel Rasheed 2009-04-18 21:16:01 UTC
I had some hiccups with CUPS 1.3.10 too, after upgrading from 1.3.9 (and also upgrading to the more modular poppler 0.10.6 from poppler 0.10.5).

Firefox won't print to a CUPS printer (the printer wasn't found at first; after a reboot, it found the printer, but the Print button was greyed out), but if I print-as-PDF and then open the PDF in Adobe Reader 9, it'll find the printer and print without trouble.

Connecting to the CUPS server using Firefox shows no printer problems (idle, accepting jobs.)

CUPS is fine -- I was able to print.  Firefox isn't seeing or allowing printing to CUPS though.  This may or not be related to the OP's bug.
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2009-04-19 03:20:11 UTC
This is apparently the result of the following new "feature" in cups-1.3.10:

http://www.cups.org/articles.php?L582
"The scheduler no longer looks up the local hostname by default; turn on hostname lookups to restore the previous behavior."

In other words, if you use the default cupsd.conf, with cups-1.3.10, ALL local printers will stop working - and apparently, that's by design!

In order to make printing work again, you need to add the following two lines to cupsd.conf:

# Unfuck cups-1.3.10 local printing
HostNameLookups On
Comment 3 Benjamin Schulz 2009-04-21 03:12:41 UTC
Thanks. Works now...
Comment 4 Izad-Yar Daniel Rasheed 2009-04-21 05:38:43 UTC
Confirmed fixed.  Thanks so much, Alexandre!
Comment 5 Timo Gurr (RETIRED) gentoo-dev 2009-04-21 13:08:24 UTC
Adding URL to upstream report, not considered a CUPS bug by upstream though.
Comment 6 Timo Gurr (RETIRED) gentoo-dev 2009-04-21 14:00:35 UTC
sed -i -e 's/localhost/\/var\/run\/cups\/cups.sock/g' /etc/cups/client.conf

will do the trick. We install that file cause of bug #196967 so it's probably our fault not CUPS. Please confirm that it also works for you so I can revbump CUPS with the fix later today.
Comment 7 Bernard Cafarelli gentoo-dev 2009-04-21 15:44:00 UTC
(In reply to comment #6)
Works here (after a firefox restart, the print option worked, without HostNameLookups option)
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2009-04-21 16:12:55 UTC
(In reply to comment #6)
> sed -i -e 's/localhost/\/var\/run\/cups\/cups.sock/g' /etc/cups/client.conf
> 
> will do the trick. We install that file cause of bug #196967 so it's probably
> our fault not CUPS. Please confirm that it also works for you so I can revbump
> CUPS with the fix later today.

Unfortunately, that doesn't seem to help here.

If I have "ServerName /var/run/cups/cups.sock" in client.conf but no "HostNameLookups On" in cupsd.conf, local printing still doesn't work. On the other hand, adding "HostNameLookups On" to cupsd.conf makes local printing work no matter whether I use "ServerName localhost" or "ServerName /var/run/cups/cups.sock" in client.conf.
Comment 9 Denis Dupeyron gentoo-dev 2009-04-21 17:23:27 UTC
(In reply to comment #8)
> Unfortunately, that doesn't seem to help here.

Have you restarted cupsd ?

Timo, it worked here too. Feel free to push this fix to cvs whenever you want.

Denis.
Comment 10 Alexandre Rostovtsev (RETIRED) gentoo-dev 2009-04-21 17:37:17 UTC
Created attachment 189075 [details]
my cupsd.conf

(In reply to comment #9)
> (In reply to comment #8)
> > Unfortunately, that doesn't seem to help here.
> 
> Have you restarted cupsd ?

Of course, I restart cupsd after every change to cupsd.conf or client.conf.

With the attached cupsd.conf, and with client.conf consisting of only 1 line

ServerName /var/run/cups/cups.sock

local printing with 1.3.10 does *not* work. Using "ServerName localhost" in client.conf results in identical non-working behavior. (Printing to a remote cups server works fine in both cases.)

Uncommenting "HostNameLookups On" in cupsd.conf makes local printing work again.
Comment 11 Roger 2009-04-21 21:26:06 UTC
ditto here.  The above sed fix only applies to clients and not the host/server (/etc/cups/cupsd.conf)

BTW, looks like the above sed fix is already used here within my /etc/cups/client.conf.  And, I'm only seeing certs/ within /var/run/cups!

Somethings amiss!
Comment 12 Alexandre Rostovtsev (RETIRED) gentoo-dev 2009-04-21 21:56:54 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Unfortunately, that doesn't seem to help here.
> 
> Have you restarted cupsd ?

I finally realized what I was doing wrong. When there is a change to client.conf, I need to restart the applications that use cups, instead of just restarting cupsd.

Basically, restart Gnome when you change client.conf - then the fix proposed in Comment #6 works, and "HostNameLookups" is not needed.

I apologize for wasting everyone's time.
Comment 13 Roger 2009-04-22 01:42:44 UTC
Oops.  My fault concerning comment #11 stating sed only works on
/var/run/cups.  Misread the sed incantation! :-/

I'm using XFCE4 here & logging out & relogging back in solved it. ;-)
Comment 14 Martin von Gagern 2009-04-22 16:08:27 UTC
(In reply to comment #6)
> Please confirm that it also works for you

Confirming.

> so I can revbump CUPS with the fix later today.

Yes, please use the socket by default. Thanks!

By the way, the corresponding report in the Gnome Bugzilla to address the malformed Host header is probably this one: http://bugzilla.gnome.org/429845
Comment 15 Gilles Dartiguelongue gentoo-dev 2009-04-22 22:18:13 UTC
*** Bug 267093 has been marked as a duplicate of this bug. ***
Comment 16 Yu Yuwei 2009-04-23 05:03:47 UTC
(In reply to comment #12)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > Unfortunately, that doesn't seem to help here.
> > 
> > Have you restarted cupsd ?
> 
> I finally realized what I was doing wrong. When there is a change to
> client.conf, I need to restart the applications that use cups, instead of just
> restarting cupsd.
> 
> Basically, restart Gnome when you change client.conf - then the fix proposed in
> Comment #6 works, and "HostNameLookups" is not needed.
> 
> I apologize for wasting everyone's time.
> 

The same thing happened here :)
only use the "sed", after restart cupsd and evince, I can print in evince then :D
Comment 17 Roger 2009-04-23 19:25:05 UTC
Funny.  I can no longer print from Firefox or Acroread.  But I can print a test page from the cups admin @ localhost:631.

Firefox only shows "print to file".

Acroread responds with "lp:Error - scheduler not responding!" 
Comment 18 Roger 2009-04-23 19:37:33 UTC
# cat /etc/cups/client.conf
ServerName /var/run/cups/cups.sock

# ls /var/run/cups/cups.sock
ls: cannot access /var/run/cups/cups.sock: No such file or directory


Solution:  Add the following line near to the top of the file /etc/cups/cupsd.conf

  Listen /var/run/cups/cups.sock

This is already listed within one of the original cupsd.conf files, however, due to configuration alterations, according to wiki & what not, it was removed?
Comment 19 Wim van Ravesteijn 2009-04-23 22:54:17 UTC
I keep getting problems, also after enabling host name lookups. Whenever I try to access cups via the hostname (http), I get a 400 error. Only when using the IP, things work. Problem appeared after upgrading from 1.3.9* to 1.3.10.
Cups runs on a server, I'm trying to access it from my workstation.

Below few lines from error_log. First 2 lines are caused by a request in my browser via http, the last 2 probably by cups running on my workstation.

W [24/Apr/2009:00:37:12 +0200] Request from "xxx.kuipnet.void" using invalid Host: field "cups.kuipnet.void:631"
W [24/Apr/2009:00:37:12 +0200] Request from "xxx.kuipnet.void" using invalid Host: field "cups.kuipnet.void:631"
W [24/Apr/2009:00:39:04 +0200] Request from "xxx.kuipnet.void" using invalid Host: field "cups.kuipnet.void"
W [24/Apr/2009:00:39:14 +0200] Request from "xxx.kuipnet.void" using invalid Host: field "cups.kuipnet.void"

Also, when client.conf on my workstation has the hostname, printer lists are empty, but as soon as I change it to the IP, things work again.

In cupsd.conf, I have:
ServerName cups.kuipnet.void
HostNameLookups On
Listen cups.kuipnet.void:631
Comment 20 subscryer 2009-04-24 14:29:40 UTC
(In reply to comment #19)
Ditto here, I confirm the behaviour.
Comment 21 Stefan Briesenick (RETIRED) gentoo-dev 2009-04-24 15:44:22 UTC
ok, I have a cups server running on my router. Works well again. But on my clients, I only setup client.conf with

> ServerName cupsserver

where cupsserver is resolvable via DNS. Worked until now. Now I have to use the IP address. Is there a solution also? I don't want to run the daemon on the clients and done want to use the IP directly either.
Comment 22 Timo Gurr (RETIRED) gentoo-dev 2009-04-25 13:14:48 UTC
I've committed -r1 to the tree fixing the problem not being able to locally print (by replacing localhost with the socket in client.conf). Please open a new bug if you encounter other/new problems.
Comment 23 Wim van Ravesteijn 2009-04-25 14:02:55 UTC
Looked a bit more into configuration manual and searched a bit more for info on
#19, and seems that if you add the following in cupsd.conf, things work
again as before:

ServerAlias *

This seems to be new compared to 1.3.9.
Comment 24 Remy Blank 2009-04-25 14:37:55 UTC
(In reply to comment #23)
> ServerAlias *

That did the trick. Thank you very much.
Comment 25 Matt 2009-05-01 11:07:26 UTC
>Solution:  Add the following line near to the top of the file
>/etc/cups/cupsd.conf
>
>  Listen /var/run/cups/cups.sock
>
>This is already listed within one of the original cupsd.conf files, however,
>due to configuration alterations, according to wiki & what not, it was removed?

this fixed it for me (also provided by the -r1 ebuild) 

thanks roger and Timo !
Comment 26 Timo Gurr (RETIRED) gentoo-dev 2009-05-05 11:45:48 UTC
*** Bug 268686 has been marked as a duplicate of this bug. ***
Comment 27 Francesco Lamonica 2009-05-12 17:31:19 UTC
(In reply to comment #23)

> ServerAlias *

restored my remote printing (use cups to print on two remote printers) with cups 1.3.10-r1
Comment 28 Alessandro Zigliani 2009-06-11 20:21:04 UTC
(In reply to comment #6)
> sed -i -e 's/localhost/\/var\/run\/cups\/cups.sock/g' /etc/cups/client.conf

Here the problem was as described in the first comment (1.3.9-r1 works, 1.3.10-r1 doesn't with the same config files). 
However, printing worked both in Acroread AND Openoffice(-bin) which displayed the printer while the other applications could not. 

I solved it by starting a new client.conf:
ServerName /var/run/cups/cups.sock

This is basically the same as comment #6, but somehow I missed it when I first read this bug report so I had to figure it out by myself. :-)

In my case, serverName with 1.3.9-r1 was the workstation's DNS name, and I believe this is what caused the trouble. 

Strangely enough, to put "HostNameLookups On" in cupsd.conf didn't work for me, neither with the fqdn nor with localhost. And /etc/hosts is ok, in case you wonder...
Comment 29 Bernd Raschke 2009-06-13 12:50:42 UTC
(In reply to comment #27)
> 
> > ServerAlias *
> 
> restored my remote printing (use cups to print on two remote printers) with
> cups 1.3.10-r1
> 

I have tried everything mentioned in this thread, in various configurations, and restarting my xfce4 session, but nothing works. Firefox-bin is still oblivious to my printers. Thunderbird-bin, OpenOffice-bin and evince all work fine. I even used ~amd64 to get cups-1.3.10-r2, but no printing in FF.

Any more tips?