05 December 2011

Troubleshooting UCMA applications - Microsoft Lync, DNS entries, and failed calls

Written by Chris Bardon, Posted in Troubleshooting, Lync, Microsoft

UCMA application troubleshooting

One of the most frustrating things that you can run into when working with UCMA is starting your application, placing a call to it, and having that call fail.  As far as your code is concerned, everything is great.  Calls worked yesterday, calls work for other developers, but for some reason, your call is failing.  At this point, the only real way to track down what’s going on is to go on the server and run OCSLogger.exe and trace the call.

At this point, you may notice that Microsoft Lync is routing calls to the wrong IP address, which can happen for several reasons, usually to do with something like switching from wired to wireless, or going on or off a VPN.  If you go to a command prompt and run an nslookup on your machine, you may even see the same, incorrect address coming back.  If you run the same nslookup from the lync server, you’ll almost definitely see the wrong address coming back from DNS.

The solution to this is reasonably simple.  From your dev machine, run “ipconfig /registerDNS”, which forces your DNS registration to update with your actual IP address.  Then run “ipconfig /flushDNS” and then nslookup to verify that the new address is being returned.  Do the same on the lync server (flush DNS and nslookup) to verify that everyone does indeed know what the correct address for your server is.  Now, try your call again.

Surprise-your call will probably fail this time too!  Even though the OS knows what your IP address is now, Lync appears to keep its own DNS cache that I have yet to find a way to clear.  The good news is that it will time out (it appears to be about 15 minutes) so calls will eventually work again.  If you’re really impatient though, you can restart the front end service at this point, however this isn’t always an option.

Now, the likelihood of this coming up in production is pretty minimal, but in development I’ve run into it all the time.  It’s a fairly simple fix once you know what to look for.  Note that if anyone knows how to clear the internal Lync DNS cache from powershell, please let me know in the comments.

Share

blog comments powered by Disqus

About the Author

Chris Bardon

Chris is the Chief Software Architect at ComputerTalk Technology, and has been writing code in one form or another since the mid 80s.  He’s been working with Lync since it was called Live Communciations Server (back in 2004), and he’s been working with .NET since 2002.  He’s a big fan of UCMA, WCF, and XAML, and knows enough about most of the Microsoft development technologies to be dangerous. He also collects pinball machines.