Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I just formatted my root partition and installed 12.3 (I kept my home partition as usual).

I have a problem with my network printer hp laserjet 4015n. It used to work seemingslessly before. Now cups gives me a: Unable to write print data: broken pipe.

I have tried restarting cups, even installing the x86 version, but I can't seem to fix the problem.

I have tried different protocols to connect the printer, currently: socks://ip:9100

Any ideas on how to make this work?

share|improve this question
add comment

2 Answers 2

"Broken Pipe" with JetDirect printers usually indicates a problem establishing a network connection to the printer. It may come down to enabling debug logging in cups and seeing if that has anything, but here are some ideas:

  1. use netcat to see if you can form a TCP-level connection with the printer, this will let you know if there's a network problem (if this succeeds it could still be a network problem, but this is an easy "first test"):

    # nc -vz ip.address.of.printer

  2. Pick the generic Postscript driver for HP, and try to print a test page.

  3. See if it's a weird SELinux thing (SELinux does have certain port controls where certain programs can't listen on certain port numbers), just do a "setenforce 0" as root and try a test page again.

  4. Try to set up a new printer instance to see if it works.

  5. Check your firewall. To test set the default policy on INPUT to ACCEPT and then "iptables -F" then try a test page again.

  6. Start a binary tcpdump, submit a test page from the printer and load it up in wireshark. I have seen some cases where remote routers just won't like how cups starts the tcp connection and will send an RST as the remote node to kill off the connection. Even if that's not what's going on, it would still give you more insight into the dialog that's going on between the two systems.

If all the above fail, I would enable the debug logging and just try to wade through the results to see if it gave a specific error message explaining what's going on or if something about WHERE it's hanging up lets you know more about what's going on.

share|improve this answer
add comment
up vote 0 down vote accepted

After a lot of trial and error. The solution was to add the printer with:

hp:/net/HP_LaserJet_P4015?ip=x.x.x.x

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.