Thursday, March 12, 2009

Printers disappear or won't work in Mac OS X

I had a few OS X users who had their printers disappear this week. When I tried to add them, an error would pop-up saying "server-error-service-unavailable". I assumed the print spooler/service had stopped, but wasn't sure how to reset it. A simple restart fixed one of the machines, but the other continued having problems. I did a quick search and ran across Apple KB TS1975. It explains how to restart the printing system using Terminal. I ran through the steps quickly, restarted, and the printers were back, and working. First off, you must be logged in with administrative credentials to follow these steps:

1. Open Applications->Utilities->Terminal
2. In the prompt, change the directory to /var/spool using the command: cd /var/spool/ and pressing Enter
3. Use the command sudo mkdir cups. This will elevate your permissions to try to create a new folder called "cups". It may ask for your password, which you can Enter. Also, if you get an error saying the directory already exists, ignore it an continue on with the rest of the steps
4. Now use the command sudo chown daemon:admin cups. This will change the owner of the "cups" folder.
5. Now use sudo chmod 700 cups, which will change the permissions on the "cups" folder
6. After you're done running through those commands, quit Terminal and reboot. The printers that you had setup before should be back, and you should be able to print again.

While trying to find the link to that article for this post I also ran across Apple KB HT1341. You may want to try that first if you're running OS X 10.4 or 10.5, unless you're itching to go through the Terminal commands. There's less room for error, and it's just a few mouse clicks.

6 comments:

Alan Brown said...

I suspect that the BrowseTimeout value needs to be manually set if network printers are disappearing.

Lokking through logfiles on a couple of Macs that had the problem locally indicated it was defaulting to 35 seconds - this is too short and should default to 600 seconds.

As the default Cups BrowseInterval is 30 seconds there is too much risk of losing broadcasts and deregistering a printer. Presumably apple shortened the time to "improve" things when printers are switched off, but I don't think flapping network printers is an improvement.

rslygh said...

Maybe. The only time I've seen this happen was the week I posted the article back in 2009.

Mar C said...

All in all, i define the mac pro has unable to work in a company network enviorment. that goes for printers as well as NAS. I am really surprised at the narrow minded thinking of Apple. are we all suposed to throw out our corporate networks?

Vagabond said...

Um, I don't know where you're coming from there Freedom but Macs work great in a corporate network. I have no problems working with my Windows-based NAS either. And we're talking a 60000 person strong business.

rslygh said...

Macs seemed to get progressively better in the corporate network up until Lion, which I feel has taken a step backwards. In my opinion OS X Lion is Apple's version of Windows Vista. I'm hoping Mountain Lion will fix the AD issues that seemed fine in Snow Leopard but stopped working in Lion, just like how Snow Leopard fixed the AD issues Leopard had.

MIke said...

8 years old post and yet this solution just saved me working in OS Mojave. No idea why my printers disappeared. Wasn't upgrade related (been on Mojave for over a year) but maybe after a restart? In any case, these terminal commands did the trick after nothing else worked. Thank you!