Bug 747166 - If you disable SNMP community public on the printer printing fails
Summary: If you disable SNMP community public on the printer printing fails
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 14
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-19 01:07 UTC by pgaltieri
Modified: 2012-08-16 16:34 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-16 16:34:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description pgaltieri 2011-10-19 01:07:18 UTC
Description of problem:
I have 2 hp printers with web access.  If I configure both printers with a specific SNMP community name and disable the public SNMP community name the print system can no longer access the printers.  Furthermore when I use hp-setup to configure the printer there is no way to provide an SNMP community name.  In order to get printing to work I have to re-enable support for the public SNMP community name.

Version-Release number of selected component (if applicable):
hplip-3.11.7-2

How reproducible:
If I disable the public SNMP community name via the web interface to the printer I am no longer able to print.

Steps to Reproduce:
1. Connect to hp printer via a browser.  Go to networking and disable the SNMP
public community name.
2. Run hp-setup and attempt to connect to the printer by specifying the network
printer's IP address
3.
  
Actual results:
hp-setup cannot find the printer.  The error provided is

error: No devices found on bus: net

Expected results:
That it would find the printer or at least provide some useful error indicating it tried to use the public SNMP community name and it failed.

Additional info:

Comment 1 Tim Waugh 2011-10-19 09:21:25 UTC
If you try configuring the printer by using system-config-printer instead of hp-setup, does that succeed?

Comment 2 pgaltieri 2011-10-19 16:09:16 UTC
With the SNMP public community disabled I am able to configure the printer with system-config-printer, however it does not automatically identify the printer.  It requires me to select the printer from the database.  So it appears to have a similar issue.  The difference is that system-config-printer defaults to manual entry of the printer information while hp-setup just gives up.

If I enable the public SNMP community then system-config-printer is able to correctly identify the printer.  However, having determined the correct printer system-config-printer does not then download the plugin to allow support for scanning which hp-setup does.

The hp tools for printer configuration should do something similar.  If they cannot explicitly find the printer then they should allow for manual entry of the printer information, or at least during manual disovery ask for the SNMP community name since an alternate community name can be provided for the printer.

Comment 3 pgaltieri 2011-10-19 16:57:40 UTC
Here is the output of running system-config-printer

[root@peglaptopw ~]# system-config-printer
Caught non-fatal exception.  Traceback:
File "/usr/share/system-config-printer/system-config-printer.py", line 5204, in fillDeviceTab
    ipp_allowed = f.check_ipp_client_allowed ()
File "/usr/share/system-config-printer/firewall.py", line 77, in check_ipp_client_allowed
    self.ALLOW_IPP_CLIENT]))
File "/usr/share/system-config-printer/firewall.py", line 60, in _check_any_allowed
    (args, filename) = self._get_fw_data ()
File "/usr/share/system-config-printer/firewall.py", line 47, in _get_fw_data
    self._fw_data = pickle.loads (p.encode ('utf-8'))
File "/usr/lib64/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: '['
Continuing anyway..
PASSTHRU
'\x00'
ps
timed out
lp
'\x00'
PORT1
'\x00'

'\x00'
LPT0
'\x00'
LPT0_PASSTHRU
'\x00'
COM0
'\x00'
COM0_PASSTHRU
timed out
LPT1
'\x00'
LPT1_PASSTHRU
'\x00'
COM1
'\x00'
COM1_PASSTHRU
'\x00'
LPT2
'\x00'
LPT2_PASSTHRU
timed out
COM2
'\x00'
COM2_PASSTHRU
'\x00'
LPT3
'\x00'
LPT3_PASSTHRU
'\x00'
COM3
'\x00'
COM3_PASSTHRU
'\x00'
LPT4
'\x00'
LPT4_PASSTHRU
'\x00'
COM4
timed out
COM4_PASSTHRU
'\x00'
LPT5
'\x00'
LPT5_PASSTHRU
'\x00'
COM5
'\x00'
COM5_PASSTHRU
'\x00'
LPT6
'\x00'
LPT6_PASSTHRU
'\x00'
COM6
timed out
LPT7
'\x00'
LPT7_PASSTHRU
'\x00'
COM7_PASSTHRU
'\x00'
No ID match for device lpd://10.0.0.72/PASSTHRU:
MFG:;MDL:;
Using textonly.ppd (status: 3)
Caught non-fatal exception.  Traceback:
File "/usr/share/system-config-printer/system-config-printer.py", line 5204, in fillDeviceTab
    ipp_allowed = f.check_ipp_client_allowed ()
