Operating System - HP-UX
1824976 Members
4018 Online
109678 Solutions
New Discussion юеВ

lp printing goes to wrong printer

 
Hank Eggers
Frequent Advisor

lp printing goes to wrong printer

In our network we use only HP laser printers and a few HP inkjets. I add the printer to "/etc/hosts" and then use jetdirect to add the printer. Everything works fine.

Now every few days someone prints to their regular printer that they always use and the print show up at another campus! They send another print and it comes out on their printer fine.

Any idea why this would happen? Would shutting down the scheduler to add another printer cause this? Any log files or debugging I can turn on to see what might be happening?

In our network we probably have 100 printers and this happens on 1-2 printers a few times a week.

Thanks for any help you can provide!
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: lp printing goes to wrong printer

You could invoke lpsched with the '-v' option. From the lpsched man page:

lpsched recognizes the following options:

-v Write a verbose record of the lpschedb process on /var/adm/lp/log.

-a Write lpana(1M) logging data on
/var/adm/lp/lpana.log.
Paul Sperry
Honored Contributor

Re: lp printing goes to wrong printer

Have you set the default printer on the system?

lpadmin -d
Hank Eggers
Frequent Advisor

Re: lp printing goes to wrong printer

Thanks for the logging info...

Also, I do not have a default printer assigned on the system...Could this be a problem?
Patrick Wallek
Honored Contributor

Re: lp printing goes to wrong printer

Not having a default printer set up for the machines should not cause the problem you are seeing. The only time you would see an issue is you try to print something without specifying a destination printer.

# lp filename

A. Clay Stephenson
Acclaimed Contributor

Re: lp printing goes to wrong printer

One thing that could do this very easily is if you have
defined a printer class with more than one printer in the class. If someone then sent a job to a class (which looks justs like -dmyprinter), if the first printer in the class were busy, it would send the job to the next available printer in the class.

The other thing that I would check is how the printers get their IP addresses. If hard set, then someone may be reconfiguring printers. If IP addresses are assigned via bootp then you may have different bootp IP entries for the same MAC address on different bootp servers.

When you see this happen again, you really need to determine the IP address of the printer while you are actually seeing the behavior.

If it ain't broke, I can fix that.
Rajeev  Shukla
Honored Contributor

Re: lp printing goes to wrong printer

Also take care that the network printers are not configured for DHCP address. Sometimes the configuration on the printer resets and when you swicth them on they pickup an IP. SO the best way to diagnose is when this problem occurs check the IP address of the printer where the printout has come out and check the IP of printer where it should have printer and then verify with the printer configuration.

Cheers
Rajeev
A. Clay Stephenson
Acclaimed Contributor

Re: lp printing goes to wrong printer

After thinking about this a bit more, I'm fairly sure that your have an IP address problem especially if you are using dhcpd - with /etc/hosts. If you are going to use dhcpd then you must configure for a fixed address (using the printer's MAC address) or you must use dynamic DNS that is updated by dhcpd. If you are not using fixed IP addresses then you absolutely, positively can't use a hosts file.

I think what is happening is that a dhcp lease is expiring and another printer claims a previously used IP address. Because your /etc/hosts file knows nothing about this, what was printerA is now printerB.

Fixed IP address assignmnt by bootpd or dhcpd or by the front-panel will almost certainly fix you but you will need to check every printer on your system.
If it ain't broke, I can fix that.
Hank Eggers
Frequent Advisor

Re: lp printing goes to wrong printer

Well the funny thing is that ALL of our printers are setup with static IP addressess..and normally print fine.

Also, just to clarify, this is what happens:

1) send print to printer A - prints fine.

2) send print to printer A - goes to another networked printer.

3) send print to printer A - prints fine..

The printing of the 3 above reports would occur one after another..within 5 minutes..