xsane says failed to open device hpaio:/net/ device busy

Asked by Bruce Dawson on 2008-04-01

I'm running Ubuntu 6.10 with HPLIP 1.6.9 and can't scan from an HP-2840. But I am able to print to it without problem.
xsane sees it (actually, it sees two of the same device), but when I select one and click OK, it responds with "Failed to open device `hpaio:/net/HP_Color_Laserjet_2840?ip=192.168.56.13': Device busy.

/var/log/messages produced the following while running xsane:

Mar 31 23:37:40 bruce python: hpssd[14223]: warning: Inrecognized URI: socket://t620.localnet:9100
Mar 31 23:37:40 bruce python: hpssd[14223]: warning: Inrecognized URI: file:/dev/null
Mar 31 23:37:40 bruce last message repeated 2 times
Mar 31 23:37:47 bruce hpiod: device cleanup uri=hp:/net/HP_Color_LaserJet_2840?ip=192.168.56.13

Output from hp-info is:

jbd@bruce:/usr/share/doc/hplip$ hp-info

HP Linux Imaging and Printing System (ver. 1.6.9)
Device Information Utility ver. 3.4

Copyright (c) 2003-6 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Using device: hp:/net/HP_Color_LaserJet_2840?ip=192.168.56.13

hp:/net/HP_Color_LaserJet_2840?ip=192.168.56.13

Device Parameters (dynamic data):
  Parameter Value(s)
  ---------------------------- ----------------------------------------------------------
  3bit-status-code 8
  3bit-status-name NoFault
  agent1-ack False
  agent1-desc Black toner cartridge
  agent1-dvc 0
  agent1-health 0
  agent1-health-desc Good/OK
  agent1-hp-ink False
  agent1-id 0
  agent1-kind 4
  agent1-known False
  agent1-level 21
  agent1-level-trigger 0
  agent1-sku 60 (Q3960A)
  agent1-type 1
  agent1-virgin False
  agent2-ack False
  agent2-desc Cyan toner cartridge
  agent2-dvc 0
  agent2-health 0
  agent2-health-desc Good/OK
  agent2-hp-ink False
  agent2-id 0
  agent2-kind 4
  agent2-known False
  agent2-level 0
  agent2-level-trigger 0
  agent2-sku 61/71 (Q3961/71A)
  agent2-type 4
  agent2-virgin False
  agent3-ack False
  agent3-desc Yellow toner cartridge
  agent3-dvc 0
  agent3-health 0
  agent3-health-desc Good/OK
  agent3-hp-ink False
  agent3-id 0
  agent3-kind 4
  agent3-known False
  agent3-level 19
  agent3-level-trigger 0
  agent3-sku 62/72 (Q3962/72A)
  agent3-type 6
  agent3-virgin False
  agent4-ack False
  agent4-desc Magenta toner cartridge
  agent4-dvc 0
  agent4-health 0
  agent4-health-desc Good/OK
  agent4-hp-ink False
  agent4-id 0
  agent4-kind 4
  agent4-known False
  agent4-level 31
  agent4-level-trigger 0
  agent4-sku 63/73 (Q3963/73A)
  agent4-type 5
  agent4-virgin False
  agent5-ack False
  agent5-desc Drum maintenance kit
  agent5-dvc 0
  agent5-health 0
  agent5-health-desc Good/OK
  agent5-hp-ink False
  agent5-id 0
  agent5-kind 7
  agent5-known False
  agent5-level 40
  agent5-level-trigger 0
  agent5-sku 64 (Q3964A)
  agent5-type 62
  agent5-virgin False
  back-end hp
  cups-printer HP_Color_LaserJet_2840
  cups-uri hp:/net/HP_Color_LaserJet_2840?ip=192.168.56.13
  dev-file
  device-state 1
  device-uri hp:/net/HP_Color_LaserJet_2840?ip=192.168.56.13
  deviceid MFG:Hewlett-Packard;CMD:PJL,PML,MLC,PCL,POSTSCRIPT,PCLXL;M
                                DL:HP Color LaserJet 2840;CLS:PRINTER;DES:Hewlett-Packard
                                Color LaserJet
                                2840;MEM:MEM=64MB;1284.4DL:4d,4e,1;COMMENT:RES=600x2;
  duplexer 1
  error-state 4
  fax-uri hpfax:/net/HP_Color_LaserJet_2840?ip=192.168.56.13
  host 192.168.56.13
  in-tray1 1
  in-tray2 1
  is-hp True
  media-path 1
  panel 1
  panel-line1 Document loaded
  panel-line2
  photo-tray 0
  port 1
  r 0
  revision 254
  rg 000
  rr 000000
  rs 000000000
  scan-uri hpaio:/net/HP_Color_LaserJet_2840?ip=192.168.56.13
  serial CNFC5D70KD
  status-code 1804
  status-desc Low toner.
  supply-door 1
  top-door 4

Model Parameters (static data):
  Parameter Value(s)
  ---------------------------- ----------------------------------------------------------
  align-type 0
  case-model-model1 Color LaserJet 2840
  clean-type 0
  color-cal-type 0
  copy-type 1
  embedded-server-type 1
  fax-type 1
  icon HP_Color_LaserJet_2840.png
  io-control 0
  io-mfp-mode 4
  io-mode 4
  io-scan-port 1
  io-support 6
  linefeed-cal-type 0
  model HP_Color_LaserJet_2840
  model-ui HP Color LaserJet 2840
  panel-check-type 1
  pcard-type 2
  pq-diag-type 0
  r0-agent1-kind 4
  r0-agent1-sku 60 (Q3960A)
  r0-agent1-type 1
  r0-agent2-kind 4
  r0-agent2-sku 61/71 (Q3961/71A)
  r0-agent2-type 4
  r0-agent3-kind 4
  r0-agent3-sku 62/72 (Q3962/72A)
  r0-agent3-type 6
  r0-agent4-kind 4
  r0-agent4-sku 63/73 (Q3963/73A)
  r0-agent4-type 5
  r0-agent5-kind 7
  r0-agent5-sku 64 (Q3964A)
  r0-agent5-type 62
  scan-style 1
  scan-type 2
  status-battery-check 0
  status-dynamic-counters 0
  status-type 3
  support-type 2
  tech-class Postscript
  tech-type 4

Status History (most recent first):
  Date/Time Code Status Description User Job ID
  -------------------- ----- ---------------------------------------- -------- --------
  03/31/2008 23:33:04 1804 Low toner. jbd
  03/31/2008 23:16:03 1804 Low toner. jbd
  03/31/2008 23:07:27 2002 Scan job failed. hplip
  03/31/2008 23:02:32 2002 Scan job failed. hplip
  03/31/2008 23:02:02 2002 Scan job failed. hplip
  03/31/2008 22:53:48 1804 Low toner. jbd
  03/31/2008 22:48:28 2002 Scan job failed. hplip
  03/31/2008 22:28:51 2002 Scan job failed. hplip
  03/31/2008 22:28:22 2002 Scan job failed. hplip
  03/31/2008 22:27:45 2002 Scan job failed. hplip
  03/31/2008 22:22:35 2002 Scan job failed. hplip
  03/31/2008 22:22:07 2002 Scan job failed. hplip
  03/31/2008 22:20:24 2002 Scan job failed. hplip
  03/31/2008 08:22:00 501 Print job has completed. jbd 1005
  03/31/2008 08:21:51 500 The printer has started a print job. jbd 1005
  03/30/2008 13:35:11 501 Print job has completed. jbd 1004
  03/30/2008 13:35:01 500 The printer has started a print job. jbd 1004
  03/14/2008 13:28:32 501 Print job has completed. jbd 964
  03/14/2008 13:28:22 500 The printer has started a print job. jbd 964
  03/07/2008 19:48:55 501 Print job has completed. jbd 951
  03/07/2008 19:48:43 500 The printer has started a print job. jbd 951
  03/07/2008 19:44:03 501 Print job has completed. jbd 949
  03/07/2008 19:43:52 500 The printer has started a print job. jbd 949
  03/06/2008 09:50:13 501 Print job has completed. jbd 948
  03/06/2008 09:50:02 500 The printer has started a print job. jbd 948
  03/06/2008 09:40:24 501 Print job has completed. jbd 947
  03/06/2008 09:40:13 500 The printer has started a print job. jbd 947
  03/06/2008 09:22:29 501 Print job has completed. jbd 946
  03/06/2008 09:22:11 500 The printer has started a print job. jbd 946
  02/24/2008 17:21:44 501 Print job has completed. jbd 926
  02/24/2008 17:21:33 500 The printer has started a print job. jbd 926
  02/24/2008 17:12:59 501 Print job has completed. jbd 923

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Marcel Straub
Solved:
2010-09-20
Last query:
2010-09-20
Last reply:
2010-09-20

