1833851 Members
1909 Online
110063 Solutions
New Discussion

Re: unknown printer

 
mobidyc
Trusted Contributor

unknown printer

Hello,

when i launch 'lpstat -p' is see an unknown printer that i can't delete through sam (the printer 10_1):
printer parprint4050 is idle. enabled since May 15 14:13
fence priority : 0
printer 10_1 disabled since Oct 23 14:57 -
new printer
fence priority : 0

i've searched through /etc/lp/interface and /var/spool/lp without success.

where can i look for it ?

thanks in advance

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
6 REPLIES 6
Yang Qin_1
Honored Contributor

Re: unknown printer

Did you try "lpadmin -x10_1" ?
mobidyc
Trusted Contributor

Re: unknown printer

Yes, lpadmin doesn't know it :

# lpadmin -x10_1
lpadmin: destination "10_1" non-existent

# lpstat -p |head -5
printer parprint4050 is idle. enabled since May 15 14:13
fence priority : 0
printer 10_1 disabled since Oct 23 14:57 -
new printer
fence priority : 0

# /usr/sam/lbin/lpmgr -l |head -6
RUNNING
off

local name:type:enabled:accepting:location:fence:class
10_1:--:no:--:--:0: :
HPSI:network:yes, idle:yes:-:0: :

i really don't know where it can be declared.

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
Yang Qin_1
Honored Contributor

Re: unknown printer

I'm sure you tried all following steps, but can you review it again and make sure you didn't miss a step

1. Stop the lp spooler.
# /usr/sbin/lpshut
2. reject and disable the printer
# /usr/sbin/reject 10_1
# /usr/bin/disable 10_1 (it is already disabled)
3. check for jobs in the queue
# /usr/bin/lpstat -o10_1
# /usr/bin/cancel 10_1 (if there is a job)
4. Remove the printer
# /usr/sbin/lpadmin -x10_1
5. Restart the spooler
# /usr/sbin/lpsched

Yang
mobidyc
Trusted Contributor

Re: unknown printer

the problem is that i can't identify this printer '10_1'

# /usr/sbin/reject 10_1
/usr/sbin/reject: destination "10_1" non-existent
# /usr/bin/lpstat -o10_1
/usr/bin/lpstat: "10_1" not a request id or a destination
no entries
# /usr/sbin/lpadmin -x10_1
/usr/sbin/lpadmin: destination "10_1" non-existent

i found this printer in:
# strings /var/spool/lp/pstatus |grep 10_1
10_1
10_1

but if i do:
lpshut ;
>/var/spool/lp/pstatus ;
lpsched

lpstat -p indicates that there is no more printers ;(

how can i extract the printer in fault from this binary file ?

very strange situation

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
Bill Hassell
Honored Contributor

Re: unknown printer

Your pstatus and qstatus files have become corrupt, or someone logged in as root removed files in the spooler directories. Because the status files are binary, there is no way to fix them so you'll have to remove all the printers that you can (hint: lpshut then lpadmin -x for each printer). Once all the working printers have been removed, zero out the status files:

cd /var/spool/lp
> pstatus
> qstatus
> outputq

Then verify that the spooler hasn't been corrupted by wrong permissions, ownerships or missing files:

swverify PrinterMgmt

Fix any problems then add your printers back again.


Bill Hassell, sysadmin
mobidyc
Trusted Contributor

Re: unknown printer

Thanks all for your help i have solved my problem with the following commands:

mkdir /var/spool/lp/request/10_1
touch /etc/lp/interface/10_1
touch /etc/lp/member/10_1
chmod 755 /var/spool/lp/request/10_1 /etc/lp/interface/10_1 /etc/lp/member/10_1
chown lp:bin /var/spool/lp/request/10_1 /etc/lp/interface/10_1 /etc/lp/member/10_1
lpshut
lpadmin -x10_1
lpsched

my problem is now solved ;)

Best Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard