IPP Validate-Job operation and its implementation in CUPS
Hi all,
one of our RHEL customers hit an issue with IPP Validate-Job operation when using Lexmark CX727de printer.
A print job occasionally fails after IPP backend sends IPP Validate-Job request to the printer, but the printer only sends TCP ACK packet after receiving the request, and doesn't send 'HTTP/1.1 100 Continue' or full response. When an user resubmits the job later, the printer sends the correct response and the print job ends successfully.
I came to the conclusion it is a printer firmware bug and recommended reporting it to printer vendor, because the printer reports it is capable of Validate-Job operation (checked via ipptool), but it occasionally fails.
In this email I would like to ask if there can be a way how to work around such printer issues within CUPS, which can be aligned with RFC and PWG standards, and can be merged into OpenPrinting/cups project.
I have several ideas:
1) Validate-Job operation is 'only' recommended since IPP 2.0, so the backend would have printed only warning if Validate-Job failed and the IPP protocol used for communication is 2.0 or newer
2) configurable retries for Validate-Job operation - this idea came up from printer behavior (Validate-Job works after N retries) and from knowledge there are already configurable variables in backends via device uri
3) define a specific IPP_STATUS_* enum variable for failing Validate-Job, let the backend fail if ipp_status is that variable and let error-policy handle the possible retry
Is some of them acceptable to implement it in CUPS?
Thank you in advance for any suggestions!
Have a nice day,
Zdenek
Signature · 3 lines
Zdenek Dohnal Software Engineer Red Hat Czech - Brno TPB-C
Hi,
Commenting just on one point in your note.
Validate-Job has been REQUIRED for all IPP implementations since original IPP/1.1 (RFC 2911) and is REQUIRED in IETF Standard IPP/1.1 (RFC 8011). It is NOT optional to support.
Cheers,
- Ira (co-chair of IPP WG)
*Ira McDonald (Musician / Software Architect)*
*Chair - SAE Trust Anchors and Authentication TF*
*Co-Chair - TCG Trusted Mobility Solutions WG*
*Co-Chair - TCG Metadata Access Protocol SG*
*Chair - Linux Foundation Open Printing WGSecretary - IEEE-ISTO Printer Working GroupCo-Chair - IEEE-ISTO PWG Internet Printing Protocol WGIETF Designated Expert - IPP & Printer MIBBlue Roof Music / High North Inchttp://sites.google.com/site/blueroofmusic
<http://sites.google.com/site/blueroofmusic>http://sites.google.com/site/highnorthinc
<http://sites.google.com/site/highnorthinc>mailto: [email protected] <[email protected]>(permanent) PO Box 221 Grand Marais, MI 49839 906-494-2434*
Quoted 53 lines · Zdenek Dohnal
Hi all,
one of our RHEL customers hit an issue with IPP Validate-Job operation when using Lexmark CX727de printer.
A print job occasionally fails after IPP backend sends IPP Validate-Job request to the printer, but the printer only sends TCP ACK packet after receiving the request, and doesn't send 'HTTP/1.1 100 Continue' or full response. When an user resubmits the job later, the printer sends the correct response and the print job ends successfully.
I came to the conclusion it is a printer firmware bug and recommended reporting it to printer vendor, because the printer reports it is capable of Validate-Job operation (checked via ipptool), but it occasionally fails.
In this email I would like to ask if there can be a way how to work around such printer issues within CUPS, which can be aligned with RFC and PWG standards, and can be merged into OpenPrinting/cups project.
I have several ideas:
1) Validate-Job operation is 'only' recommended since IPP 2.0, so the backend would have printed only warning if Validate-Job failed and the IPP protocol used for communication is 2.0 or newer
2) configurable retries for Validate-Job operation - this idea came up from printer behavior (Validate-Job works after N retries) and from knowledge there are already configurable variables in backends via device uri
3) define a specific IPP_STATUS_* enum variable for failing Validate-Job, let the backend fail if
ipp_statusis that variable and let error-policy handle the possible retryIs some of them acceptable to implement it in CUPS?
Thank you in advance for any suggestions!
Have a nice day,
Zdenek
--
Zdenek Dohnal
Software Engineer
Red Hat Czech - Brno TPB-C_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture
Zdenek,
Quoted 3 lines · Zdenek Dohnal
...
In this email I would like to ask if there can be a way how to work around such printer issues within CUPS, which can be aligned with RFC and PWG standards, and can be merged into OpenPrinting/cups project.
Aside from maybe retrying the Validate-Job request if it fails the first time, I'm not sure
Quoted 3 lines
I have several ideas:
1) Validate-Job operation is 'only' recommended since IPP 2.0, so the backend would have printed only warning if Validate-Job failed and the IPP protocol used for communication is 2.0 or newer
Actually, while Validate-Job was listed as RECOMMENDED in IPP 2.0, IPP Everywhere restores it to REQUIRED, just as STD 92 has required it going all the way back to the IPP/1.0 experimental version.
Quoted 1 line
2) configurable retries for Validate-Job operation - this idea came up from printer behavior (Validate-Job works after N retries) and from knowledge there are already configurable variables in backends via device uri
I'd rather it be automatic - either retry the Validate-Job operation or just move on to printing without validation.
Quoted 1 line
3) define a specific IPP_STATUS_* enum variable for failing Validate-Job, let the backend fail if
ipp_statusis that variable and let error-policy handle the possible retry
I'm not keen on "supporting" broken behavior. Usually I've tried to "gracefully degrade" in these situations, which would basically mean option 2 without the retry (just attempt to validate and continue if we don't get a valid response.
________________________
Michael Sweet
Hi,
Note that IPP/2.0 reducing Validate-Job from REQUIRED is a known technical error.
IPP/2.0 (or any other later IPP spec) CANNOT reduce any REQUIRED operation conformance from IETF Standard IPP/1.1 (STD92/RFC 8010/RFC 8011).
Cheers,
- Ira
*Ira McDonald (Musician / Software Architect)*
*Chair - SAE Trust Anchors and Authentication TF*
*Co-Chair - TCG Trusted Mobility Solutions WG*
*Co-Chair - TCG Metadata Access Protocol SG*
*Chair - Linux Foundation Open Printing WGSecretary - IEEE-ISTO Printer Working GroupCo-Chair - IEEE-ISTO PWG Internet Printing Protocol WGIETF Designated Expert - IPP & Printer MIBBlue Roof Music / High North Inchttp://sites.google.com/site/blueroofmusic
<http://sites.google.com/site/blueroofmusic>http://sites.google.com/site/highnorthinc
<http://sites.google.com/site/highnorthinc>mailto: [email protected] <[email protected]>(permanent) PO Box 221 Grand Marais, MI 49839 906-494-2434*
Quoted 48 lines · Michael Sweet
Zdenek,
Quoted 3 lines · Zdenek Dohnal
...
In this email I would like to ask if there can be a way how to workaround such printer issues within CUPS, which can be aligned with RFC and PWG standards, and can be merged into OpenPrinting/cups project.
Aside from maybe retrying the Validate-Job request if it fails the first time, I'm not sure
Quoted 3 lines
I have several ideas:
1) Validate-Job operation is 'only' recommended since IPP 2.0, so the
backend would have printed only warning if Validate-Job failed and the IPP protocol used for communication is 2.0 or newer
Actually, while Validate-Job was listed as RECOMMENDED in IPP 2.0, IPP Everywhere restores it to REQUIRED, just as STD 92 has required it going all the way back to the IPP/1.0 experimental version.
Quoted 1 line
2) configurable retries for Validate-Job operation - this idea came up
from printer behavior (Validate-Job works after N retries) and from knowledge there are already configurable variables in backends via device uri
I'd rather it be automatic - either retry the Validate-Job operation or just move on to printing without validation.
Quoted 1 line
3) define a specific IPP_STATUS_* enum variable for failing
Validate-Job, let the backend fail if
ipp_statusis that variable and let error-policy handle the possible retryI'm not keen on "supporting" broken behavior. Usually I've tried to "gracefully degrade" in these situations, which would basically mean option 2 without the retry (just attempt to validate and continue if we don't get a valid response.
________________________
Michael Sweet_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture
Hi Ira,
thanks for the heads-up! I only checked IPP 2.0 standard and didn't follow documents created later, which is a mistake...
Zdenek
Quoted 86 lines · Ira McDonald
Hi,
Note that IPP/2.0 reducing Validate-Job from REQUIRED is a known technical error.
IPP/2.0 (or any other later IPP spec) CANNOT reduce any REQUIRED operation conformance from IETF Standard IPP/1.1 (STD92/RFC 8010/RFC 8011).
Cheers,
- Ira/Ira McDonald (Musician / Software Architect)/
/Chair - SAE Trust Anchors and Authentication TF
/
/Co-Chair - TCG Trusted Mobility Solutions WG/ /Co-Chair - TCG Metadata Access Protocol SG
/
/Chair - Linux Foundation Open Printing WG
Secretary - IEEE-ISTO Printer Working Group
Co-Chair - IEEE-ISTO PWG Internet Printing Protocol WG IETF Designated Expert - IPP & Printer MIB
Blue Roof Music / High North Inc
http://sites.google.com/site/blueroofmusic
<http://sites.google.com/site/blueroofmusic>
http://sites.google.com/site/highnorthinc
<http://sites.google.com/site/highnorthinc>
mailto: [email protected] <mailto:[email protected]> (permanent) PO Box 221 Grand Marais, MI 49839 906-494-2434/On Wed, Oct 21, 2020 at 4:49 PM Michael Sweet <[email protected] <mailto:[email protected]>> wrote:
Zdenek,
> On Oct 21, 2020, at 9:18 AM, Zdenek Dohnal <[email protected] <mailto:[email protected]>> wrote:
> ...
> In this email I would like to ask if there can be a way how to work around such printer issues within CUPS, which can be aligned with RFC and PWG standards, and can be merged into OpenPrinting/cups project.Aside from maybe retrying the Validate-Job request if it fails the first time, I'm not sure
> I have several ideas:
>
> 1) Validate-Job operation is 'only' recommended since IPP 2.0, so the backend would have printed only warning if Validate-Job failed and the IPP protocol used for communication is 2.0 or newerActually, while Validate-Job was listed as RECOMMENDED in IPP 2.0, IPP Everywhere restores it to REQUIRED, just as STD 92 has required it going all the way back to the IPP/1.0 experimental version.
> 2) configurable retries for Validate-Job operation - this idea came up from printer behavior (Validate-Job works after N retries) and from knowledge there are already configurable variables in backends via device uri
I'd rather it be automatic - either retry the Validate-Job operation or just move on to printing without validation.
> 3) define a specific IPP_STATUS_* enum variable for failing Validate-Job, let the backend fail if
ipp_statusis that variable and let error-policy handle the possible retryI'm not keen on "supporting" broken behavior. Usually I've tried to "gracefully degrade" in these situations, which would basically mean option 2 without the retry (just attempt to validate and continue if we don't get a valid response.
________________________
Michael Sweet_______________________________________________
Printing-architecture mailing list [email protected] <mailto:[email protected]>
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture
<https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture>
Signature · 3 lines
Zdenek Dohnal Software Engineer Red Hat Czech - Brno TPB-C
Hi Mike,
thank you for the comments!
I'll implement both approaches for option 2 (validate two times and end with error if fails x validate once and move to printing no matter of the result), see what will work for the customer and then create PR in Openprinting/cups for review.
Thank you again and have a nice day!
Zdenek
Quoted 23 lines · Michael Sweet
Zdenek,
Quoted 3 lines · Zdenek Dohnal
...
In this email I would like to ask if there can be a way how to work around such printer issues within CUPS, which can be aligned with RFC and PWG standards, and can be merged into OpenPrinting/cups project.Aside from maybe retrying the Validate-Job request if it fails the first time, I'm not sure
Quoted 3 lines
I have several ideas:
1) Validate-Job operation is 'only' recommended since IPP 2.0, so the backend would have printed only warning if Validate-Job failed and the IPP protocol used for communication is 2.0 or newer
Actually, while Validate-Job was listed as RECOMMENDED in IPP 2.0, IPP Everywhere restores it to REQUIRED, just as STD 92 has required it going all the way back to the IPP/1.0 experimental version.
Quoted 1 line
2) configurable retries for Validate-Job operation - this idea came up from printer behavior (Validate-Job works after N retries) and from knowledge there are already configurable variables in backends via device uri
I'd rather it be automatic - either retry the Validate-Job operation or just move on to printing without validation.
Quoted 1 line
3) define a specific IPP_STATUS_* enum variable for failing Validate-Job, let the backend fail if
ipp_statusis that variable and let error-policy handle the possible retryI'm not keen on "supporting" broken behavior. Usually I've tried to "gracefully degrade" in these situations, which would basically mean option 2 without the retry (just attempt to validate and continue if we don't get a valid response.
________________________
Michael Sweet
Signature · 3 lines
Zdenek Dohnal Software Engineer Red Hat Czech - Brno TPB-C
Hi Zdenek,
A major update of IPP/2.0 is one of the primary projects for 2021 for the IPP WG,
to align with the major revisions of Driverless, Enterprise, and Production.
We hope to move away from long internal lists of attributes and operations and
instead move to a higher-level of named specs.
Cheers,
- Ira
*Ira McDonald (Musician / Software Architect)*
*Chair - SAE Trust Anchors and Authentication TF*
*Co-Chair - TCG Trusted Mobility Solutions WG*
*Co-Chair - TCG Metadata Access Protocol SG*
*Chair - Linux Foundation Open Printing WGSecretary - IEEE-ISTO Printer Working GroupCo-Chair - IEEE-ISTO PWG Internet Printing Protocol WGIETF Designated Expert - IPP & Printer MIBBlue Roof Music / High North Inchttp://sites.google.com/site/blueroofmusic
<http://sites.google.com/site/blueroofmusic>http://sites.google.com/site/highnorthinc
<http://sites.google.com/site/highnorthinc>mailto: [email protected] <[email protected]>(permanent) PO Box 221 Grand Marais, MI 49839 906-494-2434*
Quoted 100 lines · Zdenek Dohnal
Hi Ira,
thanks for the heads-up! I only checked IPP 2.0 standard and didn't follow documents created later, which is a mistake...
Zdenek
On 10/22/20 2:48 AM, Ira McDonald wrote:Hi,
Note that IPP/2.0 reducing Validate-Job from REQUIRED is a known technical error.
IPP/2.0 (or any other later IPP spec) CANNOT reduce any REQUIRED operation conformance from IETF Standard IPP/1.1 (STD92/RFC 8010/RFC 8011).
Cheers,
- Ira*Ira McDonald (Musician / Software Architect)*
*Chair - SAE Trust Anchors and Authentication TF * *Co-Chair - TCG Trusted Mobility Solutions WG*
*Co-Chair - TCG Metadata Access Protocol SG *
*Chair - Linux Foundation Open Printing WG Secretary - IEEE-ISTO Printer Working Group Co-Chair - IEEE-ISTO PWG Internet Printing Protocol WG IETF Designated Expert - IPP & Printer MIB Blue Roof Music / High North Inc
http://sites.google.com/site/blueroofmusic
<http://sites.google.com/site/blueroofmusic>
http://sites.google.com/site/highnorthinc
<http://sites.google.com/site/highnorthinc> mailto: [email protected] <[email protected]> (permanent) PO Box 221 Grand Marais, MI 49839 906-494-2434*Quoted 43 lines · Michael Sweet
Zdenek,
Quoted 3 lines · Zdenek Dohnal
...
In this email I would like to ask if there can be a way how to workaround such printer issues within CUPS, which can be aligned with RFC and PWG standards, and can be merged into OpenPrinting/cups project.
Aside from maybe retrying the Validate-Job request if it fails the first time, I'm not sure
Quoted 3 lines
I have several ideas:
1) Validate-Job operation is 'only' recommended since IPP 2.0, so the
backend would have printed only warning if Validate-Job failed and the IPP protocol used for communication is 2.0 or newer
Actually, while Validate-Job was listed as RECOMMENDED in IPP 2.0, IPP Everywhere restores it to REQUIRED, just as STD 92 has required it going all the way back to the IPP/1.0 experimental version.
Quoted 1 line
2) configurable retries for Validate-Job operation - this idea came up
from printer behavior (Validate-Job works after N retries) and from knowledge there are already configurable variables in backends via device uri
I'd rather it be automatic - either retry the Validate-Job operation or just move on to printing without validation.
Quoted 1 line
3) define a specific IPP_STATUS_* enum variable for failing
Validate-Job, let the backend fail if
ipp_statusis that variable and let error-policy handle the possible retryI'm not keen on "supporting" broken behavior. Usually I've tried to "gracefully degrade" in these situations, which would basically mean option 2 without the retry (just attempt to validate and continue if we don't get a valid response.
________________________
Michael SweetQuoted 5 lines
_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture--
Zdenek Dohnal
Software Engineer
Red Hat Czech - Brno TPB-C
Hi Michael,
Quoted 1 line · Michael Sweet
Aside from maybe retrying the Validate-Job request if it fails the first time, I'm not sure
I wonder why we can't always send Print-Job and bypass the Validate-Job step?
Signature · 1 line
Wishes, Alexander Pevzner ([email protected])
Hi Alexander,
You don't want to just always do Print-Job because the associated Document content
may be large (and have to be spooled), rather than first checking the validity of all the
IPP Job Template attributes w/ Validate-Job.
Cheers,
- Ira
*Ira McDonald (Musician / Software Architect)*
*Chair - SAE Trust Anchors and Authentication TF*
*Co-Chair - TCG Trusted Mobility Solutions WG*
*Co-Chair - TCG Metadata Access Protocol SG*
*Chair - Linux Foundation Open Printing WGSecretary - IEEE-ISTO Printer Working GroupCo-Chair - IEEE-ISTO PWG Internet Printing Protocol WGIETF Designated Expert - IPP & Printer MIBBlue Roof Music / High North Inchttp://sites.google.com/site/blueroofmusic
<http://sites.google.com/site/blueroofmusic>http://sites.google.com/site/highnorthinc
<http://sites.google.com/site/highnorthinc>mailto: [email protected] <[email protected]>(permanent) PO Box 221 Grand Marais, MI 49839 906-494-2434*
Quoted 17 lines · Alexander Pevzner
Hi Michael,
Quoted 1 line · Michael Sweet
Aside from maybe retrying the Validate-Job request if it fails the first
time, I'm not sure
I wonder why we can't always send Print-Job and bypass the Validate-Job step?
--
Wishes, Alexander Pevzner ([email protected])
_______________________________________________
Printing-architecture mailing list [email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture
Alexander,
Validate-Job is a necessary step in some managed/paid printing configurations - you'll get back a per-job authorization code that need to be used with Print-Job.
It is also a recommended step in both IPP Implementor's Guides...
Quoted 17 lines · Alexander Pevzner
Hi Michael,
Quoted 1 line · Michael Sweet
Aside from maybe retrying the Validate-Job request if it fails the first time, I'm not sure
I wonder why we can't always send Print-Job and bypass the Validate-Job step?
Signature · 5 lines
Wishes, Alexander Pevzner ([email protected]) _______________________________________________ Printing-architecture mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture
________________________
Michael Sweet
Michael.
Quoted 3 lines · Michael Sweet
Validate-Job is a necessary step in some managed/paid printing configurations - you'll get back a per-job authorization code that need to be used with Print-Job.
It is also a recommended step in both IPP Implementor's Guides...
Thank you for the explanation. And yet another question, what will CUPS do, if printer doesn't understand Expect: 100-continue header?
Signature · 1 line
Wishes, Alexander Pevzner ([email protected])
Alexander,
Quoted 9 lines · Alexander Pevzner
Michael.
Quoted 2 lines · Michael Sweet
Validate-Job is a necessary step in some managed/paid printing configurations - you'll get back a per-job authorization code that need to be used with Print-Job. It is also a recommended step in both IPP Implementor's Guides...
Thank you for the explanation. And yet another question, what will CUPS do, if printer doesn't understand Expect: 100-continue header?
CUPS times out the expectation after 1 second, continuing the print job (and assuming there won't be an authentication challenge). Fortunately, most printers support Expect, but if they don't there isn't a large penalty.
________________________
Michael Sweet