On a recent project for a customer, I learned an imporant Database Mirroring lesson: fully-qualified domain names (FQDNs) are essential!
Both Books Online and the mirroring wizard indicate that it's OK to specify the participating servers as IP addresses--so that's what I did. The witness came up fine, and the principal came up fine. Mirroring started, and I did a few manual failovers. Great!
But now I added the witness server and suddenly things started breaking down. The mirror instance couldn't connect with the witness, and the witness was throwing strange errors like:
Database mirroring connection error 4 'An error occurred while receiving data: '64(The specified network name is no longer available.)'.' for 'TCP://Server2:7024'.
...where "Server2" in this example is the mirror. Notice that the error doesn't include the IP address, but rather the server's name?
After banging my head against the table for a day or so, I wrote to about 50 people asking for help. No answers, and I thought I was out of luck until Don Vilen was kind enough to reply. Turns out, the problem is simple to fix: Don't use IP addresses, ever. Always use FQDNs! Thanks, Don!! Once the FQDNs were used, instead of the IP addresses, everything came up as expected and automatic failovers started working perfectly.
To find your server's FQDN, you can use "ipconfig" from the command prompt, and append the server name to the connection-specific DNS suffix.
I hope this post helps someone else avoid the frustration I went through. It was a rough couple of days trying to debug this problem and having to tell a customer that their planned HA solution might not work is not a fun situation to be in.