[comp.sys.apollo] bsd4.3 lpd bug ???

ray3rd@ssc-vax.UUCP (Ray E. Saddler III) (11/10/89)

In article <1132@cernvax.UUCP>, achille@cernvax.UUCP (achille petrilli) says:
?
? [lead-in stuff deleted]
?
? 	6) lpc restart (or stop, start etc) always tells you
? 		'cannot start server' (or cannot stop server etc.)
?
? One of the entries that do not work looks like:
? 
? pawlp|line printer:\
?         :pc=/usr/apollo/bin/prf -banner off -text -npag -pr lw -headers off -s //geant -pre10:lp=/dev/null:\
		   ^^^^^^^^^
		   Oooohhhh!  I *do* believe this is your problem;
		   since /com/prf spools out to /sys/print/spooler,
		   and uses an sio port defined elsewhere, you're
		   not required to specify an output device (lp=).
		   SO, simply define 'lp like this:  :lp=:

		   I'll bet this'll work, it's happened to me
		   before on Apollo, Sun & Cimlinc boxes.
? 
? Thank you,
? 	Achille Petrilli
? 	Cray and PWS operations
? 
  You're welcome,

-- 
Ray E. Saddler III                 UseNet            ___ ___ ___ ___     ___
CAD System/Network Admin  uw-beaver!ssc-vax!ray3rd  /__//  //__  /  /\ //  _
P.O. Box 3999 m.s. 3R-05          PhoneNet         /__//__//__ _/_ /  //__/
Seattle, WA.  98124  USA      +1 206-657-2824      Missile Systems Division 

dbfunk@ICAEN.UIOWA.EDU (David B Funk) (11/10/89)

WRT your posting <1132@cernvax.UUCP>:

> we are trying to get lpd (bsd) running on two dn3500 to use them as servers for
> a couple of other Unix machines (SGI, Sun).
> I did it completely separately from one of my colleagues (who did the
> other dn3500) and we both came to the same point:

>	1) lbd is running
By this did you mean that "/usr/lib/lpd" is running or did you mean that
"/etc/ncs/llbd" is running? You need them BOTH for the bsd lpd printing system
to work. The Apollo sr10.1 implementation of bsd "/usr/lib/lpd" uses NCS
for server communications. Thus you must have "llbd" running on the node for
"lpd" to register when it starts.

>	2) the server is running (tb shows it is in 'listen')
I did a traceback on my "llbd" & "lpd" and both of them were in a 'select'.
Is this what you mean by 'listen'?
# traceback of "lpd":
$ tb 111
In routine  system service "ec2_$wait"
Called from "ec2_$wait_svc" line 164
Called from "select" line 170
Called from "main" line 285
Called from "unix_$main" line 114
Called from "_start" line 51
Called from "PM_$CALL" line 173
...

>	3) /dev/printer exists, is a pipe (AF_UNIX socket) and is
>		locked (llkob shows it is in cowriters mode)
>	4) netstat -a shows that somebody (lpd) is listening on
>		*.printer
These are as they should be for lpd printing to work. This looks OK.

>	5) lpr queues files and complains 'cannot start server'
>	6) lpc restart (or stop, start etc) always tells you
>		'cannot start server' (or cannot stop server etc.)
These sound like a communications (NCS) problem, "lpr" uses NCS to
talk to "lpd". Use "/etc/ncs/lb_admin" to check the local location broker
on the "lpd" node to see if it has registered. You should see something like:
	$ /etc/ncs/lb_admin
	lb_admin: set_broker local dds://ece2
	lb_admin:     lookup *
	                     *
	                     *
	------------
	      object = *
	        type = *
	   interface = bsd4.3_lpd
	"BSD4.3 lpd" @ dds://ece2[241] 
	------------

    One other possible unusual problem: the IP hostname must be the same as
the DDS node name. IE "/etc/hostname" must give the same name as the name
that the node's disk is cataloged with. If you use the standard Apollo
supplied "rc" files then this will be the case. If you've modified the
"rc.local" to register a different hostname at startup then you may have
problems. This is because "lpd" registers with the "dds" NCS address family
and "lpr" assumes that it can take the IP hostname to get the DDS hostname
for socket address lookup. So the bottom line is: you need to be able to
take the IP hostname as reported by "/etc/hostname" (on the "lpd" node) and
have it work as a DDS name for that node ("//node-name").
     I ran into this problem when setting up our printers as we use a 4 part
internet domain name for our nodes. IE /etc/hostame = "ece2.icaen.uiowa.edu"
on my lpd node so I had to register 2 names in "edns" for that node, "//ece2"
"//ece2.icaen.uiowa.edu" to make the lpd stuff work. Until I figured that
out, I had exactly the same problems that you have.

Your "/etc/printcap" entry looks OK.

Dave Funk

BTW to make our nodes load the multi-component host name at boot time,
I modified "rc.user" in the following way:
1) create a file "/etc/hosts.domain" with the domain name suffix in it
    (EG "icaen.uiowa.edu") and put a copy on all nodes.
2) catalog the node's disk with the first component of the hostname
    (as you would if you were just using simple names)
3) put the folllowing lines in "rc.local" before the start of "tcpd":

# LOCAL modification: add ability to put domain name in hostname
#
 if [ -f /etc/hostname -a -f /etc/hosts.domain ]; then
	my_host=`/etc/hostname`.`cat /etc/hosts.domain`
	/etc/hostname $my_host
 fi
#

mcguire@herky.cs.uiowa.edu (Charlie McGuire,6 MLH,3352730,,) (11/10/89)

From article <8911101022.AA00512@icaen.uiowa.edu>, by dbfunk@ICAEN.UIOWA.EDU (David B Funk):
Followup to lpd bug ...
> WRT your posting <1132@cernvax.UUCP>:
>> we are trying to get lpd (bsd) running on two dn3500 to use them as servers for
>> a couple of other Unix machines (SGI, Sun).
>> I did it completely separately from one of my colleagues (who did the
>> other dn3500) and we both came to the same point:
> 			.
> 
>>	5) lpr queues files and complains 'cannot start server'
>>	6) lpc restart (or stop, start etc) always tells you
>>		'cannot start server' (or cannot stop server etc.)
> These sound like a communications (NCS) problem, "lpr" uses NCS to
> talk to "lpd". Use "/etc/ncs/lb_admin" to check the local location broker
> on the "lpd" node to see if it has registered. 
			.
			.
			.
	If you are trying to run only one lpd daemon on your network with
	linked spool directories, then you must also make sure the Domain
	"prmgr" is running on the same node as lpd. You must also create
	the file /usr/spool/lpd/servername that contains the hostid of the
	node running lpd. If you are using 4-level IP hostnames, then this
	is the name that should appear here. (see below)
	I run my network print services this way with
	only one lpd daemon running. All other nodes link to the entire
	/usr/spool tree on this one machine. NCS uses the hostid in the
	servername file to "wake up" the lpd daemon.
 
>     One other possible unusual problem: the IP hostname must be the same as
> the DDS node name. IE "/etc/hostname" must give the same name as the name
> that the node's disk is cataloged with. 
			.
			.
			.
	This is true. I had the same problem and Dave helped me straighten 
	it out. The BSD stuff is distinct from the "dds" stuff. 

> Your "/etc/printcap" entry looks OK.

	I agree. The lp=/dev/null: line is ok also.
			.
			.
			.
> Dave Funk
--------------------------------------
Charlie McGuire
Systems Programmer
Computer Science Dept.
The University of Iowa
E-Mail:	mcguire@cs.uiowa.edu
	mcguire@math.uiowa.edu 
--------------------------------------