[unix-pc.general] 3b1: The lp daemon has left for the coast.

ned@pebbles.cad.mcc.com (Ned Nowotny) (08/26/89)

Since installing a WD2010 and MS3085 and reinstalling the system software
and my own local files, the lp daemon seems to be on permanent vacation.

Now, the printer and printer port (parallel) is working fine.  A "cat >
/dev/lp" works just fine.  I have tried to change the printer from the
install menu, but no matter what I do, it still thinks it is configuered
for the HPLaserjet printer and the lp daemon does not show up.  Or, at least,
it doesn't stay around.

Well, UA is pretty bad.  So, yes, I tried using the lp utilities directly.
I even tried to use the "dumb" model file.  I can get reasonable responses
and 0 status values returned from lpadmin, accept, enable, and even lpsched.
(Well, lpsched always seems to return 0.)  However, lpstat and ps both tell
me that the lp schedular is not running.  Before providing gory transcripts,
can anyone offer a suggestion as to what may be going on?

P.S.  I am running the unfixed 3.5 OS and development tools and I have
      installed virtually all of the AT&T supplied code including the
      GSS packages with the intent of selectively removing what I don't
      want later.
Ned Nowotny, MCC CAD Program, Box 200195, Austin, TX  78720  Ph: (512) 338-3715
ARPA: ned@mcc.com                   UUCP: ...!cs.utexas.edu!milano!cadillac!ned
-------------------------------------------------------------------------------
"We have ways to make you scream." - Intel advertisement in the June 1989 DDJ.

ned@pebbles.cad.mcc.com (Ned Nowotny) (08/29/89)

In article <2563@cadillac.CAD.MCC.COM> ned%cad@MCC.COM (Ned Nowotny) writes:
>
>Since installing a WD2010 and MS3085 and reinstalling the system software
>and my own local files, the lp daemon seems to be on permanent vacation.
>

[ This is a reply to email received from <levin@magnus.Hotline.Com>.
  Unfortunately, our host tables have never heard of Hotline.Com     ]

[ <levin@magnus.Hotline.Com> suggested that lpsched must be run by
   the user, lp.                                                     ]

Thanks for the suggestion, but no cigar.  I had tried that and just tried it
again.  lpadmin followed by accept followed by enable followed by lpsched,
the last both foreground and background.  All were given appropriate arguments.
All reported no errors.  All returned 0 exit codes.  Lpstat and ps still
report that the scheduler is not running.  In any case, lpsched is suid lp.
Well, it worked before, but it doesn't work now.  Back to the circuit board
as they say.

[  P.S.  For those of you still reading this post, I have tacked an
         "ls -l" following a backgrounded (?) lpsched.  And yes,
	 indeed, both FIFO and SCHEDLOCK are being created in the
	 /usr/spool/lp directory and then almost immediately removed
	 as lpsched terminates.  The only entries in my log file say
	 "* STOPPED *" (where *s are replaced by useful information
	 like the time of the log entry).  Any ideas on how I can
	 debug this thing?                                           ]

Ned Nowotny, MCC CAD Program, Box 200195, Austin, TX  78720  Ph: (512) 338-3715
ARPA: ned@mcc.com                   UUCP: ...!cs.utexas.edu!milano!cadillac!ned
-------------------------------------------------------------------------------
"We have ways to make you scream." - Intel advertisement in the June 1989 DDJ.

bob@rush.cts.com (Bob Ames) (08/30/89)

In article <2572@cadillac.CAD.MCC.COM> ned%cad@MCC.COM (Ned Nowotny) writes:
>
>[ lots of lp problems ]
>
>Ned Nowotny, MCC CAD Program, Box 200195, Austin, TX  78720  Ph: (512) 338-3715

I`ve had this problem with several of our UNIX PCs...

The Hotline once took about an hour, dialed-in, to fix this...
I have since done it several times...

It`s been a few months, so this may not be *EXACTLY* correct...
The usual disclaimers apply.  If you feel real familiar working in
root, then you probably won`t have any problems...

If you screw up your machine, don`t call me |-)

# zap lpsched
# cd /usr/spool/lp
# rm [A-Z]*
# cd class
# rm *
# cd ../interface
# rm *
# cd ../member
# rm *
# cd ../request
# rm -r *
# cd ..
# >default
# >log
# >oldlog
# rm outputq pstatus qstatus seqfile

now go to your Office and Setup your Printer...

Either right before of right after the previous step, you will need to
# /usr/lib/lpsched
{Since lpsched on UNIX PC is suid lp, either root or lp can execute it}

