2007-04-16 hypertwins printing problem

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Revision as of 02:02, 17 April 2007 by Woozle (talk | contribs) (New page: ==Introduction== category:dated itemscategory:hypertwins networkcategory:tech notesSoon after a recent upgrade of Fedora Core from version 4 to version 6, Bunsen suddenly s...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

Soon after a recent upgrade of Fedora Core from version 4 to version 6, Bunsen suddenly stopped being able to print to the Brother laser printer attached to it via USB cable.

Although it seemed unlikely, I had to rule out the possibility that there was actually something wrong with the printer (or cable), and therefore connected it to Gonzo (running Ubuntu 6.10) for testing. It worked fine there. However, I was still unable to get Bunsen to print to it while physically attached... but it seemed to have no problem printing to the Brother attached to Gonzo.

However, none of the other machines from which we regularly need to print (all of which are running Windows 98) could print to Gonzo. They would happly admit that they could see the Brother printer attached to Gonzo and allow it to be added to their "Printers" folder, but upon trying to print a test page we get a dialog saying that "the network name could not be found".

However again, just to make life interesting and provide a temporary workaround, we found that we could print to the not-really-there Brother printer on Bunsen, and then once the job appeared in the queue (in the CUPS control panel applet) tell Bunsen to redirect it to the Brother on Gonzo. This was awkward, but at least allowed us to continue using the laser printer while we tried to figure out what was going on.

Unfortunately, a week or more went by with no solution, and I tried tweaking some settings on Bunsen and suddenly Bunsen could no longer print to the Brother on Gonzo. Un-tweaking the settings has not made things start working. So now only Gonzo can print to the Brother, which means that no Windows programs can print to the laser printer at all (which is a problem for our postage-printing software, as barcodes don't do so well in smearable inkjet).

Some clues

The "network name could not be found" message appears to be the plain-english version of WIN32 error code 0xC00000CC, represented in code by the constant STATUS_BAD_NETWORK_NAME. (An example of how to deliberately cause this error is here.) It also appears to be poorly worded; what it means is that the machine in question (in this case Gonzo) could not find the requested share (in this case "\\GONZO\BROTHER"). Which is very weird, because if you run smbtree it will happily show that the Brother is being shared as such:

       \\GONZO                         Samba 3.0.22
               \\GONZO\brother         BROTHER HL-1250
               \\GONZO\Epson           EPSON Stylus Photo R320
               \\GONZO\HP890C          HP DeskJet 890C
               \\GONZO\ADMIN$          IPC Service (Samba 3.0.22)
               \\GONZO\IPC$            IPC Service (Samba 3.0.22)
               \\GONZO\SCRATCH         and sniff
               \\GONZO\STUFF           and things
               \\GONZO\Public
               \\GONZO\Files           File system, read-only
               \\GONZO\homes           Home Directories

(The other 2 printers listed here – the Epson and the HP – are shared from other machines, both running Win98. Gonzo has no problem printing to them, nor does anyone else.)

So I broke out the big guns and used Wireshark to take a look at the network traffic between a sample machine (in this case Scooter, a laptop also running Ubuntu 6.10) and Gonzo, and found that Gonzo was going all Apostle Peter on me and denying its Brother:

pkt # from to what
999 192.168.0.100 (Scooter) 192.168.0.254 (Gonzo) Tree Connect AndX Request, Path: \\GONZO\BROTHER
1000 192.168.0.254 (Gonzo) 192.168.0.100 (Scooter) Tree Connect AndX Response, Error: STATUS_BAD_NETWORK_NAME

Not expecting it to help, I tried renaming the printer to uppercase ("BROTHER" instead of "Brother") on both Scooter and Gonzo, in case some kind of annoying case-sensitivity was at work, but no luck there. (Note: after renaming a printer in CUPS, you have to restart either CUPS or Samba or perhaps both in order to get the new name to show up in the list of shares.)

So I'm back to being mystified, and am going to read more about Samba, as I'm pretty sure the problem is not with CUPS.

Another thing I need to try is having Bunsen talk to Gonzo's Brother via CUPS instead of via Samba; this may revive our temporary workaround, and perhaps I can figure out why Bunsen is accepting printer jobs when Gonzo isn't. --Woozle 22:02, 16 April 2007 (EDT)