File "/usr/share/system-config-printer/firewall.py", line 77, in check_ipp_client_allowed
    self.ALLOW_IPP_CLIENT]))
File "/usr/share/system-config-printer/firewall.py", line 60, in _check_any_allowed
    (args, filename) = self._get_fw_data ()
File "/usr/share/system-config-printer/firewall.py", line 47, in _get_fw_data
    self._fw_data = pickle.loads (p.encode ('utf-8'))
File "/usr/lib64/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: '['
Continuing anyway..
**** Incorrect IEEE 1284 Device ID: [u'drv:///hp/hpcups.drv/hp-laserjet_m1522nf_mfp-pcl3.ppd']
**** Actual ID is MFG:Hewlett-Packard;MDL:HP LaserJet M1522nf MFP;
**** Please report a bug against the HPLIP component
Using drv:///hp/hpcups.drv/hp-laserjet_m1522nf_mfp-pcl3.ppd (status: 0)
Caught non-fatal exception.  Traceback:
File "/usr/share/system-config-printer/system-config-printer.py", line 5204, in fillDeviceTab
    ipp_allowed = f.check_ipp_client_allowed ()
File "/usr/share/system-config-printer/firewall.py", line 77, in check_ipp_client_allowed
    self.ALLOW_IPP_CLIENT]))
File "/usr/share/system-config-printer/firewall.py", line 60, in _check_any_allowed
    (args, filename) = self._get_fw_data ()
File "/usr/share/system-config-printer/firewall.py", line 47, in _get_fw_data
    self._fw_data = pickle.loads (p.encode ('utf-8'))
File "/usr/lib64/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: '['
Continuing anyway..
No ID match for device socket://10.0.0.72:9100:
MFG:;MDL:;
Using textonly.ppd (status: 3)

Note the messages marked with the **** above.

Comment 4 Jiri Popelka 2011-10-19 17:25:27 UTC
The traceback seems like bug #722992 / bug #722991.
What does 'rpm -q system-config-printer system-config-firewall' show ?
Does '/usr/lib/cups/backend/snmp <ip-address-of-printer>' show anything ?

Comment 5 pgaltieri 2011-10-19 18:08:30 UTC
rpm -q system-config-printer system-config-firewall shows:

system-config-printer-1.2.8-2.fc14.x86_64
system-config-firewall-1.2.27-2.fc14.noarch

Running /usr/lib/cups/backend/snmp 10.0.0.72 displays nothing.  I tried with the public community string disabled and with it enabled and in both cases no output.

Comment 6 Tim Waugh 2011-10-20 15:06:11 UTC
Please edit (or create) /etc/cups/snmp.conf and add this line:

Community name

where name is the SNMP community configured for the printer.  Do things work better after doing this?

Comment 7 pgaltieri 2011-10-20 17:02:30 UTC
I disabled the public community on the printer and added the printer community to the /etc/cups/snmp.conf.  Here's the output from system-config-printer.

[root@peglaptopw ~]# system-config-printer
Caught non-fatal exception.  Traceback:
File "/usr/share/system-config-printer/system-config-printer.py", line 5204, in fillDeviceTab
    ipp_allowed = f.check_ipp_client_allowed ()
File "/usr/share/system-config-printer/firewall.py", line 77, in check_ipp_client_allowed
    self.ALLOW_IPP_CLIENT]))
File "/usr/share/system-config-printer/firewall.py", line 60, in _check_any_allowed
    (args, filename) = self._get_fw_data ()
