Have you experienced the following random error while printing with CUPS?
Unable to send trailing nul to printer: Broken pipe
printer PRLAX05 disabled since Wed 11 Nov 2015 02:53:29 PM PST –
Unable to write print data: Broken pipe
There could be multiple reasons for this issue to happen. Have a look at the following :
1. Make sure there is no network issue between the client/server. You can also tcpdump the CUPS traffic using the following command for debugging :
1 |
tcpdump -s0 -w cups.pcap host <printer_IP> |
2. Make sure the printer was in working order at the time it happened.
3. Verify “DeviceURI” parameter in printers.conf :
1 |
/etc/cups/printers.conf |
Locate the problematic printer configuration and locate the “DeviceURI” parameter (see the below sample) :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<Printer PRLAX05> Info PRLAX05 DeviceURI socket://192.168.91.55:9100 State Idle StateTime 1450891245 Type 4 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer </Printer> |
If the “DeviceURI” parameter is set to “socket”, try to change it to “lpd” instead. Socket method is obsolete and is known to cause random issues.
Example, change from :
1 |
DeviceURI socket://192.168.91.55:9100 |
To :
1 |
DeviceURI lpd://192.168.91.55 |
Optionally, verify the jobs queue :
1 |
lpstat -o |
Then restart the CUPS service :
1 |
service cupsd restart |