Operating System - HP-UX
1836174 Members
2569 Online
110096 Solutions
New Discussion

/usr/sbin/lpsched: Unable to open and lock "request/ac04a1/cA2244

 
apple
Super Advisor

/usr/sbin/lpsched: Unable to open and lock "request/ac04a1/cA2244

dear hpux guru,
our printing in hpux has failed. when i see the check the /var/spool/lp/log, i can see this error:
/usr/sbin/lpsched: Unable to open and lock "request/ac04a1/cA2244
i tried to disable and enable the printer, but to no avail and have removed the SCHEDLOCK, but to no avail. how to resolve this? hope to hear from you. thank you
4 REPLIES 4
john123
Trusted Contributor

Re: /usr/sbin/lpsched: Unable to open and lock "request/ac04a1/cA2244

After removing the lock file start the lp service from init.d directory... Or even it may start working if you just enter lpsched in the command promt
apple
Super Advisor

Re: /usr/sbin/lpsched: Unable to open and lock "request/ac04a1/cA2244

dear sir,
1. what is the command to restart the lp service from init.d directory?
2. lpsched - this command will restart the scheduler rite? what is the impact if we have few printers, will all the jobs that are in all printer queueing stop?

hope to hear from you. thank you
georgek_1
HPE Pro

Re: /usr/sbin/lpsched: Unable to open and lock "request/ac04a1/cA2244

Hi
ps -ef | grep -i lpsched will show whether the service is running or not.
lpshut -->is for sopt the service.
lpsched ->is for starting the service.

If you are stopping/restating the service it will affect all the working printers.They stop printing.After start the service printer will print the doc from the beginning


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Bill Hassell
Honored Contributor

Re: /usr/sbin/lpsched: Unable to open and lock "request/ac04a1/cA2244

> 1. what is the command to restart the lp service from init.d directory?

The scripts to start and stop virtually all services are found in /sbin/init.d and for the spooler, it is called lp. However, the spooler is quite simple: the first lpsched runs as a daemon automatically, and each job that is run will start with another lpsched which starts and monitors the actual printing.

> 2. lpsched - this command will restart the scheduler rite? what is the impact if we have few printers, will all the jobs that are in all printer queueing stop?

lpsched starts the spooler, and lpshut stops it. An unfortunate side effect is that every job that is printing will be restarted from the beginning.

> ps -ef | grep -i lpsched will show whether the service is running or not.

The better (and simpler) command is ps -f -ulp since this will show all the printing processes. AS mentioned above, one lpsched will be a daemon (and has a parent of 1 which is init) and the others are children of the first lpsched.

The spooler files are out of sync. Start by disabling the printer ac04a1. Then cancel any jobs that are pending in the queue. If this is a remote printer, there will long delays if the remote server is not working. Finally, remove the printer with lpshut, then lpadmin -xac04a1. Note that all print jobs for all printers will be halted. Now verify that the printer queue is gone by deleting the /var/spool/lp/request/ac04a1 directory. Check that the lp subsystem does not know about the printer with lpsched -v.

Now add the printer back again but don't accept and enable it until the printer (and server) is working. Now restart the spooler with the lpsched command.


Bill Hassell, sysadmin