Operating System - HP-UX
1752754 Members
4631 Online
108789 Solutions
New Discussion юеВ

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

 
Alzhy
Honored Contributor

LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

A clone of a server was done. That server had a separate /var/spool/lp (that's not on the root VG/DG) - so when the clone was performed the cloned environment had no /var/spool/lp. In the past I simply restore/copy a working /var/spool/lp and /etc/lp from a different machine and after doing some clean up - lpsched starts fine.

But not on this one. The original server had a couple of printers defined and perfectly working. I copied over its /var/spool/lp and /etc/lp and I could not make it work. I even cleaned up manually all existing printer definitions to no avail.

Here's other info:

When I start up lpsched, it creates SCHEDLOCK, FIFO and CLD_FIFO but lpsched does not start at all. Used SAM and even defined new printers but lpsched just would not start. In SAM when I start the spooler,it will always complain a -1 value from spooler start is reported. No logs even with lpsched -v. I am sure about my permissins on the /var/spool/lp and /etc/lp trees.

Issuing lpshut does not clear out those *FIFO and SCHEDLOCK files and takes unusually longer to finish. A truss (tusc) on both lpsched and lpshut do not yield any meaningful clues.

Anybody encountered this issue yet? What could I be missing?
Hakuna Matata.
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

The most likely explanation is that when you copied you didn't use something like tar or cpio to preserve owner/group/mode (setuid and setgid bits) of all the files (including directories). That's the first thing that I would check.
If it ain't broke, I can fix that.
Alzhy
Honored Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

Thanks A. Clay,

I did use cpio and vxump/vxrestore... to no avail. Do you know the internal workings of lpsched? I can send a full tusc (truss) of lpsched/lpshut/lpstat with all the forks and the execs, etc.

Also doing a parallel ticket with HP Support.
Hakuna Matata.
Michael Steele_2
Honored Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

SCHEDLOCK and FIFO need to be removed to get past this. Here's the steps:

1) cd /var/spool/lp
2) ls FIFO SCHEDLOCK
3) lpstat -r (* still running *)
4) lpshut (( if running *)
5) rm FIFO, SCHEDLOCK, outputq, *lock
6) >outputq
7) >log
8) ps -ef | grep -i lp (* any lp processes? *)
9) kill -9 PID (* any *)
10) lpsched -v
11) more log
12) lp -d printer file
Support Fatherhood - Stop Family Law
A. Clay Stephenson
Acclaimed Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

Okay, let's start from scratch. Do an lpshut; lpsched -r (to see if the scheduler is running); next do a ps -e | grep lpsched and kill and lpsched's still running; do the normal SCHEDLOCK,*FIFO removal drill.

Next check that /var/spool/lp/log is actually a symbolic link to /var/adm/lp/log and that the actual file is owned by lp; group lp; and mode 644.

Next:
/usr/sam/lbin/lpmgr > /var/tmp/myfile
This will check the integrity of the qstatus and pstatus files.

Each printer should have a line that looks something like this:
myprinter:network:yes, idle:yes:-:0: :

The most common problem that I have seen is that there is not exactly one space between the last two colons. If any entry looks hokey then delete the bogus printer.

Try lpsched now to see if the spooler will start; if not, repeat the lpshut, file removes, and killing any lpsched. Hopefully at this point you will at least have logging.

The next thing to check is a bad outputq. cd to /var/spool/lp; cp outputq outputq.save; cp /dev/null outputq; and try to start the scheduler again.







If it ain't broke, I can fix that.
Alzhy
Honored Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

Here it is:

[ /var/spool/lp ]
root@fhprod20 # ls
CLD_FIFO Tclass class fonts log member pstatus
request
FIFO Tmember cmodel info lpana.log model qstatus
sinterface
SCHEDLOCK cinterface default interface lpd.log outputq receive
smodel

[ /var/spool/lp ]
root@fhprod20 # ps -ef|grep lpsched
root 8563 3463 0 11:02:52 pts/td 0:00 grep lpsched

[ /var/spool/lp ]
root@fhprod20 # lpstat -r
scheduler is not running

[ /var/spool/lp ]
root@fhprod20 # lpshut
lpshut: scheduler not running

[ /var/spool/lp ]
root@fhprod20 # ls
CLD_FIFO Tclass class fonts log member pstatus
request
FIFO Tmember cmodel info lpana.log model qstatus
sinterface
SCHEDLOCK cinterface default interface lpd.log outputq receive
smodel

