HP LJ2200D JetDirect recognised but doesn't print: /usr/lib/cups/backend/hp failed

Asked by Stephen Brown

Binary package hint: hplip

I've just upgraded to 9.10 from 9.04

My HP LJ2200D was working fine with 9.04 and the version of CUPS that came with that version (1.3). It is still working from another machine which is still running 9.04 so there is no problem with the printer. 9.10 comes with a new version of CUPS (1.4.1)

I have eventually managed to get hp-setup to discover the printer on the network using the SLP network discovery method. Manually putting in the IP address did not work for some reason even though I could ping the address fine. CUPS localhost:631 would not find the printer but now recognises it having set up with the hp setup tool.

So, now it recognises the printer, I can access the printer via the browser and see all the settings etc.

BUT, it will not print. Even printing a test page from either the HP toolbox or from CUPS gives the error "/usr/lib/cups/backend/hp failed"

The hp file is in the stated folder. I have tried reinstalling hplip but no change. I have tried different drivers including the one I was previously using. Now have HP LaserJet 2200 Postscript (recommended) (grayscale) installed.

I have looked extensively at other bug reports and howto pages but cannot fix this. Please help as not being able to print is a big problem for me!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu hplip Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Brown
Solved:
Last query:
Last reply:
Revision history for this message
Dan Buhrman (dan-buhrman) said :
#1

I can confirm this with HP LaserJet 4000 series network printer.

Revision history for this message
Stephen Brown (stephen-komak) said :
#2

Can someone please tell me what could cause an error "/usr/lib/cups/backend/hp failed" with the new version of CUPS on Ubuntu 9.10 when the printer was working fine with the previous version of CUPS on 9.04?

Revision history for this message
OliverSchmitz (schmitzoliver) said :
#3

