This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2213528 - Samba printing to a CUPS driverless queue fails (everywhere driver works)
Summary: Samba printing to a CUPS driverless queue fails (everywhere driver works)
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: cups-filters
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Dohnal
QA Contact: Petr Dancak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-08 12:17 UTC by Rik Theys
Modified: 2023-09-21 18:35 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-21 18:35:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
log on the upstream cups server (10.60 KB, text/plain)
2023-06-08 12:17 UTC, Rik Theys
no flags Details
PPD used on upstream print server (15.56 KB, text/plain)
2023-06-08 12:18 UTC, Rik Theys
no flags Details
PPD generated by everywhere driver (9.84 KB, text/plain)
2023-06-08 12:18 UTC, Rik Theys
no flags Details
PPD file generated by cups-browsed (driverless driver) (11.81 KB, text/plain)
2023-06-08 12:19 UTC, Rik Theys
no flags Details
Logs as requested (1.48 MB, application/zip)
2023-06-09 14:01 UTC, Rik Theys
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-6518 0 None Migrated None 2023-09-21 18:34:15 UTC
Red Hat Issue Tracker RHELPLAN-159287 0 None None None 2023-06-08 12:19:44 UTC

Description Rik Theys 2023-06-08 12:17:54 UTC
Created attachment 1969772 [details]
log on the upstream cups server

Description of problem:

We have a CUPS print server that has a printer queue using a PPD for a specific queue.

Our clients are in a different subnet and use cups-browsed to poll this print server.

On EL8, this resulted in cups-browsed generating a PPD file similar to the PPD on the print server. On EL9, the generated PPD file on the client uses the 'driverless' driver.

The EL9 client is also a samba server that shares those (remote) printers with windows clients. This no longer works correctly after upgrading to EL9.

When a Windows user prints a job to the printer shared by samba, it fails to print.

When we look at the job file in the queue on the upstream CUPS server, it seems the EL9 client has indicated that the document type is application/pdf. This results in the print server trying to parse the PDF file but this fails as the submitted document is not a PDF, but PJL from the windows client.

As a test, I've created a local queue on the EL9 client that uses the "everywhere" for the IPP printer on the upstream print server. This generates a PPD file using the ippeve (IPP everywhere) driver. When a windows client prints a job to this queue, it works. Looking at the job file on the upstream print server, the document-format is set to application/vnd.cups-raw.

So it seems that when the driverless driver is used, all documents that are sent to the upstream CUPS server have application/pdf as their document type even if the file is not a PDF. The everywhere driver seems to have this set to vnd.cups-raw

Attached you can find the PPD files used on the upstream print server (ulsysgrp-upstream.ppd), the one generated by cups-browsed (ulsysgrp-drvless.ppd), and the one generated by creating a manual queue using the everywhere driver (ulsysgrp-everywhere.ppd).

I've also attached the cups error log from the upstream CUPS server when a job is submitted to the driverless queue.

Version-Release number of selected component (if applicable):
cups-filters-1.28.7-11.el9_2.1.x86_64


Steps to Reproduce:
1. Set up a CUPS print server and share a printer
2. Set up a CUPS client (in a different subnet) that browsepolls the print server using cups-browsed. Verify that the generated PPD uses the drvless driver.
3. On the CUPS client from step 2, set up samba to share the printer to windows clients
4. On a windows client, install a driver for the printer and print a document to the queue on the samba server

Actual results:
The job is transmitted from the CUPS client to the CUPS server with the document type set to application/pdf. The document fails to print as it can not be parsed by the upstream CUPS server as PDF.

Expected results:
The job is transmitted as "vnd.cups-raw" similar to how the everywhere driver does it. The upstream CUPS server will send the job to the printer unchanged and the document prints.

Additional info:

Comment 1 Rik Theys 2023-06-08 12:18:23 UTC
Created attachment 1969773 [details]
PPD used on upstream print server

Comment 2 Rik Theys 2023-06-08 12:18:44 UTC
Created attachment 1969774 [details]
PPD generated by everywhere driver

Comment 3 Rik Theys 2023-06-08 12:19:06 UTC
Created attachment 1969775 [details]
PPD file generated by cups-browsed (driverless driver)

Comment 4 Zdenek Dohnal 2023-06-09 07:24:41 UTC
Hi!

Thank you for taking the time to report this issue to us. We appreciate the feedback and use reports such as this one to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to guarantee the timeliness or suitability of a resolution.

If this issue is critical or in any way time sensitive, please raise a ticket through the regular Red Hat support channels to ensure it receives the proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please visit:
    https://access.redhat.com/support

To increase chance a fix for an issue in Red Hat Enterprise Linux or CentOS Stream is included, consider contributing to CentOS Stream. Red Hat engineers will review your issue based on the following steps:
    https://docs.centos.org/en-US/stream-contrib/quickstart/#_1_file_a_bugzilla
and if agreed the change meets criteria for being included, you can create a merge request for the selected component at:
    https://gitlab.com/redhat/centos-stream
referencing this issue. Red Hat engineers will review your merge request and consider merging it if the code passes a review and further testing.


Upstream server has CUPS 2.2.10 - it is not a version which is in any RHEL - what OS is it? Or did you install a new CUPS version by yourself?

Next, it would be great if you provided the file which is sent to RHEL 9 machine from Windows - it is located in /var/spool/cups, its name starts with 'd' and then continues job id and then sequence number of the file in the job, f.e.:

You send one file for printing, CUPS gives it job number 18, so the 'd' filename will be 'd00018-001'.

Next, it would be great if you got couple of logs from RHEL 9 client and upstream server when you print from Windows:

- one couple of logs (one from RHEL 9 and one from upstream server) when you print a specific file via everywhere queue from Windows,
- one couple of logs (one from RHEL 9, one from upstream server) when you print the same file via driverless (generated by cups-browsed) queue from Windows.

You can set debug logging by:

$ cupsctl LogLevel=debug2

and then turn it off (once you're done collecting logs) by "cupsctl LogLevel=warn".

The key is that one couple of logs represents one printing from Windows, so I can follow the flow via logs, and both couples represents two different print jobs, but both will print the same file.

Comment 5 Rik Theys 2023-06-09 14:01:30 UTC
Created attachment 1969939 [details]
Logs as requested

Comment 6 Rik Theys 2023-06-09 14:10:24 UTC
Hi Zdenek,

Thanks for your response.

(In reply to Zdenek Dohnal from comment #4)
> Upstream server has CUPS 2.2.10 - it is not a version which is in any RHEL -
> what OS is it? Or did you install a new CUPS version by yourself?

The upstream server is a Debian server.

> Next, it would be great if you provided the file which is sent to RHEL 9
> machine from Windows - it is located in /var/spool/cups, its name starts
> with 'd' and then continues job id and then sequence number of the file in
> the job, f.e.:
> 
> You send one file for printing, CUPS gives it job number 18, so the 'd'
> filename will be 'd00018-001'.
> 
> Next, it would be great if you got couple of logs from RHEL 9 client and
> upstream server when you print from Windows:
> 
> - one couple of logs (one from RHEL 9 and one from upstream server) when you
> print a specific file via everywhere queue from Windows,
> - one couple of logs (one from RHEL 9, one from upstream server) when you
> print the same file via driverless (generated by cups-browsed) queue from
> Windows.

I've attached the files you have requested as attachment 1969939 [details].

The zip file contains the following files:

testpage.pdf is the file that was printed from a Windows 10 machine using Edge.

The driverless directory contains the files and logs from the job to the driverless queue:
 - el9-cups.log is the cups log on the EL9 machine
 - upstream-cups.log is the cups log on the upstream cups server
 - ulsysgrp.ppd is the ppd file generated by cups-browsed on the EL9 machine
 - upstream-c938460 is the metadata file from the CUPS spool on the upstream print server
 - el9-c00013 and el9-d00013-001 are the spool files on the EL9 system

In the EL9 cups logs, the "bad" job is job 13.

The everywhere directory contains the similar files for the same job printed to the everywhere queue (testqueue.ppd). This queue was created using:

lpadmin -p testqueue -v ipp://printserv.esat.kuleuven.be:631/printers/ulsysgrp -m everywhere -E

I hope this includes the information you need.

Regards,
Rik

Comment 7 Zdenek Dohnal 2023-07-18 13:22:42 UTC
Ok, I was able to reproduce the issue. Implicitclass backend enforces pdf document format as output format, but it doesn't do any conversions, so it sends pcl file claiming it is PDF file in IPP packet, which gets stuck on the server, because the server's print queue accepts only PCL based on PCL driver.

IMO implicitclass backend could do IPP request to the destination about document-format-supported, and if the destination supports the same document format as the incoming file has, it will use this format.

I'll talk about it upstream and come with the patch, but in case you would like to prioritize the fix and have RHEL subscription, please file customer case on customer portal https://access.redhat.com , or send PR according https://docs.centos.org/en-US/stream-contrib/ .


How to reproduce:
- 2 machines, client - server


Server:
$ sudo dnf -y install cups
# enable file device
$ sed -i 's,#FileDevice No,FileDevice Yes,' /etc/cups/cups-files.conf 
$ sudo systemctl start cups
$ lpadmin -p test -v file:/tmp/ps -m drv:///sample.drv/generpcl.ppd -E
$ cupsctl --remote-any

Client:
$ sudo dnf -y install cups
$ echo 'BrowsePoll <server's ip>' >> /etc/cups/cups-browsed.conf
$ sudo systemctl start cups-browsed
$ sleep 5
$ lpstat -v
<shows the printer with implicitclass backend>
$ lp -d <printer> /usr/share/cups/ipptool/testfile.pcl.gz
$ sleep 30
$ lpstat -o

Actual result f.e.:
test-2                  root              4096   Tue 18 Jul 2023 01:17:51 PM UTC

Expected result:
No job hanging.

Comment 8 RHEL Program Management 2023-09-21 18:20:14 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 9 RHEL Program Management 2023-09-21 18:35:22 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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