[ /var/spool/lp ]
root@fhprod20 # ls -l
total 32
prw------- 1 lp lp 0 Jun 2 07:11 CLD_FIFO
prw------- 1 lp lp 0 Jun 2 07:11 FIFO
-rw-r----- 1 lp lp 0 Jun 2 07:11 SCHEDLOCK
lrwxrwxrwx 1 root sys 14 Jun 1 13:49 Tclass -> /etc/lp/Tcla
ss
lrwxrwxrwx 1 root sys 15 Jun 1 13:49 Tmember -> /etc/lp/Tme
mber
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 cinterface -> /etc/lp/
cinterface
lrwxr-xr-x 1 root sys 13 Jun 1 13:49 class -> /etc/lp/class
lr-xr-xr-x 1 root sys 18 Jun 1 13:49 cmodel -> /usr/lib/lp/
cmodel
-rw-r--r-- 1 lp lp 5 Jun 2 07:00 default
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 fonts -> /usr/lib/lp/f
onts
lrwxr-xr-x 1 root sys 12 Jun 1 13:49 info -> /etc/lp/info
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 interface -> /etc/lp/i
nterface
lrw-r--r-- 1 root sys 15 Jun 1 13:49 log -> /var/adm/lp/log
lr-xr-xr-x 1 root sys 21 Jun 1 13:49 lpana.log -> /var/adm/
lp/lpana.log
lrw-r--r-- 1 root sys 19 Jun 1 13:49 lpd.log -> /var/adm/lp
/lpd.log
lrwxr-xr-x 1 root sys 14 Jun 1 13:49 member -> /etc/lp/memb
er
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 model -> /usr/lib/lp/m
odel
-rw-r--r-- 1 lp lp 0 Jun 2 06:59 outputq
-rw-r--r-- 1 lp lp 0 Jun 2 07:04 pstatus
-rw-r--r-- 1 lp lp 0 Jun 2 07:04 qstatus
drwxr-xr-x 2 lp bin 96 Oct 29 2003 receive
drwxr-xr-x 3 lp bin 8192 Jun 2 07:00 request
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 sinterface -> /etc/lp/
sinterface
lr-xr-xr-x 1 root sys 18 Jun 1 13:49 smodel -> /usr/lib/lp/
smodel

[ /var/spool/lp ]
root@fhprod20 # ls -ld /var/spool/lp /etc/lp
drwxr-xr-x 8 lp bin 8192 Jun 2 07:11 /etc/lp
drwxr-xr-x 4 lp bin 8192 Jun 2 07:11 /var/spool/lp

[ /var/spool/lp ]
root@fhprod20 # rm *FIFO *LOCK

[ /var/spool/lp ]
root@fhprod20 # /usr/sam/lbin/lpmgr > /var/tmp/myfile

[ /var/spool/lp ]
root@fhprod20 # more /var/tmp/myfile
STOPPED
off
NULL
local name:type:enabled:accepting:location:fence:class
NULL:local:--:--:/dev/null: : :

[ /var/spool/lp ]
root@fhprod20 # ls
Tclass class fonts log member pstatus request
Tmember cmodel info lpana.log model qstatus sinterfa
ce
cinterface default interface lpd.log outputq receive smodel

[ /var/spool/lp ]
root@fhprod20 # lpsched -v
scheduler is running

[ /var/spool/lp ]
root@fhprod20 # lpstat -r
scheduler is not running

[ /var/spool/lp ]
root@fhprod20 # ls
CLD_FIFO Tclass class fonts log member pstatus
request
FIFO Tmember cmodel info lpana.log model qstatus
sinterface
SCHEDLOCK cinterface default interface lpd.log outputq receive
smodel

[ /var/spool/lp ]
root@fhprod20 # ls -l
total 32
prw------- 1 lp lp 0 Jun 2 11:13 CLD_FIFO
prw------- 1 lp lp 0 Jun 2 11:13 FIFO
-rw-r----- 1 lp lp 0 Jun 2 11:13 SCHEDLOCK
lrwxrwxrwx 1 root sys 14 Jun 1 13:49 Tclass -> /etc/lp/Tcla
ss
lrwxrwxrwx 1 root sys 15 Jun 1 13:49 Tmember -> /etc/lp/Tme
mber
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 cinterface -> /etc/lp/
cinterface
lrwxr-xr-x 1 root sys 13 Jun 1 13:49 class -> /etc/lp/class
lr-xr-xr-x 1 root sys 18 Jun 1 13:49 cmodel -> /usr/lib/lp/
cmodel
-rw-r--r-- 1 lp lp 5 Jun 2 07:00 default
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 fonts -> /usr/lib/lp/f
onts
lrwxr-xr-x 1 root sys 12 Jun 1 13:49 info -> /etc/lp/info
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 interface -> /etc/lp/i
nterface
[ /var/spool/lp ]
root@srv001 # ls
CLD_FIFO Tclass class fonts log member pstatus
request
FIFO Tmember cmodel info lpana.log model qstatus
sinterface
SCHEDLOCK cinterface default interface lpd.log outputq receive
smodel

[ /var/spool/lp ]
root@srv001 # ls -l
total 32
prw------- 1 lp lp 0 Jun 2 11:13 CLD_FIFO
prw------- 1 lp lp 0 Jun 2 11:13 FIFO
-rw-r----- 1 lp lp 0 Jun 2 11:13 SCHEDLOCK
lrwxrwxrwx 1 root sys 14 Jun 1 13:49 Tclass -> /etc/lp/Tcla
ss
lrwxrwxrwx 1 root sys 15 Jun 1 13:49 Tmember -> /etc/lp/Tme
mber
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 cinterface -> /etc/lp/
cinterface
lrwxr-xr-x 1 root sys 13 Jun 1 13:49 class -> /etc/lp/class
@
"LOG" 120 lines, 5946 characters

[ /root ]
root@fsprod91 # cat LOG
[ /var/spool/lp ]
root@srv001 # ls
CLD_FIFO Tclass class fonts log member pstatus request
FIFO Tmember cmodel info lpana.log model qstatus sinterface
SCHEDLOCK cinterface default interface lpd.log outputq receive smodel

[ /var/spool/lp ]
root@srv001 # ps -ef|grep lpsched
root 8563 3463 0 11:02:52 pts/td 0:00 grep lpsched

[ /var/spool/lp ]
root@srv001 # lpstat -r
scheduler is not running

[ /var/spool/lp ]
root@srv001 # lpshut
lpshut: scheduler not running

[ /var/spool/lp ]
root@srv001 # ls
CLD_FIFO Tclass class fonts log member pstatus request
FIFO Tmember cmodel info lpana.log model qstatus sinterface
SCHEDLOCK cinterface default interface lpd.log outputq receive smodel

[ /var/spool/lp ]
root@srv001 # ls -l
total 32
prw------- 1 lp lp 0 Jun 2 07:11 CLD_FIFO
prw------- 1 lp lp 0 Jun 2 07:11 FIFO
-rw-r----- 1 lp lp 0 Jun 2 07:11 SCHEDLOCK
lrwxrwxrwx 1 root sys 14 Jun 1 13:49 Tclass -> /etc/lp/Tclass
lrwxrwxrwx 1 root sys 15 Jun 1 13:49 Tmember -> /etc/lp/Tmember
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 cinterface -> /etc/lp/cinterface
lrwxr-xr-x 1 root sys 13 Jun 1 13:49 class -> /etc/lp/class
lr-xr-xr-x 1 root sys 18 Jun 1 13:49 cmodel -> /usr/lib/lp/cmodel
-rw-r--r-- 1 lp lp 5 Jun 2 07:00 default
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 fonts -> /usr/lib/lp/fonts
lrwxr-xr-x 1 root sys 12 Jun 1 13:49 info -> /etc/lp/info
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 interface -> /etc/lp/interface
lrw-r--r-- 1 root sys 15 Jun 1 13:49 log -> /var/adm/lp/log
lr-xr-xr-x 1 root sys 21 Jun 1 13:49 lpana.log -> /var/adm/lp/lpana.log
lrw-r--r-- 1 root sys 19 Jun 1 13:49 lpd.log -> /var/adm/lp/lpd.log
lrwxr-xr-x 1 root sys 14 Jun 1 13:49 member -> /etc/lp/member
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 model -> /usr/lib/lp/model
-rw-r--r-- 1 lp lp 0 Jun 2 06:59 outputq
-rw-r--r-- 1 lp lp 0 Jun 2 07:04 pstatus
-rw-r--r-- 1 lp lp 0 Jun 2 07:04 qstatus
drwxr-xr-x 2 lp bin 96 Oct 29 2003 receive
drwxr-xr-x 3 lp bin 8192 Jun 2 07:00 request
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 sinterface -> /etc/lp/sinterface
lr-xr-xr-x 1 root sys 18 Jun 1 13:49 smodel -> /usr/lib/lp/smodel

[ /var/spool/lp ]
root@srv001 # ls -ld /var/spool/lp /etc/lp
drwxr-xr-x 8 lp bin 8192 Jun 2 07:11 /etc/lp
drwxr-xr-x 4 lp bin 8192 Jun 2 07:11 /var/spool/lp

[ /var/spool/lp ]
root@srv001 # rm *FIFO *LOCK

[ /var/spool/lp ]
root@srv001 # /usr/sam/lbin/lpmgr > /var/tmp/myfile

[ /var/spool/lp ]
root@srv001 # more /var/tmp/myfile
STOPPED
off
NULL
local name:type:enabled:accepting:location:fence:class
NULL:local:--:--:/dev/null: : :

[ /var/spool/lp ]
root@srv001 # ls
Tclass class fonts log member pstatus request
Tmember cmodel info lpana.log model qstatus sinterface
cinterface default interface lpd.log outputq receive smodel

[ /var/spool/lp ]
root@srv001 # lpsched -v
scheduler is running

[ /var/spool/lp ]
root@srv001 # lpstat -r
scheduler is not running

[ /var/spool/lp ]
root@srv001 # ls
CLD_FIFO Tclass class fonts log member pstatus request
FIFO Tmember cmodel info lpana.log model qstatus sinterface
SCHEDLOCK cinterface default interface lpd.log outputq receive smodel

[ /var/spool/lp ]
root@srv001 # ls -l
total 32
prw------- 1 lp lp 0 Jun 2 11:13 CLD_FIFO
prw------- 1 lp lp 0 Jun 2 11:13 FIFO
-rw-r----- 1 lp lp 0 Jun 2 11:13 SCHEDLOCK
lrwxrwxrwx 1 root sys 14 Jun 1 13:49 Tclass -> /etc/lp/Tclass
lrwxrwxrwx 1 root sys 15 Jun 1 13:49 Tmember -> /etc/lp/Tmember
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 cinterface -> /etc/lp/cinterface
lrwxr-xr-x 1 root sys 13 Jun 1 13:49 class -> /etc/lp/class
lr-xr-xr-x 1 root sys 18 Jun 1 13:49 cmodel -> /usr/lib/lp/cmodel
-rw-r--r-- 1 lp lp 5 Jun 2 07:00 default
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 fonts -> /usr/lib/lp/fonts
lrwxr-xr-x 1 root sys 12 Jun 1 13:49 info -> /etc/lp/info
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 interface -> /etc/lp/interface
lrw-r--r-- 1 root sys 15 Jun 1 13:49 log -> /var/adm/lp/log
lr-xr-xr-x 1 root sys 21 Jun 1 13:49 lpana.log -> /var/adm/lp/lpana.log
lrw-r--r-- 1 root sys 19 Jun 1 13:49 lpd.log -> /var/adm/lp/lpd.log
lrwxr-xr-x 1 root sys 14 Jun 1 13:49 member -> /etc/lp/member
lr-xr-xr-x 1 root sys 17 Jun 1 13:49 model -> /usr/lib/lp/model
-rw-r--r-- 1 lp lp 0 Jun 2 06:59 outputq
-rw-r--r-- 1 lp lp 0 Jun 2 07:04 pstatus
-rw-r--r-- 1 lp lp 0 Jun 2 07:04 qstatus
drwxr-xr-x 2 lp bin 96 Oct 29 2003 receive
drwxr-xr-x 3 lp bin 8192 Jun 2 07:00 request
lrwxr-xr-x 1 root sys 18 Jun 1 13:49 sinterface -> /etc/lp/sinterface
lr-xr-xr-x 1 root sys 18 Jun 1 13:49 smodel -> /usr/lib/lp/smodel


Hakuna Matata.
Michael Steele_2
Honored Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

I don't suppose this is a remote printer or that you're using jetadmin? Can you compare the /etc/lp/interface directories between the two servers?


Patched up?
PHCO_34477 for 11.23
Support Fatherhood - Stop Family Law
Alzhy
Honored Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

Michael, we do not have HP JetDirect or Xerox/Phaser xpAdmin software installed. That's actually the reason I had wanted to make sure the spooler is working before I add those tools. I'm actually building our centralized UNIX Print server...
Hakuna Matata.
Geoff Wild
Honored Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

What about the permissions of the executables and log dir?

/usr/sbin/lpsched -r-sr-xr-x root:bin
/var/spool/lp drwxr-xr-x lp:bin


Also, is there a tmplock file in /var/spool/lp?


And what about /var/adm/lp?

Should be
-rw-r--r-- 1 lp lp

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
George Liu_4
Trusted Contributor

Re: LP Spooler (lpsched) not starting on a Cloned Server - despite SCHEDLOCK, *FIFO gyrations

Hi Nelson,
I have a similar problem. Have you had this problem fixed? If yes, could you tell me how? Thanks,