Hallo, Stephen,
I'm a poor beginner, but in my quite similary case (jetdirect 300x and deskjet 970cxi) the solution was not to use any hp-programs or the bulit-in configuration tool (tried too, but without sustainable success).
First I deleted all not working printers (system-administration-printing).
Then I enterd the cups web-interface (http://localhost:631/).
On the tab "administration" I deactivated "show released printers on other systems" and I let ckecked only the next three boxes.
After that I choosed "add printer" - verfication - "AppSocket/HP JetDirect (Unknown)" - and entered the socket like in the examples (in my case: socket"://192.168.2.103:9100"). Complete the rest (I choosed hp d.
Till now it is functioning, even all ips in my little network are dynamic (dhcp).
The spelling could be not correct, because i use german. Hope this can help.
Best regards, olli.

Revision history for this message
OliverSchmitz (schmitzoliver) said :
#4

Hallo, Stephan,
was my first use of launchpad. Can't find a possibility to correct my text after "add answer":
I wrote "Complete the rest (I choosed hp"
And now what i did not finish:
Just choose your model as near as possible. I took a driver - cups + gutenprint etc.

Revision history for this message
Stephen Brown (stephen-komak) said :
#5

Thanks for your suggestions Olli. I have followed your advice, but still have a problem. When I try to print it queues the print job, but just keeps processing and never prints. I can ping the IP address and it works fine, and CUPS can find the printer. It just refuses to print! Any more ideas?

Stephen

Revision history for this message
OliverSchmitz (schmitzoliver) said :
#6

Dear Stephen,
sorry I'm just a newbie. I researched a little bit, but it seems that
you are the first affected user of this problem. And there seems no way
to change to version 1.3.
The only advice: Report it to cups.org. Perhaps there you find help.
Olli

Revision history for this message
killjoy (postnblog) said :
#7

In Ubuntu 9.10 there is something wrong with the hp backend. I downloaded the new backend from:
http://hplipopensource.com/hplip-web/install_wizard/index.html

Then I ran the download via sudo and rebooted.
The script finds dependency issues, and eventually needs to recompile a new backend.

After that I used the "System => Administration => Printing" tool to add the printer.

Everything works fine now.

Revision history for this message
Stephen Brown (stephen-komak) said :
#8

Thanks Killjoy for your suggestion. I downloaded the latest hplip-3.9.12 and ran it as you said above, although it recommends not doing it as sudo (root). It does ask for the root password during the installation. I still get "/usr/lib/cups/backend/hp failed". Not sure what bug fixes are in this version, but it hasn't fixed mine! It knows the printer is there, but can't print. Other suggestions welcome! Should I retry ignoring the recommendation to run as a user and not as root? Do you think this will solve the problem? I'm not sure how the backend works.

Revision history for this message
killjoy (postnblog) said :
#9

The cups HP backend is a file:

/usr/lib/cups/backend/hp

It is a binary executable. the script does not need root access to make a new executable, but it needs root to write over the exiting backend file. If you ran as a normal user you may need to either run as root, or but the new backend file in by hand. If the script was able to replace the file, you will see an new-ish date/time stamp:

$ ls -latr /usr/lib/cups/backend/hp
-rwxr-xr-x 1 root root 43178 2009-12-22 14:59 /usr/lib/cups/backend/hp

Note that that date/time is less than a day old.

Revision history for this message
Stephen Brown (stephen-komak) said :
#10

Yes, the result follows:
stephen@stephen-laptop:~$ sudo ls -latr /usr/lib/cups/backend/hp
[sudo] password for stephen:
-rwxr-xr-x 1 root root 37828 2009-12-22 21:38 /usr/lib/cups/backend/hp

Could only run the ls command with sudo. Without it I got:
stephen@stephen-laptop:~$ ls -latr /usr/lib/cups/backend/hp
ls: cannot access /usr/lib/cups/backend/hp: Permission denied

Could this be part of the problem? That the permissions are wrong somewhere? I have no idea how to change these!

Revision history for this message
Dan63043 (junk63043) said :
#11

I had trouble printing to my HP Photosmart c309a off of a network connection.

I followed the above suggested link to http://hplipopensource.com/hplip-web/install_wizard/index.html and ran the downloaded file using sudo. When it got to the setup stage, I logged out and back in and ran hp-setup as an ordinary user.

I had to open a hole in my highly configured firewall, too.

Everything works! Thanks for the tip, killjoy!

Revision history for this message
killjoy (postnblog) said :
#12

@Stephen:

It looks like your permissions are broken up stream. Your permissions should be the same for every directory up from the backend. For example:

stephen@stephen-laptop:~$ sudo su -
root@stephen-laptop:~# for each in /usr /usr/lib /usr/lib/cups /usr/lib/cups/backend; do ls -latrd $each; done
drwxr-xr-x 13 root root 4096 2009-12-11 07:22 /usr
drwxr-xr-x 332 root root 135168 2009-12-23 07:45 /usr/lib
drwxr-xr-x 10 root root 4096 2008-11-03 05:12 /usr/lib/cups
drwxr-xr-x 2 root root 4096 2009-12-22 14:59 /usr/lib/cups/backend

The following forces a permissions "fix" to everything if you cannot tell what is broken:

root@stephen-laptop:~# for each in /usr /usr/lib /usr/lib/cups /usr/lib/cups/backend; do
> chmod 755 $each;
> chown root:root $each;
> ls -latrd $each;
> done
drwxr-xr-x 13 root root 4096 2009-12-11 07:22 /usr
drwxr-xr-x 332 root root 135168 2009-12-23 07:45 /usr/lib
drwxr-xr-x 10 root root 4096 2008-11-03 05:12 /usr/lib/cups
drwxr-xr-x 2 root root 4096 2009-12-22 14:59 /usr/lib/cups/backend

The following get back to a normal user and tests the permissions change.

root@stephen-laptop:~# exit
stephen@stephen-laptop:~$ ls -latr /usr/lib/cups/backend/hp
-rwxr-xr-x 1 root root 43178 2009-12-22 14:59 /usr/lib/cups/backend/hp

I hope that helps.

Revision history for this message
Stephen Brown (stephen-komak) said :
#13

Killjoy, thank you SO much! My printer is now working again. Followed your suggestions and it worked a treat. This is such a relief. I'm very grateful for your help.
Stephen