Operating System - HP-UX
1829126 Members
2125 Online
109986 Solutions
New Discussion

Printer already exists while adding remote printer through SAM

 
Sharad Kowarkar
Occasional Advisor

Printer already exists while adding remote printer through SAM

Hello, I encountered an error while adding a remote printer. The error messages says that "Printer Already exists", But in reality there is no such printer exists"
This error is actually issued by lpmgr. While searching on "lpmgr" I found that the patch PHCO_23876 has been applied. Is there any solution on this because we are not able to create a printer from sam.
This error was not there before we upgrade our OS. The above mentioned patch was part of OS upgrade.
Before that everything was normal and even my other servers which I've not upgraded are fine. Please Help.
Consistency in quality,speed and change is what we need.
6 REPLIES 6
Ravi_8
Honored Contributor

Re: Printer already exists while adding remote printer through SAM

Hi, sharad
since your system showing that printer alreday exist even if physically not there, remove the printer from thru SAM and add again.
never give up
Sharad Kowarkar
Occasional Advisor

Re: Printer already exists while adding remote printer through SAM

Nope, Ravi SAM doesn't list that printer name it only displays error message while trying to add a new remote printer.
Consistency in quality,speed and change is what we need.
Bill Alger
Occasional Advisor

Re: Printer already exists while adding remote printer through SAM

Some times SAM doesn't do a good job of removing printers. Try this:
lpadmin -xprinter_name

If you still have a problem you might need to manually remove the printer. Try creating these files owned by LP:

/usr/spool/lp/member/printer_name
/usr/spool/lp/interface/printer_name

and a Dir owned by LP:
/usr/spool/lp/request/printer_name

Then you should be able to use SAM or the above lpadmin -x command.
Barney Timms
Occasional Advisor

Re: Printer already exists while adding remote printer through SAM

Hi Sharad,

I have just experienced the same problem. I was unable to add a NEW remote printer via SAM, and had the same error message "Printer Alreay Exists". Is this a BUG??????

Anyway I got around it by using lpadmin to add the printers.

/usr/sbin/lpadmin -plocal_name -v/dev/null -mrmodel -ocmrcmodel -osmrsmodel -ormremote_server -orpremote_name -v/dev/null

After that refreshed SAM and new printer was displayed.
Sharad Kowarkar
Occasional Advisor

Re: Printer already exists while adding remote printer through SAM

Hi Everyone, I've found the reason why it SAM say the printer already exists. SAM uses /usr/sam/lbin/lpmgr to manage remote printer. The "lpmgr" script which was installed as part of (What I've found) patch PHCO_23876. I went trough the script. IT is one of the function -could be the local_name_in_use- which uses parameter local_pname to verify whether the printer exists.
Hence I've written my own script which uses lpadmin and other series od commands as a part of printer creation.
Alternatively we can also copy backup original vaerion of "lpmgr" script which I've already done. And I'm able to create printer through SAM now.
Find below th original attached script "lpmgr" rename your existing script and copy this script. Then try. It works.
Consistency in quality,speed and change is what we need.
SteveKirby
Frequent Advisor

Re: Printer already exists while adding remote printer through SAM

Your script solved my problem as well. Thanks. I hope support is listening to this.