Operating System - HP-UX
1838685 Members
4644 Online
110128 Solutions
New Discussion

Print already exist (L2000 running Unix 11)

 
Peder Nielsen
New Member

Print already exist (L2000 running Unix 11)

Have a system with no print queues but when I try to add an print queue using sam it says that the print queue already exist. Have setup multiply IP and queues in the hosts file. Get the same message for each.
Hope some one can help me.
6 REPLIES 6
Robert-Jan Goossens
Honored Contributor

Re: Print already exist (L2000 running Unix 11)

Hi,

Maybe somebody did not remove these printers correct in the past.

Try running
# lpadmin -rprinter_name
or
# lpadmin -xprinter_name

Regards,
Robert-Jan
Peder Nielsen
New Member

Re: Print already exist (L2000 running Unix 11)

Ran the lpadmin and it says that the queues do not exist
Paul Sperry
Honored Contributor

Re: Print already exist (L2000 running Unix 11)

John Poff
Honored Contributor

Re: Print already exist (L2000 running Unix 11)

Hi,

You could take a look in the /var/spool/lp/request directory to see what print queues the system already knows about.

JP
Mark Grant
Honored Contributor

Re: Print already exist (L2000 running Unix 11)

I've been here many times on all sorts of different unix systems (except AIX because it's printing is completely screwy but at least you don't get this little gem)

Basically when you try and set up a printer with lpadmin it says it already exists and when you try and remove it, it says it doesn't exist. It's a bit like talking to a tax consultant.

The only solution I have found is to remove, manually, all the printer config stuff yourself.

Stop the scheduler with "lpshut"

Take a copy of the whole of /var/spool/lp and /etc/lp just to be on the safe side.

Remove anything in /var/spool/lp/interfaces. Remove any directories in /var/spool/lp/request

Try creating a printer now, it might not work so continue...

I might start getting filenames wrong at this point as I don't have a sys V print system to hand but you may need to zero the queue file which I think is called pqueue with "> pqueue". You can also remove the "seqfile" just in case. If there are similar files in /etc/lp (can't quite remember) them remove these too.

There may be one or two other files but this should do for now.

Don't forget to restart the scheduler with "lpsched"



Never preceed any demonstration with anything more predictive than "watch this"
Bill Hassell
Honored Contributor

Re: Print already exist (L2000 running Unix 11)

'ghost' printers get created when the system isn't up to date on patches or someone has been trying to configure HP-US printing (aka, SysV) using knowledge from a BSD system like Linux. There are probably leftover files in /var/spool/lp/interface or there were files there but they were removed (only lpadmin should create/delete files in the spooler directories). As mentioned, clear out the /var/spool/lp/interface directory, then zero pstatus, qstatus and outputq:

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

That should get things back to normal. If not, someone may have messed up permissions and other files/programs. Run swverify to check on printer software:

swverify PrinterMgmt


Bill Hassell, sysadmin