Operating System - HP-UX
1838458 Members
3145 Online
110126 Solutions
New Discussion

Re: Error message from lp

 
SOLVED
Go to solution
Marty Metras
Super Advisor

Error message from lp

I have been getting an error message from "lp" sent root with an error message about a printer queue. This Message: "error code 2 in request WGFLASER-2802 on printer WGFLASER"
I have a time stamp when the message was sent. I can find the job. I can see that job log that sent the text to the print queue.
So here is my problem. What is "error code 2"?
Looks like it is processing OK. This printer is a HP laser jet using a Jetdirect server.
It is one of thing that bugs me.
This is HP-UX 11.0. There are 2 printer queues doing this in 2 different states.
Can you help me figure this out? Logs some where?
Marty


The only thing that always remain the same are the changes.
7 REPLIES 7
Christopher McCray_1
Honored Contributor

Re: Error message from lp

Hi,

Chec out this link:

http://us-support3.external.hp.com/cki/bin/doc.pl/sid=a8d167dd14124dcc1a/screen=ckiDisplayDocument?docId=200000058669312

Or it is possible that your printer queue has been corrupted. Remove the printer and readd it vi jetadmin and see if this clears up your problem.

Hope this helps

Chris
It wasn't me!!!!
A. Clay Stephenson
Acclaimed Contributor

Re: Error message from lp

Hi Marty:

First check /var/spool/lp/log for any clues. You may want to submit a new job and immediately examine the log.

The convention for lp interface files is that 0 means good, 1-127 mean some error but future requests will not be disabled. 128 - reserved; 129 - problem and disable for future requests; > 129 - reserved for LP.

Errno 2 - ENOENT - File not found. That is probably your error but if you are running a custom interface that may not be true.

I can tell you how that sometimes happens:

lp -dmyprinter myfile
rm myfile

If myfile was rm'ed before the myfile actually starting being printer (or at least being opened) then that is your problem.

The fix:
lp -c -dmyprinter myfile OR
cat myfile | lp -dmyprinter
rm myfile

The -c requests that lp make a copy of the file before returning.

Regards, Clay
If it ain't broke, I can fix that.
Steve Steel
Honored Contributor

Re: Error message from lp

Hi


This could be slow name lookup.

If you use DNS and the printer is only in hosts
make sure you have

hosts: dns [NOTFOUND=continue TRYAGAIN=continue] files



In /etc/nsswitch.conf for the hosts line

tryagain is often forgotten

steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Sanjay_6
Honored Contributor
Solution

Re: Error message from lp

Hi Marty,

The print queue is probably corrupted. Delete the queue and add a new create for the printers giving this type of problem.

hope this helps.

Regds
Helen French
Honored Contributor

Re: Error message from lp

Frank Slootweg
Honored Contributor

Re: Error message from lp

> "error code 2 in request WGFLASER-2802 on printer WGFLASER"

This probably comes from an "exit 2" statement in the interface script.

Inspect the interface script, i.e. "view /etc/lp/interface/", to see which condition(s) cause an exit 2. This can of course also be a "exit ..." statement, so check all exit statements, not just "exit 2".

For JetDirect, check both /etc/lp/interface/ and /etc/lp/interface/model.orig. .