Has the scan ever worked? Also please run hp-check -t and post the output.

A

Bruce Dawson (jbd+launchpad) said : #2

Aaron Albright wrote:
> Your question #28585 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/28585
>
> Status: Open => Needs information
>
> Aaron Albright requested for more information:
> Has the scan ever worked? Also please run hp-check -t and post the
> output.
>
> A
>
Thanks for the prompt feedback.

The scanner used to work from both Windows and Debian, but then I
switched to Ubuntu and it hasn't worked since. It also no longer works
from Windows.

There's no hp-check on this system. I believe it doesn't come with
Ubuntu. However, hp-info did find the printer, and its output is in the
original report. Also, note that xsane appears to see the printer, but
can't communicate with it.

--Bruce

Okay this just means that you are using the preinstalled hplip.

Please run

groups

and post the output.

Also if it's possible please upgrade to the latest hplip..

Thanks!

A

Bruce Dawson (jbd+launchpad) said : #4

Output of 'groups' is:

jbd@bruce:~$ groups
jbd root adm dialout cdrom floppy audio dip video plugdev staff lpadmin scanner admin milessmithfarm.net

Upgrading to the latest hplip is not viable at this time (the system has
to come out of production, and that means a new system is required, and
things just go downhill from there.)

--Bruce

Aaron Albright wrote:
> Your question #28585 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/28585
>
> Status: Open => Needs information
>
> Aaron Albright requested for more information:
> Okay this just means that you are using the preinstalled hplip.
>
> Please run
>
> groups
>
> and post the output.
>
> Also if it's possible please upgrade to the latest hplip..
>
> Thanks!
>
> A
>
>

We haven't been able to reproduce this with the latest hplip. If possible please updated to the latest hplip and that may resolve this problem.

A

Hi,

I solved the same problem by setting SNMP community settings to
  Read: public
  Write: public

I got this solution by sniffing the traffic between 2840 and host computer.

Kind regards,
ms

jonatan (jonatan7x) said : #7

Simular problem... here's my HP Check

HP Linux Imaging and Printing System (ver. 2.8.2)
Dependency/Version Check Utility ver. 13.0

Copyright (c) 2001-7 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling
the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper
dependencies are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball
has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode
will check both of the above cases (both compile- and run-time dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait...
warning: Invalid drv_dir value: /usr/share/cups/drv/hp/

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux ubmirce 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686 GNU/Linux

Distribution:
ubuntu 8.04

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.5.2 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
error: SIP not installed or version not found.

Checking for CUPS...
Status: scheduler is running
error: Version: (Not available. CUPS may not be installed or not running.)

------------------------------------
| COMPILE AND RUNTIME DEPENDENCIES |
------------------------------------

note: To check for compile-time only dependencies, re-run hp-check with the -c parameter (ie, hp-check -c).
note: To check for run-time only dependencies, re-run hp-check with the -r parameter (ie, hp-check -r).

Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-ddk - CUPS driver development kit...
OK, found.

Checking for dependency: cups-devel- Common Unix Printing System development files...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes libcupsys2-dev cupsys-bsd

Checking for dependency: gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes openssl

Checking for dependency: libjpeg - JPEG library...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes libjpeg62-dev

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes libsnmp-dev

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes libtool

Checking for dependency: libusb - USB library...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes libusb-dev

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency: PyQt - Qt interface for Python...
OK, found.

Checking for dependency: python-devel - Python development files...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes python2.5-dev

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes libsane-dev

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 2.8.2 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hpssd]
# Note: hpssd does not support dynamic ports
# Port 2207 is the IANA assigned port for hpssd
port=2207

