Bug 497393

Summary: "::1" not acceptable Host: value
Product: [Fedora] Fedora Reporter: Vladimir Kotal <vlada>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 10CC: cedric.olivier, peher80, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.3.10-5.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-12 03:53:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of openoffice print window
none
/va/log/cups/error_log which contains pre-update and post-update logs
none
stderr from lpstat -s
none
system-config-printer screenshot displaing the error
none
strace output on system-config-printer
none
cupsd.conf.default which fixed the problem
none
cupsd.conf which exhibited the problem
none
strace output on gedit (the failing case with greyed out Print button)
none
env(1) output none

Description Vladimir Kotal 2009-04-23 17:42:00 UTC
Created attachment 340975 [details]
screenshot of openoffice print window

Description of problem:

Yesterday there was a bunch of cups related RPM upgrades. After those were
installed, printing on my USB connected iP4200 stopped working.

Version-Release number of selected component (if applicable):
cups-1.3.10-1.fc10.i386
cups-libs-1.3.10-1.fc10.i386
libgnomecups-0.2.3-4.fc10.i386
hal-cups-utils-0.6.19-1.fc10.i386
cupsddk-drivers-1.2.3-5.fc10.i386

How reproducible:
try to print from any application

Steps to Reproduce:
1. try to print from Firefox, OpenOffice, etc.
  
Actual results:
cannot hit the 'Print' button, it's greyed out

Expected results:
should be able to print

Additional info:

Comment 1 Tim Waugh 2009-04-23 18:59:37 UTC
Are your clients using hostnames to refer to the CUPS server other than those that the CUPS server would associate with the IP addresses for its network interfaces?

In other words, if you add 'ServerAlias hostname' to /etc/cups/cupsd.conf for each hostname by which the CUPS server is referenced by the clients, and restart cups, does that fix the problem?

Comment 2 Vladimir Kotal 2009-04-23 22:36:07 UTC
Actually, I don't care about the local clients right now, it's the local printing which does not work.

Anyway, here is /etc/cups/cupsd.conf:

LogFilePerm 0600
MaxLogSize 2000000000
LogLevel info
Printcap /etc/printcap
<Location />
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  AuthType Basic
  AuthClass System
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /printers/printer2>
  Order Deny,Allow
  Deny From All
  Allow From 127.0.0.1
  Allow From 10.0.1.50
  AuthType None
</Location>
<Location /printers/iP4200>
  Order Deny,Allow
  Deny From All
  Allow From 127.0.0.1
  AuthType None
</Location>
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
# (Change '@LOCAL' to 'ALL' if using directed broadcasts from another subnet.)
BrowseAllow @LOCAL
BrowseAddress @LOCAL
BrowseProtocols cups
# Allow remote access
Port 631
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow @LOCAL
</Location>

Comment 3 Vladimir Kotal 2009-04-23 22:38:19 UTC
Another interesting observation which could help - in system-config-printer (1.0.16) when I right-click on the printer and select Properties it reports an error 'server-error-service-unavailable'.

Comment 4 Vladimir Kotal 2009-04-23 22:40:11 UTC
Also, I am using the following RPMs (downloaded from canon.com I think) for printer drivers:

cnijfilter-common-2.60-1.i386
cnijfilter-ip4200-2.60-1.i386
cnijfilter-ip4200-lprng-2.60-1.i386

Comment 5 Vladimir Kotal 2009-04-23 22:46:20 UTC
I am attaching /var/cups/error_log which could contain some clues. Given the RPM updates were done yesterday (22nd) and around that time the following started to appear in the log it could be related:

W [23/Apr/2009:19:24:05 +0200] Request from "localhost" using invalid Host: fiel
d "::1"

Comment 6 Vladimir Kotal 2009-04-23 22:48:40 UTC
Created attachment 341032 [details]
/va/log/cups/error_log which contains pre-update and post-update logs

This entry is highly suspicious:

W [23/Apr/2009:19:24:05 +0200] Request from "localhost" using invalid Host: fiel
d "::1"

Comment 7 Vladimir Kotal 2009-04-23 22:49:36 UTC
Here's 'ifconfig -a' output:

eth1      Link encap:Ethernet  HWaddr 00:1F:D0:AC:D5:89  
          inet addr:10.0.1.131  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21f:d0ff:feac:d589/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:201347 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212587 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:167453703 (159.6 MiB)  TX bytes:154778332 (147.6 MiB)
          Interrupt:18 Base address:0xa000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:73581 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73581 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:14948633 (14.2 MiB)  TX bytes:14948633 (14.2 MiB)

pan0      Link encap:Ethernet  HWaddr EE:20:65:74:3E:3E  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Comment 8 Tim Waugh 2009-04-24 09:25:07 UTC
Please run this:

strace -s1000 lpstat -s 2>lpstat.txt

and attach lpstat.txt.  Thanks.

Comment 9 Vladimir Kotal 2009-04-24 16:34:11 UTC
This was the output to stdout. Stderr is attached.

$ strace -s1000 lpstat -s 2>lpstat.txt
system default destination: printer2
device for iP4200: ipp://10.0.1.50/printers/iP4200
device for printer2: usb://Canon/iP4200
$

Comment 10 Vladimir Kotal 2009-04-24 16:34:59 UTC
Created attachment 341207 [details]
stderr from lpstat -s

Comment 11 Vladimir Kotal 2009-04-24 16:39:02 UTC
Also, this is output from lpq:

$ lpq
printer2 is ready
no entries
$

Comment 12 Vladimir Kotal 2009-04-24 16:41:59 UTC
I have just tried 'lpr /etc/group' and it printed the file just fine:

$ lpq
printer2 is ready and printing
Rank    Owner   Job     File(s)                         Total Size
active  techie  373     group                           1024 bytes
$

This seems to be specific to Gnome applications. Firefox even reported 
(in the Print dialog window) that the printer 'printer2' is on-line during 
the period in which /etc/group was printed. However, the 'Print' button
was still greyed out.

Comment 13 Vladimir Kotal 2009-04-24 16:46:59 UTC
Created attachment 341214 [details]
system-config-printer screenshot displaing the error

Comment 14 Vladimir Kotal 2009-04-24 16:48:35 UTC
I have started system-config-printer again and right-clicked on the default printer 'printer2' which displayed the 'server-error-service-unavailable' error.

Before I clicked (and the error was displayed) I have started observing via strace, output is attached.

Comment 15 Vladimir Kotal 2009-04-24 16:50:46 UTC
Created attachment 341217 [details]
strace output on system-config-printer

Comment 16 Tim Waugh 2009-04-24 17:01:17 UTC
The '-s1000' is really important in trying to work this out.

Please do this:

strace -s1000 gedit 2>gedit.txt

then Control-P to print, and select a printer where the Print button is greyed out.  Then Control-C the strace to stop it, and attach the gedit.txt file here.

Also, could you attach the output of 'env'?  Thanks.

Comment 17 Vladimir Kotal 2009-04-24 17:09:18 UTC
I have replaced /etc/cups/cupsd.conf with /etc/cups/cupsd.conf.default (attached) which came with the RPM update since it was dated 21st April and I am able to print again.

So, something must have changed because till the update my configuration worked.

For the sake of root causing this I will revert the config and try the gedit thing.

Comment 18 Vladimir Kotal 2009-04-24 17:10:19 UTC
Created attachment 341218 [details]
cupsd.conf.default which fixed the problem

Comment 19 Tim Waugh 2009-04-24 17:11:37 UTC
Thank you.  More useful is the cupsd.conf which caused the problem if you are able to attach that.

Comment 20 Vladimir Kotal 2009-04-24 17:18:56 UTC
It's cut-n-pasted into one of the previous comments but I will attach anyway.

Comment 21 Vladimir Kotal 2009-04-24 17:19:44 UTC
Created attachment 341221 [details]
cupsd.conf which exhibited the problem

Comment 22 Vladimir Kotal 2009-04-24 17:24:21 UTC
Created attachment 341224 [details]
strace output on gedit (the failing case with greyed out Print button)

strace output from gedit as requested

Comment 23 Vladimir Kotal 2009-04-24 17:28:04 UTC
Note that the gedit strace output is rather long (35MB uncompressed). It contains interesting snippets when something is trying to connect(2) to the IPP port using AF_INET6 family:

connect(19, {sa_family=AF_INET6, sin6_port=htons(631), inet_pton(AF_INET6, "::1"
, &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operatio
n now in progress)

Comment 24 Vladimir Kotal 2009-04-24 17:29:22 UTC
Created attachment 341227 [details]
env(1) output

Comment 25 Vladimir Kotal 2009-04-24 17:54:56 UTC
I have added the following two lines to the non-functional cupsd.conf and it started working:

Listen localhost:631
Listen /var/run/cups/cups.sock

Comment 26 Tim Waugh 2009-04-25 22:06:22 UTC
Can you please attach /etc/cups/client.conf?  Thanks.

Comment 27 Vladimir Kotal 2009-04-26 09:47:00 UTC
/etc/cups/client.conf exists but is empty:

$ LANG=en ls -ald /etc/cups/client.conf 
-rw-r--r-- 1 root lp 0 Apr 21 14:57 /etc/cups/client.conf

The date of the file seems to match the RPM update which caused the trouble.

Comment 28 Cédric OLIVIER 2009-04-26 10:21:12 UTC
I have got the same problems with another printer : Samsung CLP 310 using foo2qpl drivers.

What can I do to help you ?

Comment 29 Tim Waugh 2009-04-26 12:38:14 UTC
Reported upstream with patch.

Comment 30 Fedora Update System 2009-04-26 12:51:34 UTC
cups-1.3.10-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/cups-1.3.10-2.fc9

Comment 31 Fedora Update System 2009-04-26 12:52:25 UTC
cups-1.3.10-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/cups-1.3.10-2.fc10

Comment 32 Fedora Update System 2009-04-27 21:39:49 UTC
cups-1.3.10-4.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update cups'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-4052

Comment 33 Fedora Update System 2009-04-27 21:40:21 UTC
cups-1.3.10-4.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-4056

Comment 34 Patrick 2009-05-02 18:53:02 UTC
I had the same problem
I installed the update from the testing repo and it solved it.

Thank you

Comment 35 Fedora Update System 2009-05-09 04:05:24 UTC
cups-1.3.10-5.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-4056

Comment 36 Fedora Update System 2009-05-09 04:14:37 UTC
cups-1.3.10-5.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update cups'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-4052

Comment 37 Cédric OLIVIER 2009-05-11 05:29:12 UTC
It's solved it for me too on fc10

Comment 38 Fedora Update System 2009-05-12 03:53:32 UTC
cups-1.3.10-5.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 39 Fedora Update System 2009-05-12 04:03:47 UTC
cups-1.3.10-5.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.