I can`t remember whether lpsched is done before or after the Setups...

BTW: I`ve also had to do this on a few Data General MV4000s running dgux.
On the DG, the lpadmin commands [that Printer-Setup runs on UNIX PC] had
to be exeuted prior to lpsched.

This seems to be a somewhat common problem among System V sites.

Bob Ames

Bob Ames   The National Organization for  the Reform of Marijuana Laws, NORML 
"Pot is the world's best source of complete protein, alcohol fuel, and paper,
is the best fire de-erosion seed, and is america's largest cash crop." - USDA
bob@rush.cts.com or ncr-sd!rush!bob@nosc.mil  or rutgers!ucsd!ncr-sd!rush!bob
619-741-UN2X "We each pay a fabulous price for our visions of paradise," Rush

john@banzai.UUCP (John Canning) (08/30/89)

In article <2572@cadillac.CAD.MCC.COM> ned%cad@MCC.COM (Ned Nowotny) writes:
>>
>>Since installing a WD2010 and MS3085 and reinstalling the system software
>>and my own local files, the lp daemon seems to be on permanent vacation.
>>
>

Unix 3.5 and 3.51 is delivered with an interesting "feature" in the
lp programs.  Both the programs enable and accept have the set user id
bit set on them.  However, one program is owned by lp, and the other
is owned by root.  In order for these programs to work, they BOTH
must be owned by root.

So, make yourself super-user, and use chown to set the ownership to
root on both files.  One of the programs is located in /usr/bin, the
other is located in /usr/lib.

I am doing this away from a 3B1, which is why I am being so unspecific
about which program is at fault...

John Canning					...uunet!uvm-gen!banzai!john
The People's Computer Company			...attmail!banzai!john
Williston, Vermont				john@banzai.pcc.com
802-864-0747

tkacik@rphroy.UUCP (Tom Tkacik) (08/30/89)

In article <2563@cadillac.CAD.MCC.COM> ned%cad@MCC.COM (Ned Nowotny) writes:
>
>Since installing a WD2010 and MS3085 and reinstalling the system software
>and my own local files, the lp daemon seems to be on permanent vacation.
>
>Now, the printer and printer port (parallel) is working fine.  A "cat >
>/dev/lp" works just fine.
>                                           However, lpstat and ps both tell
>me that the lp schedular is not running.  Before providing gory transcripts,
>can anyone offer a suggestion as to what may be going on?
>
I had the same problem about 6 months ago.  Nothing worked.
I tried starting it manually.  Becoming root, and lp.  No good.
I tried it using the UA.  It still would not work.
I eventually found the book "Unix System Administration" by
D. Fiedler and B. Hunter.  It contains a very thorough chapter describing
how lp works.

I used it to completely rebuild the lp spooler.  I looked at each file and
directory to make sure that everything was proper.
I discovered that the problem was a missing file.
(I do not remember, but I think that it was either
/usr/spool/lp/class/Parallel  or  /usr/spool/lp/member/Epson.)

The UA obviously makes the printer a member of the class Parallel,
and it must be treated as such.
The following is a listing of the files in my /usr/spool/lp directory.
This is followed by the contents of those two missing files.
Make sure that you have the class, member and interface files.

$ ls -CFR /usr/spool/lp
FIFO 		class/		log 		oldlog 		qstatus 
SCHEDLOCK 	default 	member/		outputq 	request/
baudrates 	interface/	model/		pstatus 	seqfile 
/usr/spool/lp/class:
Parallel 
/usr/spool/lp/interface:
Epson*
/usr/spool/lp/member:
Epson 
/usr/spool/lp/model:
Epson*		dumb-remote*	imagen_S*	second-remote*
dumb*		dumb_S*		n450*
/usr/spool/lp/request:
Epson/		Parallel/
/usr/spool/lp/request/Epson:
/usr/spool/lp/request/Parallel:

$ cat /usr/spool/lp/class/Parallel
Epson

$ cat /usr/spool/lp/member/Epson
/dev/lp
Parallel

After making sure that all of the files existed, the lp scheduler finally
started right up.
I would be interested if this is also your problem.

Good luck
---
Tom Tkacik		GM Research Labs,   Warren MI  48090
uunet!edsews!rphroy!megatron!tkacik
"If you can't stand the bugs, stay out of the roach-motel."  Ron Guilmette
-- 
---
Tom Tkacik		GM Research Labs,   Warren MI  48090
uunet!edsews!rphroy!megatron!tkacik
"If you can't stand the bugs, stay out of the roach-motel."  Ron Guilmette