[hplip]
version=2.8.2

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hpijs/HP
ppdbase=/usr/share/ppd/hpijs
doc=/usr/share/doc/hplip-doc/HTML
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
internal-tag=2.8.2.10

-------------------------------
| DISCOVERED PARALLEL DEVICES |
-------------------------------

No devices found.

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

OFFICEJET_R40_3
---------------
Type: Printer
Installed in HPLIP?: Yes, using the hp: CUPS backend.
Device URI: hp:/par/OFFICEJET_R40?device=/dev/parport0
PPD: /etc/cups/ppd/OFFICEJET_R40_3.ppd
PPD Description: HP OfficeJet R40 Foomatic/hpijs, hpijs 2.8.2
Printer status: printer OFFICEJET_R40_3 is idle. enabled since Sun 09 Nov 2008 07:03:48 PM PST
error: Unable to communicate with device (code=12): hp:/par/OFFICEJET_R40?device=/dev/parport0
error: Device not found

OFFICEJET_R40_fax_3
-------------------
Type: Fax
Installed in HPLIP?: Yes, using the hpfax: CUPS backend.
Device URI: hpfax:/par/OFFICEJET_R40?device=/dev/parport0
PPD: /etc/cups/ppd/OFFICEJET_R40_fax_3.ppd
PPD Description: HP Fax
Printer status: printer OFFICEJET_R40_fax_3 is idle. enabled since Sun 09 Nov 2008 06:28:16 PM PST
error: Unable to communicate with device (code=12): hpfax:/par/OFFICEJET_R40?device=/dev/parport0
error: Device not found

PDF
---
Type: Unknown
Installed in HPLIP?: No, not using the hp: or hpfax: CUPS backend.
Device URI: cups-pdf:/
PPD: /etc/cups/ppd/PDF.ppd
PPD Description: Generic PDF file generator
Printer status: printer PDF is idle. enabled since Tue 22 Apr 2008 10:54:42 AM PDT
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend to function in HPLIP.

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
error: Not found. SANE backend 'hpaio' NOT properly setup (needs to be added to /etc/sane.d/dll.conf).

Checking output of 'scanimage -L'...

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.

-----------------
| USB I/O SETUP |
-----------------

Checking for permissions of USB attached printers...

-----------
| SUMMARY |
-----------

error: 14 errors and/or warnings.

Summary of needed commands to run to satisfy missing dependencies:
sudo apt-get install --yes --force-yes libcupsys2-dev cupsys-bsd
sudo apt-get install --yes --force-yes openssl
sudo apt-get install --yes --force-yes libjpeg62-dev
sudo apt-get install --yes --force-yes libsnmp-dev
sudo apt-get install --yes --force-yes libtool
sudo apt-get install --yes --force-yes libusb-dev
sudo apt-get install --yes --force-yes python2.5-dev
sudo apt-get install --yes --force-yes libsane-dev

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html

The Loeki (the-loeki) said : #8

Marcel Straub's answer worked in my scenario (HP Color LaserJet 2840 / Sane on both Ubuntu 10.04 and CentOS 5.5).
The error would either be "device busy" or "Error during device IO" when trying to connect to the JetDirect hpaio:/net/ etc. backend.
(re-)enabling SNMP write solved the problem.

thanks!

Bruce Dawson (jbd+launchpad) said : #9

Enabling SNMP write on the printer did solve the problem. Of course, this does open up security issues, but I'll post another question if I can't get them resolved.

Bruce Dawson (jbd+launchpad) said : #10

Thanks Marcel Straub, that solved my question.

Thanks for your details and comments.

Thanks for your contribution,
Naga Samrat Chowdary, Narla

Carfield Yim (carfield) said : #12

HI, I have similar problem, how to enable SNMP ??

Carfield Yim (carfield) said : #13

It actually saying

Dec 11 02:58:07 (none) xsane: scan/sane/io.c 53: dBus Connection Error (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)!
Dec 11 02:58:10 (none) xsane: io/hpmud/jd.c 88: unable to read device-id

Which process generate /var/run/dbus/system_bus_socket ??