Skip to content

Instantly share code, notes, and snippets.

@dkoneill
Last active January 12, 2023 09:03
Show Gist options
  • Select an option

  • Save dkoneill/6a32e5aede25f11a3ece66ccd838c6db to your computer and use it in GitHub Desktop.

Select an option

Save dkoneill/6a32e5aede25f11a3ece66ccd838c6db to your computer and use it in GitHub Desktop.
Ubuntu 20.04 CUPS HP Printer io/hpmud/jd.c 94: unable to read device-id
The following error message is logged to /var/log/syslog by hpcups and indicates that the CUPS subsystem
is attempting to query the SNMP 'public' community name to retrieve printer device information.
io/hpmud/jd.c 94: unable to read device-id
Unfortunately this stops the hp cups subsystem from printing with the following error in /var/log/syslog
prnt/backend/hp.c 825: INFO: open device failed stat=12: hp:/net/HP_LaserJet_P2035n?ip=10.10.0.25; will retry in 30 seconds...
A look at the code base for jd.c shows that an SNMP query failure generates the "unable to read device-id" error message
https://fossies.org/linux/hplip/io/hpmud/jd.c
My solution to this issue was to open the HP LaserJet configuration web page, go to the SNMP settings
and select "Enable SNMP v1/v2 read-only access (uses 'public' for the Get Community Name)
Then CUPS was restarted (systemctl stop cups; systemctl start cups) and printing of the documents in queue commenced
with no further errors in /var/log/syslog.
@jbhardman
Copy link

Than you thank you thank you. I had disabled snmp v1/v2 and forgotten about it. Then my printer wouldn't work. This fixed it!

@dkoneill
Copy link
Author

dkoneill commented Oct 1, 2022

Glad you found the information helpful.

@xmstspider
Copy link

Glad you found the information helpful.

Oh thank you, found this solution today, in my case the culprit was checkbox "Disable SNMPv1/v2 default Get Community Name of 'public'." which I checked recently.

After I unchecked this, the printer started working immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment