Date: Fri, 11 Feb 2000 17:18:04 -0500 From: "Charles N. Owens" <owensc@enc.edu> To: Nik Clayton <nik@FreeBSD.ORG> Cc: questions@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: FreeBSD 3.4, Samba, HP LaserJet 5N, delays, reboots Message-ID: <38A48A9C.A3BB2D75@enc.edu> References: <20000211123416.A92889@catkin.nothing-going-on.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Nik, I've been been aware of this issue for a long time. I've never found time to nail down a fix for it, but our printers are used lightly enough that its not usually a big deal. Here's the story: It has nothing to do with Windows print drivers, or Samba, or lp hardware settings, etc. The root cause lies totally with the HP JetDirect network print "servers" themselves. The HP JetDirect units (both the units built into printers like yours and the external models) have what seems to me to be a broken TCP/IP stack. They'll only accept a single TCP/IP connection at a time! (You can find mention of this somewhere in the JetDirect docs). Since the printer can't adequately queue multiple jobs and is usually front-ended with a server this doesn't seem at first glance to be a big deal (since the server will only send one job at a time). While a job is being sent, however, the single-TCP connection limitation means that it cannot respond to lpq queries!! Very bogus! You can see this for yourself... lpq works just fine when there are no jobs in the queue. Shove a bunch of jobs in the queue and try lpq again... it will print out the list of jobs in the local server queue but as it then tries to query the printer it gets no response and will just sit there waiting. As long as your Windows users never use the printer control panel to check job status things should be generally fine... If they do use it and there are no jobs currently in that Samba (lpd) queue then every thing will still seem fine. If however the print status window is opened while there _are_ jobs in the queue they'll get this terrible hanging system problem. When this happens samba is calling lpq, which of course hangs because it gets no answer from the printer. I'm not 100% sure what the proper workaround is. Perhaps an added flag in printcap that tells lpd not to query the next hop when answering lpq queries. Or maybe some kind of aggressive timeout mechanism... Suggestions anyone? later, Charles Nik Clayton wrote: > Hi folks, > > [x-posted to -stable, I explain why below] > > God knows where the problem is in this particular set up, I'm hoping this > rings a bell with someone. > > I've got a FreeBSD 3.4 machine running Samba 2.0.6, right out of the > ports tree. This machine is the PDC for 5 Windows 98 machines, and > things work well -- log ins, file sharing, and so forth. > > There's also an HP LaserJet 5N on this network, and the Windows machines > need to print to it. > > I've got it set up and connected to the network (i.e., it's *not* > connected by a parallel connection to any of the other machines) and > an /etc/printcap entry on the FreeBSD machine which simply forwards all > jobs to the LPD on the printer (i.e., with an 'rm=' entry). With a > '[printers]' section in smb.conf, this just works. Windows 98 machines > can print to it, jobs appear in the spooler, jobs can be cancelled, and so on. > > The FreeBSD and Windows machines all have 100MB NICs, the printer has a > 10MB NIC, and they're connected using a NetGear 16 port hub. > > However, there's one snag. As soon as there's more than one print job > in the queue (either 2 or more jobs from one machine, or 2 or more jobs > from multiple machines) the applications that are printing on each host > hang (hourglass, unresponsive to input) until the print jobs have gone > through. The Windows 98 hosts have the most up to date drivers from HP. > > I've not seen this before. > > Thinking that the LPD on the printer might not be up to snuff, I tried > connecting to the printer directly to the FreeBSD machine, and using a > 'raw' printcap entry just to pass jobs down the parallel port untouched. > After restarting everything, I tried printing from a Windows machine. > > Boom. The FreeBSD machine spontaneously reboots, with no console messages, > and nothing in the log. I try it again, just to be sure, and the same > thing happens. > > I've x-posted this to -stable because I've got dim memories of someone > else reporting similar problems in the past fortnight or so. But with > the mailing list search engines being down I can't go back to check. > > FWIW, I've done similar setups, with with Epson stylus printers connected > to a FreeBSD -stable machine, and printing through Samba, and haven't > seen anything like this. > > At this point I'm pretty much clutching at straws. It could be a > FreeBSD lpd / HP lpd interaction problem; it might be a Windows 98 > problem; it might be a 100MB/10MB problem. . . > > And I'm concerned that printing from Windows to FreeBSD can cause FreeBSD > to reboot. > > I've done the usual deja.com/google.com/hp.com searches, and haven't > turned up anything concrete. > > Any ideas? > > N > -- > If you want to imagine the future, imagine a tennis shoe stamping > on a penguin's face forever. > --- with apologies to George Orwell > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message -- ------------------------------------------------------------------------- Charles N. Owens Email: owensc@enc.edu http://www.enc.edu/~owensc Network & Systems Administrator Information Technology Services "Outside of a dog, a book is a man's Eastern Nazarene College best friend. Inside of a dog it's too dark to read." - Groucho Marx ------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38A48A9C.A3BB2D75>