Replies: 5 comments
-
More than likely you are using the wrong printer-uri value. More printers use a URI of the form "ipp://hostname/ipp/print" or "ipps://hostname/ipp/print". CUPS/cupsd uses "ipp://hostname/printers/printername" or "ipps://hostname/printers/printername". |
Beta Was this translation helpful? Give feedback.
-
Adding /print to the URI made no difference. The wireshark output was otherwise identical. My original URI was taken exactly from the suggestion on the CUPS web interface (localhost;631) when adding a new printer. I do note that wireshark shows the URI actually used included :631 even though that is not part of my configuration. |
Beta Was this translation helpful? Give feedback.
-
BTW, the first time I tried this, a few days ago, printing was successful. Of course, I don't have a pcap file for that. Now, so far as I know, nothing changed but all printing attemtps fail in exactly this way. The CUPS log seems to say that all requests got a 200 response but the last one is followed by multiple copies of an error message. May 13 14:56:30 sirlinuxa.local cupsd[796006]: REQUEST localhost - - "POST /printers/PFA HTTP/1.1" 200 319 Create-Job successful-ok |
Beta Was this translation helpful? Give feedback.
-
When I said that nothing had changed, I was only thinking of this particular printer. In fact there are 20+ printers on the network and all were configured for Appsocket (9100) previously, including this one. When printing worked, this printer was the only one converted to IPP. After it worked, I changed all the others to IPP as well. After that, printing to this failed (I didn't try the others). After remembering this difference, I paused all the other printers then tried printing to this one again. It worked. Evidently, the bad request error message is not only ambiguous about the particular job but also about the entire CUPS configuration. So now I need to learn why having multiple IPP printers defined prevents at least this one from working. I have noticed some comments indicating that having duplicate Info entries could cause some problems, though not this specific one. I've checked and there are no duplicate Info entries in the configuration. |
Beta Was this translation helpful? Give feedback.
-
I'm sorry to report that the successful printing I saw earlier was an illusion. In fact, with or without other printers defined in printers.conf, printing to this one still fails. And fails in exactly the same way I originally reported, with the client-error-bad-request response. If no one here can help me find the cause, and a solution, then it is time to seek professional help. Suggestions on that are also welcome. |
Beta Was this translation helpful? Give feedback.
-
The CUPS response, "client-error-bad-request", unfortunately doesn't provide any clue as to what is wrong with a request. Here's an example as decoded by wireshark.
The request.
Internet Printing Protocol
[Response In: 32]
version: 2.0
operation-id: Validate-Job (0x0004)
request-id: 2
operation-attributes-tag
attributes-charset (charset): 'utf-8'
name: attributes-charset
charset value: 'utf-8'
attributes-natural-language (naturalLanguage): 'en'
name: attributes-natural-language
naturalLanguage value: 'en'
printer-uri (uri): 'ipp://pfa.local:631/ipp/'
name: printer-uri
uri value: 'ipp://pfa.local:631/ipp/'
requesting-user-name (nameWithoutLanguage): 'dave'
name: requesting-user-name
nameWithoutLanguage value: 'dave'
job-name (nameWithoutLanguage): 'testpage.pdf'
name: job-name
nameWithoutLanguage value: 'testpage.pdf'
document-format (mimeMediaType): 'application/pdf'
name: document-format
mimeMediaType value: 'application/pdf'
job-attributes-tag
document-name-supplied (nameWithoutLanguage): 'testpage.pdf'
name: document-name-supplied
nameWithoutLanguage value: 'testpage.pdf'
finishings (enum): none
name: finishings
finishings: none (3)
job-originating-host-name (nameWithoutLanguage): 'localhost'
name: job-originating-host-name
nameWithoutLanguage value: 'localhost'
job-uuid (uri): 'urn:uuid:a506d125-fe82-33ce-7b4b-d4feb3ebf216'
name: job-uuid
uri value: 'urn:uuid:a506d125-fe82-33ce-7b4b-d4feb3ebf216'
number-up (integer): 1
name: number-up
integer value: 1
end-of-attributes-tag
The response:
Internet Printing Protocol
[Request In: 15]
[Response Time: 0.066818000 seconds]
version: 2.0
status-code: Client Error (client-error-bad-request)
request-id: 2
operation-attributes-tag
attributes-charset (charset): 'utf-8'
name: attributes-charset
charset value: 'utf-8'
attributes-natural-language (naturalLanguage): 'en'
name: attributes-natural-language
naturalLanguage value: 'en'
end-of-attributes-tag
Someone please help me to understand where I can look to see what is causing this error. The target printer is an HP M406, if that helps. And, of course, if you can see the problem, can you tell me how to fix it?
Beta Was this translation helpful? Give feedback.
All reactions