Bug 501778 - Duplicate printer entry causes remainder of printers.conf to be ignored
Duplicate printer entry causes remainder of printers.conf to be ignored
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: cups (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2009-05-20 12:44 EDT by Jeremy Kindy
Modified: 2009-06-01 08:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-01 08:05:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeremy Kindy 2009-05-20 12:44:09 EDT
Description of problem:
Duplicate printer entry in printers.conf causes cups to stop reading printers.conf file and any entry below the duplicate entry is not loaded

Version-Release number of selected component (if applicable):
Version     : 1.1.22
Release     : 0.rc1.9.32.el4

How reproducible:

Steps to Reproduce:
1. Create a duplicate printer in printers.conf located above a printer that works and returns "ready" when queried with lpq -P printer_name.
2. Restart cups.
3. lpq -P printer_name
Actual results:
Printers defined below duplicate printer are not loaded.  Querying printer results in:

# lpq -P FSWPC2205BW
lpq: Unknown destination "FSWPC2205BW"! 

Expected results:
Printers defined below duplicate printer are loaded and available via cups.  Querying printer results in:

# lpq -P FSWPC2205BW
FSWPC2205BW is ready
no entries

Additional info:
This may have come about due to a bugfix in this advisory: RHBA-2009:0989-1

* printers in CUPS should have unique names. However, if a CUPS
configuration file somehow contained entries for more than one device
with the same name, the CUPS scheduler would create a segmentation
fault and crash while starting up. CUPS now includes code that examines
each printer while loading it from the configuration file. CUPS will not
attempt to load duplicate entries, but will log an error.

Our particular config contained printers that had different names case-wise: e.g. printer and PRINTER.  All entries after PRINTER (that weren't duplicates themselves) were not available for printing.  Also tested with exact duplicate names with the same results.

The following errors occurred in /var/log/cups/error_log:

E [20/May/2009:00:11:23 -0400] Duplicate printer on line 873 of printers.conf.

E [20/May/2009:00:11:15 -0400] LoadAllJobs: Unable to queue job for destination "http://machine.example.com:631/printers/printername"!
Comment 1 Tim Waugh 2009-06-01 08:05:01 EDT
Print queue names are not case-sensitive and so this configuration is invalid.

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