File "/usr/share/system-config-printer/firewall.py", line 47, in _get_fw_data
    self._fw_data = pickle.loads (p.encode ('utf-8'))
File "/usr/lib64/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: '['
Continuing anyway..
PASSTHRU
'\x00'
ps
'\x00'
lp
'\x00'
PORT1
'\x00'

'\x00'
LPT0
'\x00'
LPT0_PASSTHRU
'\x00'
COM0
'\x00'
COM0_PASSTHRU
'\x00'
LPT1
'\x00'
LPT1_PASSTHRU
'\x00'
COM1
'\x00'
COM1_PASSTHRU
'\x00'
LPT2
'\x00'
LPT2_PASSTHRU
'\x00'
COM2
'\x00'
COM2_PASSTHRU
'\x00'
LPT3
'\x00'
LPT3_PASSTHRU
'\x00'
COM3
'\x00'
COM3_PASSTHRU
'\x00'
LPT4
'\x00'
LPT4_PASSTHRU
'\x00'
COM4
'\x00'
COM4_PASSTHRU
'\x00'
LPT5
'\x00'
COM5
'\x00'
COM5_PASSTHRU
'\x00'
LPT6
'\x00'
LPT6_PASSTHRU
'\x00'
COM6
'\x00'
COM6_PASSTHRU
'\x00'
LPT7
'\x00'
LPT7_PASSTHRU
'\x00'
COM7
'\x00'
COM7_PASSTHRU
'\x00'
pr0
'\x00'
pr1
'\x00'
pr2
'\x00'
pr3
'\x00'
pr4
'\x00'
pr5
'\x00'
pr6
'\x00'
pr7
'\x00'
pr8
'\x00'
pr9
'\x00'
pr10
'\x00'
pr11
'\x00'
pr12
'\x00'
pr13
'\x00'
pr14
'\x00'
pr15
'\x00'
pr16
'\x00'
pr17
'\x00'
pr18
'\x00'
pr19
'\x00'
pr20
'\x00'
pr21
'\x00'
pr22
'\x00'
pr23
'\x00'
pr24
'\x00'
pr25
'\x00'
pr26
'\x00'
pr27
'\x00'
pr28
'\x00'
pr29
'\x00'
pr30
'\x00'
pr31
'\x00'
pr32
'\x00'
pr33
'\x00'
pr34
'\x00'
pr35
'\x00'
pr36
'\x00'
pr37
'\x00'
pr38
'\x00'
pr39
'\x00'
pr40
'\x00'
pr41
'\x00'
pr42
'\x00'
pr43
'\x00'
pr44
'\x00'
pr45
'\x00'
pr46
'\x00'
pr47
'\x00'
pr48
'\x00'
pr49
'\x00'
params.c:OpenConfFile() - Unable to open configuration file "/root/.smb/smb.conf":
	No such file or directory
params.c:OpenConfFile() - Unable to open configuration file "/root/.smb/smb.conf.append":
	No such file or directory
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
**** Incorrect IEEE 1284 Device ID: [u'drv:///hp/hpcups.drv/hp-laserjet_m1522nf_mfp-pcl3.ppd']
**** Actual ID is MFG:Hewlett-Packard;MDL:HP LaserJet M1522nf MFP;
**** Please report a bug against the HPLIP component
Using drv:///hp/hpcups.drv/hp-laserjet_m1522nf_mfp-pcl3.ppd (status: 0)

I was able to automatically configure the printer so it looks like it was able to access the printer using the configured community name.  What's strange is that it prompted me for samba authentication for the printer.

I reset the /etc/cups/snmp.conf back to its original state and reset my printer back to enable the public snmp community and tried to configure the printer.  Again I was asked to samba configuration.  I clicked on cancel and it then completed the printer configuration.

I power cycled the printer and retried the config and this time I got:

