Operating System - HP-UX
1826704 Members
2557 Online
109696 Solutions
New Discussion

I have to cancel first print job in queue for others to print.

 
SOLVED
Go to solution
Jesse Roberts
New Member

I have to cancel first print job in queue for others to print.

Occassionally we get a queue that stops printing but if I cancel the first job then the other jobs will print. My question is what are the possible reasons a print job would stop the queue? We are using HP UX 11i if that helps with any insight:) We appreciate any help given. Thanks

Jesse
6 REPLIES 6
Bill Hassell
Honored Contributor

Re: I have to cancel first print job in queue for others to print.

What is the status of the printer? Is the queue disabled. Anyone can disable the queue. Unfortunately, there is no status checking on local or remote printers so they hang because of some problem with the hardware (paper jam, offline) or network or server problems for remote printers. If you have HP JetDirect LAN interfaces and set the printers up using hppi, then you can trace the handshaking details. There is a hpnpadmin -v command that can return a lot network details.


Bill Hassell, sysadmin
Jesse Roberts
New Member

Re: I have to cancel first print job in queue for others to print.

Ok here is more information that I should have provided up front, sorry I am new to the forums and this avenue of support mechs...
The printer status is ready and the queue is not disabled as far as I know because if I cancel the top job the others in the queue print fine. I believe it may be a specific print job that is holding up the queue but how do I determine that is the case? Can I redirect the top print job instead of canceling? Can I open the file on Unix of the print job and look or will that even tell me anything? Thanks Bill for the reply:)
Bill Hassell
Honored Contributor

Re: I have to cancel first print job in queue for others to print.

We'll still need to know how the printer is attached to your system. Is there a data cable from the printer to the serial or parallel port, or is the printer attached to a different computer? Or is it a stand-alone network printer? If so, is the LAN card an HP JetDirect interface, or a non-HP LAN card.

To determine the status of a printer, use the command:

lpstat -pPrinter_Queue

To see information on all the queues:

lpstat -t

As far as a specific print job causing the problem, once the queue hangs up, you can copy the print job by cd'ing to:

/var/spool/lp/request/
(Printer_Queue is the name of your printer in HP-UX. You'll find several files starting with d or c. The c-files are ASCII control files (you can look at these if you want), but the d-files are the actual print files as submitted to the spooler. The print request number is stored in characters 3-6 followed by the computer's name. The file that might be causing the prolem will have the same id number as the currently printing job. Copy this file to /var/tmp.

As far as the data hanging the printer, you can test this by simply printing the file that you copied to /var/tmp. If it hangs again, there is something wrong with the file. Figuring out what the problem is will require a tech-ref manual for the printer and the file decoded with all special characters showing. To show invisible characters, use the cat -v command. To see the exact hex code for everything:

xd -xc file_name


Bill Hassell, sysadmin
Jesse Roberts
New Member

Re: I have to cancel first print job in queue for others to print.

Well, the HP LJ4250 printer is attached to the ether through a switched network to the HP box by an internal jet direct. Both the HP Unix box and the printer are on the same subnet running at 100full. The printer is printed to by several windows systems as well by the same ether network. The HP LJ4250 printer has an internal HP jetdirect card, J7949E, with firmware version v.28.43.FF. The printer has no other connections to any other devices other than the ethernet. When I mentioned that the printer was ready, I should have said idle. The printer was just ready and waiting and actually printed other jobs from other systems while the HPUX queue was held up until I canceled the top job then it happily went on about its printing along with the other systems in our network that sent jobs to this printer. Sorry Bill I will try to be better about providing more detailed information:) Thanks
Bill Hassell
Honored Contributor
Solution

Re: I have to cancel first print job in queue for others to print.

Thanks for the details. The good news is that HP JetDirect connections have a lot of debug features to help understand the problem. There are two possibilities: network problems (handshake, communication problems in the JetDirect card, etc) and print-job problems.

The easiest question to resolve is the job-specific problem. While you can move a print job from one printer to another, it involves shutting down the spooler first, and if you have many printers on the HP-UX system that are commonly busy, all the active print jobs will stop and have to start over when you shutdown the spooler. Just use my previous post about getting a copy of the d-file from the request directory. Then try reprinting this job on the same printer. If it goes through OK, the problem is with network handshaking. If it hangs again, the look at the file itself, specifically the first dozen lines or so, using the cat -v and xd -xc commands. Look for all the printer commands (anything that starts with ESC or hex 1B/1b). If there are such codes, then the application which created the file is likely incompatible with the new printer. Some apps never update their printer code which may be a dozen years old.

If the data file prints OK, then the hang is likely due to network protocol problems. While you can trace the protocol, there probably isn't any way to predict when the problem will occur and the network traces will be massive in size, even for a few hours of printing. I would start by updating the firmware for the JDI interface (JetDirect Inside). The JDI capability referes to the integration of JetDirect LAN printing into the printer's formatter. Previous cards were plug-in options. Here is a description on how to get the latest firmware:

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c00172337

and to get the latest firmware:

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpj07429

See if that solves the problem. Other techniques:

- Download the latest version of HPPI software (HP Printer Installer, aka, JetDirect for HP-UX). Find it at:

http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?taskID=135&pnameOID=18922&prodTypeId=18972&locale=en_US〈=English+%28US%29&prodSeriesId=27349&swEnvOID=7

- Use hpnpadmin to look at the card stats. This is found in the HPPI directory: /opt/hpnpl/bin

- Lastly, you can trace each job at the network level. The actual program that does the LAN communication is hpnpf (/opt/hpnpl/bin) and you can even run it directly as in:

/opt/hpnpl/bin/hpnpf -x 12.34.56.78 -N /etc/profile

which will print /etc/profile. Or you can tell each lp job to write the protcol to a file with the -odebugm option. See the man page for net_ljx000.


Bill Hassell, sysadmin
Jesse Roberts
New Member

Re: I have to cancel first print job in queue for others to print.

The print process has been changed from going through the Unix queue to being application driven with the Healthcare System we have doing the formatting instead of the jetadmin driver...at least I think I said that right:) Anyways so far no problems but I would have liked to have tried some of the wisdom you presented to me and I most likely will get the chance some day. I do appreciate the help, patience, and education you have provided me:) Thanks Bill.