1838240 Members
3420 Online
110125 Solutions
New Discussion

Re: lp scheduler problem

 
SOLVED
Go to solution
Michael D. Zorn
Regular Advisor

lp scheduler problem

The printer is an HP laserjet, connected through a LAN to an HP K200.

All of a sudden, it stopped printing.

#lpstat -t

scheduler is not running
....... messages about the other printers
device for laser: /dev/null
...
laser accepting requests since Nov 25 14:02
...
printer laser is ide. enabled since Aug 19 10:10
fence priority : 0
laser-177 mzorn priority 0 Dec 2 14:39
myfile 100 bytes
--------------------

... and nothing happens.

[as root:]

#lpsched
#lpstat -t
[as above, "scheduler is not running"]

... but I think lpsched may only worry about line printers - ?

#enable laser
enable: printer "laser" was already enabled

#ping [laser printer's IP addr]
--- OK

#disable laser
printer "laser" now disabled

#lpstat -t
printer "laser disabled ...
#enable laser
printer "laser" now enabled
(but it took about 10 seconds)
#lpstat -t
scheduler is not running
...
printer laser is idle

Our other HP computer prints OK, and:

#[other computer] lpstat -t
scheduler is running
....

So it looks like the problem is that the scheduler isn't running on computer #1.

I also tried
#lpshut
scheduler is not running

#lpadmin -plaser
#lpstat -t
scheduler is not running
#enable laser
enable: printer "laser" was already enabled.

How can I get the scheduler running?

12 REPLIES 12
James R. Ferguson
Acclaimed Contributor

Re: lp scheduler problem

Hi Michael:

Try removing '/var/spool/lp/FIFO' and '/var/spool/lp/SCHEDLOCK'. Then restart the scheduler.

Regards!

...JRF...
Michael D. Zorn
Regular Advisor

Re: lp scheduler problem

FIFO and SCHEDLOCK aren't there - that may be a clue.

There is a 'core', 346046 bytes, from today.

Then I looked in /etc/rc.log - because I restarted it (when in doubt, reboot).

Toward the end are these lines (the only reference to "print"):

Start print spooler
output from "/sbin/rc2.d/S7201lp start":
----------------
scheduler is running
line printer scheduler started

... but I'm not using the line printer.

I think we set up the laser printer with JetAdmin - /etc/lp/interface/laser mentions JetAdmin in the comments, and has /opt/hpnp in the PATHs.

But, the /sbin/rc2.d/S7201lp -> /sbin/init.d/lp,

and that's a different script, and for 'start', it does:

...
ps -ef | grep lpsched ...
...
rm / /SCHEDLOCK
/usr/sbin/lpsched

(So I don't know for sure if JetAdmin is controlling or not.)

So I tried that anyway:

#lpsched
scheduler is running

#lpstat -t
scheduler is not running

(lpstat used to come back right away, now it takes about 10S)

[I'm off Monday, will check back Tuesday]
Bill Hassell
Honored Contributor

Re: lp scheduler problem

Several things...

Your primary problem is that lpsched is not running based on the lpstat information. Run lpstat -r to see if the scheduler is running. If not, start by running:

ps -f -u lp

If you see any jobs reported, these are 'orphaned' and need to be killed. The lp subsystem is not shutdown until the ps command shows no more lp processes. Make sure FIFO and SCHEDLOCK are gone from /var/spool/lp. (I am assuming you are running at least HP-UX 10.20 or later) Now start the scheduler with lpsched and then run ps again. You should see exactly one lpsched process running and lpstat -r will report that the scheduler is running.

Now the jetadmin software has been obsolete since 1999 and is known to have Y2K issues. The correct software is called hppi (HP Printer Installer) and can be downloaded from:

http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?locale=en_US&pnameOID=18922&taskId=135&prodTypeId=18972&prodSeriesId=27349〈=en&cc=us

or for obsolete and unsupported 10.20 or earlier:

http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?locale=en_US&pnameOID=18923&taskId=135&prodTypeId=18972&prodSeriesId=27350〈=en&cc=us

Use swremove to remove the jetadmin software, then swinstall the hppi package. The interface is similar but the code is more stable.

The JetDirect LAN card is not directly useable in the lp spooler so the hppi software sets up the network connection. The SysV lp spooler is basically useless to tell you anything about problems with a connection, but the hppi programs can help a lot.

Now delete and add back your current printer using hppi, or you can simplify the job with just two commands:

removequeue laser
addqueue -h 12.34.56.78 -q laser

And that's it. Repeat for other JetDirect LAN card printers.


Bill Hassell, sysadmin
Peter Nikitka
Honored Contributor

Re: lp scheduler problem

Hi,

I remember, I had once a problem with corrupted pstatus/qstatus files, which caused the lpsched to exit ungracefully.
The corruption was caused by a disk-is-full situation. There was a patch for lpsched and friends, if I remember correctly - look for such a patch for your OS version!

To take Bills answer into account: I fully recommend to update to HPPI, as well. At Update time there was the possibility to convert all Jetadmin-Printers to HPPI-Printers. I did this always without any problems. Independently you could recreate some of your printers, which may benefit from new possibilites of better fitting model scripts.

However, a corrupted LP-spooler setup will not heal itself even after having updated Jetadmin with HPPI!

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Steve Steel
Honored Contributor

Re: lp scheduler problem

Hi

1)As already indicated make sure there are no lp processes running.
2)Post output of command
file core
On the core you have
3)lpsched -v
4)Show contents of /var/adm/lp/log


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Michael D. Zorn
Regular Advisor

Re: lp scheduler problem

Bill: I'm running 10.01. It's the Old Machine (OM); I'm bringing up an rp3410 with 11.11. It's a strange problem: lp was running just fine till some time Friday, then it suddenly quit.

I think I got hppi for the new machine (I'll check my notes). I'll try the "or for obsolete and unsupported 10.20 or earlier:" link if it doesn't work soon.

Peter: I looked at pstatus/qstatus on the OM. pstatus is 3024 bytes, qstatus is 752
On the NM, pstatus is 756, qstatus 188. When I print a file, the numbers don't change - but the datestamp on pstatus does. On the OM, the datestamp doesn't. Those files could be bad.

What if I just delete them and reboot?

Steve:
1) no lp processes running (not even lpsched)
2) #file core
core: core file from 'lpsched' - received SIGBUS
3) #lpsched -v
scheduler is running
BUT
#lpstat -t
scheduler is not running
4) /var/adm/lp/log:
(197 lines, start with:)
*****LP LOG: Sep 5 09:34 *****
Start: laser-131 Fri Sep 8 01:34:08 PST 2006
End: laser-131 ............
/etc/lp/interface/model.orig/laser nb fs lm5 fp12 style0 weight0
/opt/hpnp/bin/hpnpf -j laser-131 +root -a1 -x
...... etc for more print jobs, up through Nov 22 ...
(possible clue - that's when I shut the OM down for the Thanksgiving break:)
***** STOPPED Nov 22 15:11

No error massages.
Bill Hassell
Honored Contributor
Solution

Re: lp scheduler problem

The 10.20 version should work for 10.01. See if it installs. If not, make a list of all your printers using lpstat -v. Then delete all of them. The pstatus, qstatus and outputq files are very likely corrupted so you need to reduce the printers to zero. The size of these files is only an indication of binary data inside the files. Then make sure those 3 files are zero-length:

cat /dev/null > /var/spool/lp/pstatus
cat /dev/null > /var/spool/lp/qstatus
cat /dev/null > /var/spool/lp/outputq

Now add them back again.

If hppi installs OK, you'll need to do the same thing (delete the printers, cleanup the status files).

Then add them all back again. However, both jetadmin and hppi have a very nifty command line tool:

addqueue -h 12.34.56.78 -q print12

This works for all JetDirect LAN cards. addqueue is available with the old jetadmin too.


Bill Hassell, sysadmin
Peter Nikitka
Honored Contributor

Re: lp scheduler problem

Hi Michael,

the correct sizes for the ?status files under HP-UX 11.00 are
pstatus 756*(number of printers)
qstatus 188*(number of printers)

This OS version is my oldest available here - though I don't think the values have been changed since 10.01. I'm pretty shure about the fixed sized records, but did not find any document, when I once needed this information.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Steve Steel
Honored Contributor

Re: lp scheduler problem

Hi

1)Make sure you have the latest patch level for lp


2)Clear outputq file

cd /var/spool/lp
> outputq

3)cd /var/spool/lp/request
look for and remove any files in the request directories

c???? = control can be removed
d???? = data move to otherplace such as /tmp and reprint

4)lpsched

5)lpstat -t

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Michael D. Zorn
Regular Advisor

Re: lp scheduler problem

Bill: I deleted [pq]status and outputq and made the 0-size files.

The laser printer is a network printer - do I need lpsched to be running?

I got it set up again with jetadmin, and the test page printed.

But not a print job. It goes into the Q and nothing happens. But, I can "cancel lp-nnn" and that works.

We're only going to have the old machine for another month or so, so I don't need to upgrade the perinter/spooler configuration.

Peter: I rebooted, and the [pq]status files are the right size: pstatus 756, qstatus 188. There's only that one printer.

Update: I ran through all the options that made sense in jetadmin, then did
#lpsched
scheduler is running
#lpstat -t
scheduler is running
...

... and it's printing again.

Everybody's input was helpful - if anybody wants to reply, I'll update the points.
Bill Hassell
Honored Contributor

Re: lp scheduler problem

Make sure that you accept and enable the printer:

accept laser
enable laser

If it still doesn't printer, just use hpnpf (which bypasses the spooler):

hpnpf -x 12.34.56.78 -n /etc/profile

or whatever file you need to print.


Bill Hassell, sysadmin
Michael D. Zorn
Regular Advisor

Re: lp scheduler problem

Bill: It's running now. I did "enable " anyway, and it says ".... already enabled".

Whatever happened, it seems to be working now.