1821414 Members
2436 Online
109633 Solutions
New Discussion юеВ

spooler won't start

 
SOLVED
Go to solution
HU YIHONG
New Member

spooler won't start

My system is a 9000/777 workstation running HP-UX 10.20. One day we had some problems with printing so I stopped spooler by SAM. When I tried to restart spooler I failed. I even tried rebooting the system. I noticed that a SCHEDLOCK and core were generated under /var/spool/lp/ whenever I run lpsched.
I tried to remove SCHEDLOCK before start the scheduler with lpsched but SCHEDLOCK would be created again together with core.
Please help and thanks.
13 REPLIES 13
KCS_1
Respected Contributor

Re: spooler won't start

Hi,

Under the url is explain about SCHEDLOCK and FIFO.
I hope the url is better help to you.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x30f6f841489fd4118fef0090279cd0f9,00.html

have a nice day!!
Easy going at all.
HU YIHONG
New Member

Re: spooler won't start

Dear Patrick

Thank you for your help.
The explanation helps me understanding better of SCHEDLOCK and FIFO. However when I tried lpsched it said scheduler is running. Then I couldn't find lpsched by ps command. If I run lpshut it would complain no scheduler running.
Steve Steel
Honored Contributor

Re: spooler won't start

Hi

1)Cleanup
# /usr/sbin/lpshut -> shut down the scheduler
# ps -ef | grep lp -> are lp processes still running ?
-> if yes, kill those processes
# kill -> kill ALL lp processes
# ps -ef | grep lp -> check if all processes are really gone
# cd /var/spool/lp
# rm FIFO SCHEDLOCK CLD_FIFO Toutputq *.lock
-> delete temporary files, not all of them may exists

2)Restart
# /usr/sbin/lpsched -v -a -> restart lpsched with additional logging enabled

3)Check
Look in /var/adm/lp/log for info
If corefile do file core and post output
What is the last lp patch on the box

swlist -l fileset|grep -i lp


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Ulf Lipski
Advisor

Re: spooler won't start

Hi,

I suggest the problem is that you have corrupted *status files. So remove them and restart the scheduler. If necessary to do this remove first the *FIFO and *SCDEDLOCK files.

By
Optimization is the root of all evil.
HU YIHONG
New Member

Re: spooler won't start

Hi Steve and Ulf

Thank you for your help. I tried but couldn't get anywhere. I guess some files got messed up. I used SAM to stop the spooler and couldn't start it since then. no messages logged under /var/adm/lp/log after that.

lpsched creates a core dump every start.
I attached output from strings core here.
Scott_14
Regular Advisor

Re: spooler won't start

Hello:

I may be off base with this, but when I was at one place on 10.2, with a lot of queus, this would happen to me. After removing the lock file, and fifo, I would run ps -ef |grep lp
and see other scheds running, i would kill all of them, and run a cancel on all queus, this seemed to work, why I am not sure, but it would seem after canceling the queues I could get the lpsched to run again.

Not sure if you want to try that, but if your lpsched is still down, it may be worth the try.

scott

Steve Steel
Honored Contributor

Re: spooler won't start

Hi

1)Please file core

Note strings core.

2)lpstat -t does it work.

3)Nothing in the log suggests a protection error that lp cannot write.

I have uploaded a script

It correct permissions.


Steve Steel

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

Re: spooler won't start

Hi

Another script

#!/bin/ksh
#
#Printer parameter
#
# parameter is enable disable accept or reject to do all printers
#
option=$1
xx=`lpstat -p|grep printer|cut -f2 -d" "`
for printer in $xx
do
case $option in
accept) accept $printer ;;
reject) reject $printer ;;
enable) enable $printer ;;
disable) disable $printer ;;
*)echo invalid parameter ;;
esac
done


Save and use as script disable

Will disable all printers

Then try and start the spooler

When running script enable to restart printers

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

Re: spooler won't start

If these printers were managed by SAM, i.e. *not* by lpadmin commands, or at least were managed *last* with SAM (*and* correctly working at the time), then I advise to use SAM's Restore Spooler Configuration state functionality:

sam -> Printers and Plotters -> LP Spooler -> Save/Restore Spooler Configuration

Check that the displayed "Time Saved:" is recent/correct!

The actual Restore Spooler Configuration action is under "Actions".
Victor_5
Trusted Contributor

Re: spooler won't start

Your name let me recall one of my previous co-workers, did you work for CCC of CHP before in HangHua?
Eric Buckner
Regular Advisor

Re: spooler won't start

I had this happen a few times to us on 10.20. Make sure there are not schedulers running. And rename /var/spool/lp/outputq to /var/spool/lp/outputq.old. Then start the scheduler. If it doesn't work you can move the outputq file back. But in each time our similar issue was the result of a corrupted outputq.

HtH,
Eric
Time is not a test of the truth.
Jose Mosquera
Honored Contributor

Re: spooler won't start

Hi,

You must guarantee that every printer showed in your SAM spool have a corresponding directory in /var/spool/lp/request. If not, pls follow this steps:

mkdir
chown lp:lp
chmod 766

remove SCHEDLOCK file

restart spool

Other way to restore any previous working-fine spool configuration is:
Make periodically in SAM/Printers and Ploters/LP Spooler/Save-RestoreSpooler Configuration/Action/Save Spooler Configuration

When you need restore this configuration just select Restore Spooler Configuration in same path showed above.

Regards,

Jose

HU YIHONG
New Member

Re: spooler won't start

Hi,

It's the spooler configuration. I restore the configuration using SAM and it works.

Thanks to everyone who bother to help me.
I am really touched by the response I get.
It's the first time I seek help here.

Victor, I am not the one you knew.

Have a nice weekend!