[root@peglaptopw ~]# system-config-printer
Caught non-fatal exception.  Traceback:
File "/usr/share/system-config-printer/system-config-printer.py", line 5204, in fillDeviceTab
    ipp_allowed = f.check_ipp_client_allowed ()
File "/usr/share/system-config-printer/firewall.py", line 77, in check_ipp_client_allowed
    self.ALLOW_IPP_CLIENT]))
File "/usr/share/system-config-printer/firewall.py", line 60, in _check_any_allowed
    (args, filename) = self._get_fw_data ()
File "/usr/share/system-config-printer/firewall.py", line 47, in _get_fw_data
    self._fw_data = pickle.loads (p.encode ('utf-8'))
File "/usr/lib64/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: '['
Continuing anyway..
params.c:OpenConfFile() - Unable to open configuration file "/root/.smb/smb.conf":
	No such file or directory
params.c:OpenConfFile() - Unable to open configuration file "/root/.smb/smb.conf.append":
	No such file or directory

This time I was not prompted for samba authentication, and it configured the printer.

I disabled public community on the printer and updated the community string in /etc/cups/snmp.conf and reconfigured the printer an I got the following:

[root@peglaptopw ~]# system-config-printer
Caught non-fatal exception.  Traceback:
File "/usr/share/system-config-printer/system-config-printer.py", line 5204, in fillDeviceTab
    ipp_allowed = f.check_ipp_client_allowed ()
File "/usr/share/system-config-printer/firewall.py", line 77, in check_ipp_client_allowed
    self.ALLOW_IPP_CLIENT]))
File "/usr/share/system-config-printer/firewall.py", line 60, in _check_any_allowed
    (args, filename) = self._get_fw_data ()
File "/usr/share/system-config-printer/firewall.py", line 47, in _get_fw_data
    self._fw_data = pickle.loads (p.encode ('utf-8'))
File "/usr/lib64/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: '['
Continuing anyway..
params.c:OpenConfFile() - Unable to open configuration file "/root/.smb/smb.conf":
	No such file or directory
params.c:OpenConfFile() - Unable to open configuration file "/root/.smb/smb.conf.append":
	No such file or directory
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding
Receiving SMB: Server stopped responding

And again it asked for samba authentication.  The new printer config reported it could not find a printer at the provided address.  I was able to ping the address and was able to run a snmpwalk on the address with the snmp community in /etc/cups/snmp.conf.  

This is getting really strange.  After power cycling the printer if I disable the public community on the printer I can no longer configure the printer even if I specify the snmp community in /etc/cups/snmp.conf.  If I re-enable the public community on the printer then I am able to configure the printer.  This is not what I was seeing before I power cycled the printer.  And I still don't understand the "Receiving SMB" stuff which was never present when I initially reported this problem.

Comment 8 Tim Waugh 2011-10-21 08:54:58 UTC
To eliminate other issues, could you please test by running this command?:

/usr/lib/cups/backend/snmp

It should find your printer if the community name matches.

Comment 9 pgaltieri 2011-10-21 13:50:07 UTC
with the community name set to public in /etc/cups/snmp

network socket://10.0.0.73 "HP LaserJet 2100 Series" "HP LaserJet 2100 Series" "MANUFACTURER:Hewlett-Packard;COMMAND SET:PJL,MLC,PCL,PCLXL,POSTSCRIPT;MODEL:HP LaserJet 2100 Series;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard LaserJet 2100 Series" ""

with community name set to PrintSys in /etc/cups/snmp

network socket://10.0.0.71 "HP Color LaserJet 2605dn" "HP Color LaserJet 2605dn" "" "Boise, ID, USA"

It does not find the printer.  However,

snmpwalk -c PrintSys -v 1 10.0.0.72

does work

Comment 10 Tim Waugh 2011-10-21 14:18:50 UTC
What does this say?

snmpwalk -c PrintSys -v 1 10.0.0.72 1.3.6.1.4.1.2699.1.2.1.2.1.1.3.1

Comment 11 Fedora End Of Life 2012-08-16 16:34:28 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.