-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lp: Bad Request #5211
Comments
Server: cups 1.3.7 Client: cups-Version 2.2.4-2.3b1 CUPS >= 1.6 has major incompatible changes The IPP protocol default version increased from 1.1 to 2.0. By adding '/version=1.1' to ServerName in client.conf e.g. Cf. the section about"CUPS Version Upgrade" in |
@jsmeix: thanks for your Tip, but we already use IPP 1.1 all time. We can print from firefox under Kbuntu 17.04 / Fedora 27. cat /etc/cups/client.conf lp command works with cups-client from Something must be changed (IPP?) from cups 2.2.1 to 2.2.4. |
@swbil Can you use Wireshark to capture the traffic between the client and server? Nothing changed between 2.2.1 and 2.2.4 that would cause that kind of issue... |
Dear @michaelrsweet, you and your Team did/do a great great Job in the last 20 years!! ThankYOU! Without you, we would have had to live with lpsched of SUN or Windows printserver ;-) Thanks for the hint with wireshark! Kbuntu 17.10, Debian Testing, Fedora 28 make IPP Request (Create-Job) with !! IPP 2.0 !! only. That's why it does not work and we'got "lp: Bad Request" Is it a cups or linux problem?
|
Hmm, will investigate but the code that sets the default IPP version hasn't changed in a long long time... |
OK, I've confirmed that lp is ignoring the server version; investigating... |
OK, the issue appears to be that the cupsCreateJob API now redirects to cupsCreateDestJob, which uses the destination information which tells it to use IPP/2.0... And that is because the cupsCopyDestInfo assumes that the initial version is 2.0, not 1.1... :/ Fix coming up... |
cups/dest-options.c: - Fix IPP version check in cupsCopyDestInfo.
Dear @michaelrsweet, thanks for the fix, but the bug (IPP 2.0) moves now to Get-Printer-Attributes Can you check it, pls?
|
Dear @michaelrsweet, it works if I make a quick and dirty change at line 716 in cups/dest-options.c from cups-2.3b2-source.tar.gz
|
Hi @michaelrsweet, I can't reopen this issue. Can you reopen for me, please? |
That change won't work since 1.1 clients don't get collection attributes. Reopening while I determine why the negotiated version number isn't being used. |
Update ippserver to support maximum version option (-V max-version) Update cupsCopyDestInfo to recognize when we are talking to the CUPS server and when we are talking to the device (so we get the right URI for the printer) Add "--device" option to testdest.
- Fixed a compile issue when PAM is not available (Issue #5253) - Documentation fixes (Issue #5252) - Star Micronics printers need the "unidir" USB quirk rule (Issue #5251) - The scheduler now supports using temporary print queues for older IPP/1.1 print queues like those shared by CUPS 1.3 and earlier (Issue #5241) - The `cupsRasterWritePixels` function did not correctly swap bytes for some formats (Issue #5225) - Added a USB quirk rule for Canon MP280 series printers (Issue #5221) - The `ppdInstallableConflict` tested too many constraints (Issue #5213) - More fixes for printing to old CUPS servers (Issue #5211) - The `cupsCopyDest` function now correctly copies the `is_default` value (Issue #5208) - The scheduler did not work with older versions of uClibc (Issue #5188) - The scheduler now substitutes default values for invalid job attributes when running in "relaxed conformance" mode (Issue #5186) - Fixed PAM module detection and added support for the common PAM definitions (Issue #5185) - Fixed a journald support bug in the scheduler (Issue #5181) - The cups-driverd program incorrectly stopped scanning PPDs as soon as a loop was seen (Issue #5170) - Fixed group validation on OpenBSD (Issue #5166) - Fixed the `ippserver` sample code when threading is disabled or unavailable (Issue #5154) - The `cupsEnumDests` function did not include options from the lpoptions files (Issue #5144) - The `SSLOptions` directive now supports `MinTLS` and `MaxTLS` options to control the minimum and maximum TLS versions that will be allowed, respectively (Issue #5119) - The scheduler did not write out dirty configuration and state files if there were open client connections (Issue #5118) - The `lpadmin` command now provides a better error message when an unsupported System V interface script is used (Issue #5111) - The `lp` and `lpr` commands now provide better error messages when the default printer cannot be found (Issue #5096) - No longer support backslash, question mark, or quotes in printer names (Issue #4966) - The CUPS library now supports the latest HTTP Digest authentication specification including support for SHA-256 (Issue #4862) - The `lpstat` command now reports when new jobs are being held (Issue #4761) - The `lpoptions` command incorrectly saved default options (Issue #4717) - The `ppdLocalizeIPPReason` function incorrectly returned a localized version of "none" (rdar://36566269) - TLS connections now properly timeout (rdar://34938533) - The IPP backend did not properly detect failed PDF prints (rdar://34055474)
Server: cups 1.3.7
Client: Kbuntu 17.04 / Fedora 27 (since cups-Version 2.2.4-2.3b1)
Work: Printing from firefox
Don't Work: Printing from LibreOffice, Okular or lp
~> lp -d lama /etc/hosts
lp: Bad Request
debug2-LogLevel
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: Write on fd 10...
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: polling 7 fds for 1 seconds...
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: epoll() returned 1...
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: Write on fd 10...
d [02/Jan/2018:13:46:14 +0100] cupsdWriteClient: 10 bytes < 0
d [02/Jan/2018:13:46:14 +0100] cupsdAddSelect: fd=10, read_cb=0x40f013, write_cb=(nil), data=0x59de20
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: polling 7 fds for 1 seconds...
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: epoll() returned 1...
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: Read on fd 10...
d [02/Jan/2018:13:46:14 +0100] cupsdReadClient: 10, used=0, file=-1 state=0
D [02/Jan/2018:13:46:14 +0100] cupsdReadClient: 10 POST /printers/lama HTTP/1.1
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: uri = "/printers/lama"...
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location CUPS_INTERNAL_BROWSE_ACL Limit 0
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /printers/name Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /printers Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /jobs Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /classes/name Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /classes Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /admin/log Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /admin/conf Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location /admin Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: Location / Limit 7f
d [02/Jan/2018:13:46:14 +0100] cupsdFindBest: best = /printers
d [02/Jan/2018:13:46:14 +0100] cupsdAuthorize: con->uri="/printers/lama", con->best=0x555100(/printers)
d [02/Jan/2018:13:46:14 +0100] cupsdAuthorize: Authorization=""
D [02/Jan/2018:13:46:14 +0100] cupsdAuthorize: No authentication data provided.
d [02/Jan/2018:13:46:14 +0100] cupsdIsAuthorized: con->uri="/printers/lama", con->best=0x555100(/printers)
d [02/Jan/2018:13:46:14 +0100] cupsdIsAuthorized: level=CUPSD_AUTH_ANON, type=None, satisfy=CUPSD_AUTH_SATISFY_ALL, num_names=0
d [02/Jan/2018:13:46:14 +0100] cupsdIsAuthorized: auth=CUPSD_AUTH_ALLOW...
d [02/Jan/2018:13:46:14 +0100] POST /printers/lama
d [02/Jan/2018:13:46:14 +0100] CONTENT_TYPE = application/ipp
d [02/Jan/2018:13:46:14 +0100] cupsdReadClient: 10 con->data_encoding=HTTP_ENCODE_LENGTH, con->data_remaining=347, con->file=-1
E [02/Jan/2018:13:46:14 +0100] cupsdReadClient: 10 IPP Read Error!
D [02/Jan/2018:13:46:14 +0100] cupsdSendError: 10 code=400 (Bad Request)
D [02/Jan/2018:13:46:14 +0100] cupsdCloseClient: 10
d [02/Jan/2018:13:46:14 +0100] cupsdRemoveSelect: fd=10
d [02/Jan/2018:13:46:14 +0100] cupsdDoSelect: polling 6 fds for 1 seconds...
d [02/Jan/2018:13:46:15 +0100] cupsdDoSelect: epoll() returned 0...
d [02/Jan/2018:13:46:15 +0100] select_timeout(0): 100 seconds to timeout a client connection
d [02/Jan/2018:13:46:15 +0100] cupsdDoSelect: polling 6 fds for 100 seconds...
The text was updated successfully, but these errors were encountered: