Discover which programs prevent disk image ejection

I stumbled across this great tip the other day about solving that pesky error message that happens when you try and eject a that is busy disk. This seems to happen all too often, I’ll try and eject one of my external hard drives and get the message even though there are no visible programs using it. Sigh. Use this commmand in Terminal:

lsof | grep DISKNAME

Read the full tip from Mac OS X Hints.

Leopard Server Quickstart Guide

Corey Carson was written a fantastic quickstart guide for Leopard Server.

This updated quickstart guide is very similar to the Tiger Server Quickstart Guide posted in 2005. It’s primary purpose is to get you up and running quickly, overcoming common hurdles such as DNS and binding confusions. With the move to launchd over cron, those steps are now included as well.

You can grab the pdf at AFP548.com.

The article includes some particularly good instructions on using and setting up rsync, launchd, and Network Home Redirector.

Via Infinity’s End.

You Are Unable to Log in to the User Account at Time

This one is just a quickie, but I thought I’d post it because I know that I’ve gotten this message before and that there is very little useful information turned up in a relevant Google search.

At my work we use an OS X server to host the home directories of all of our users who log in to our lab computers. We currently only support OS X clients, so we’re only doing this over AFP. Last semester we used a Tiger server and clients, but this summer we are upgrading everything to Leopard.

After setting up a test client computer in Directory Utility (used to be Directory Access in Tiger) to connect to our server I figured we were good to log in with one of migrated user accounts. We don’t do binding or Active Directory or really anything complicated so usually the process is pretty straightforward.

After setting up the client and restarting, I attempted to log on using one of our network users, and was met with this big fat error message:

You are unable to log in to the user account [username] at this  time

Not only did not logging in not work, but the entire description of the error read “Logging in to the account failed because an error occurred”. Gee, thanks Apple. Very useful.

This error wasn’t entirely foreign to me. I remembered seeing it occasionally in Tiger, but couldn’t remember if we had ever established a cause, let alone a solution. Just for kicks I tried logging on with the same account on one of our older Tiger clients (that was known to work with the old Tiger server). The message is slightly more verbose, but generally still the same:

You are unable to log in to the user account [username] at this  time (Tiger Message)

I knew that AFP was working because we had some share points up and running. So, AFP and at least some level of authentication were working. After inspecting the server firewall and open directory logs, as well as the client logs, it seemed clear that the user was authenticating properly. It was something that was happening after the actual successful authentication that was causing the error message.

After some research and thought, it occurred to me that it was very likely that there was some sort of configuration gone awry with the actual home directories. Then I realized that I had completely neglected to actually configure the old home directories on our server to be shared at all!

So basically the user was logging in and authenticating successfully. Then when the client asked for the home directory the server was like, what home directory? And the client was like aww shit. I’m gonna log you out right now ’cause I need your home to work. And the server was like, all right, fine. Something like that.

After some simple home directory sharing configurations, everything was running without another episode. Sigh.

Unresponsive Server in ARD

For the past several weeks at work I’ve been gradually working on upgrading our OS X server from Leopard to Tiger. The process has certainly not been without hiccups, but it has gone smoothly for the most part.

After an initial false start attempting to simply upgrade the server, I ended up simply installing the Leopard server from a blank disk. This seemed to take care of most of the really strange things that were happening after the upgrade.

This particular server is of the headless XServe variety, so we primarily use Apple Remote Desktop to access it in addition to the Server Admin Tools and SSH. Since installing Leopard on the server however, I’ve been noticing that at times it is acting erratically. Usually I’ll first notice that the server will either stop showing up in ARD or it show up as black, indicating that there is no ARD agent on the computer. I’ve tried restarting the computer, which will fix it, but that’s not a very good solution for obvious reasons.

I had also noticed while using Server Admin that sometimes the server CPU is running at completely full capacity, like in this screenshot:

OS X Server CPU gone crazy

The other day the server stopped responding in ARD again. As usual though, I was still able to access it through both Server Admin and SSH. After a little research, I found this useful page of commands, which includes this one-liner:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -menu

Running this command restarts the ARD Agent, which is what we want if it is frozen. Once I did this things got a little better, and the server came up in ARD as active. I tried controlling the server through ARD, but no dice, still no connection.

At this point I noticed that there was a user logged on to the server and I remembered that I had also been having problems with VNCDragHelper freezing. I found this on an Apple discussion page:

When remotely managing an XServe with OS 10.5.1 from a 10.4.11 client with ARD 3.2, several times (3 up till now) the server UI becomes unresponsive, at least finder. This even gets worse when trying to start the Application Monitor, then also the Dock freezes, and the Application Monitor UI never opens. When doing an ssh> sudo top, it shows that both “Application Monitor” and “VNCDragHelper” do consume almost 100% CPU. Luckily only on a Single core, but that keeps two cores (one processor 100% busy). killall “Activity Monitor” brings the activity monitor down, when sending it with Remote Desktop Unix command.

Perfect, that must be it. In SSH, I ran the following command:

sudo killall -9 VNCDragHelper

I also killed the loginwindow because that appeared to be frozen as well (judging from the top command that I ran):

sudo killall -9 loginwindow

Suddenly after running both those commands, the server leapt back to responsiveness. I was able to access it in ARD without problem. Also, after about an hour I checked the CPU diagram in Server Admin and was able to see a noticeable improvement.

OS X Server CPU back to normal

Now that’s a sight for sore eyes. For reference, I was running 10.5.3 and ARD 3.1 when this problem happened. I’m not sure that anything has been fixed in 10.5.4 though.

Apple Mail Error 471

A couple of weeks ago I finally got around to actually upgrading to Leopard on my laptop. One of the things I was interested in trying out once I got upgraded was Apple Mail’s new Note feature.

I fired up Mail and clicked on the note icon and…nothing happened. Hmmm, check the Menu bar. Go to File → New Note…nothing again. Well okay, I thought to myself, somethings wrong here. Maybe I should do a Google search. Hmmm, what to search. Mail Notes Error. Umm, okay too generic, I’ll try being more specific. Apple Mail error opening new note. Grrr. Try several other search strings. #@$%*! 1

Okay, so it’s become clear to me at this point that Googling the problem is just not going to work. I decide to fire up Console to see if there are any enlightening error codes. Console does at least offer me something, in the form of “Mail[471] font-family cannot be nil”.

Mail Error-font-family cannot be nil

Hmm, that looks like gibberish to me. I do some more unsuccessful Google searches. Finally, I decide to attempt to decode that error again. That error means that somewhere a font family is not selected or unavailable. We know it’s happening when a new note is being created. I opened up Mail again and started pursuing the preferences. Low and behold, under the tab for Fonts & Colors, I found this:

Mail Preference Pane for Fonts and Colors

The field for the Note font is completely blank. I selected a font and attempted to open a new note. Success!

As it turned out, this happened to be a very simple solution for a very silly problem. That solution took me over an hour to figure out. Unfortunately, I’ve never been able to figure out why that field was blank in the first place. I wonder how many other people have had this exact same problem and just given up on trying to figure it out.

  1. Side Rant: What exactly was Apple thinking when they named their email client “Mail.” Could they have thought of a worse name? It is impossible to search for information about a problem with the program because “mail” could refer to so many things. It’s kind of like buying a computer, that has the model name of “computer.” Then say said computer one day won’t start up. You find another computer and start doing a search for the problem. Your query string is going to look something like this: [brand name] computer won’t start. Completely useless.


appointive
appointive
appointive
appointive