Solving a shared printer and hostname problem

Dec 17, '02 09:17:25AM

Contributed by: shacker

For months I was frustrated that a perfectly working Brother laser printer on our home network could not be used from other machines via Printer Sharing. The printer would show up (thanks to Rendezvous) in other machines' Print Centers, but attempts to print to it from them would fail with messages like "IPP0: Undefined error." The machine to which the printer is attached also hosts a domain, betips.net. But I had always referred to the machine as "gong" out of habit, and had set

HOSTNAME="gong"
in /etc/hostconfig. As it turns out, this caused a subtle discrepancy in hostname resolution that had never affected normal operation. The solution was to restore HOSTNAME="-AUTOMATIC-" in /etc/hostconfig and let OS X resolve the hostname automatically to www.betips.net. The fix almost seems obvious in retrospect, but Brother support, Apple Geniuses and I were all barking up the wrong tree, thinking it had to be a problem with the driver or in the CUPS layer.

The key troubleshooting tool turned out to be the semi-secret built-in CUPS http interface. Enable printer sharing and access http://localhost:631 on various machines on your network. From here, it became apparent that the printer was being seen with different names from different machines. Experiments with nslookup led to the hostname being the culprit.

Short lesson: Change your sharing name all you want, but don't mess with the hostname in /etc/hostconfig unless you really have a good reason to - some aspects of OS X would rather resolve hostnames automaticaly.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20021217061725233