Archive for June, 2009
Adobe Community Moderator
Posted by Jay Charles | Filed under General Nonsense
Last week, I was invited to become an Adobe Community Moderator… an invitation I’ve gladly accepted. I spend a lot of time contributing to support forums [the Adobe FMS forum in particular], and while I don’t do it for recognition, it’s really nice to know that my contributions are valued.
As a Community Moderator, I’ll help with managing comments posted to the Adobe LiveDocs, and contribute notes, comments, etc. where I can.
FMS Connections Failing On Mac OS 10.5? It’s not your fault.
Posted by Jay Charles | Filed under Flash Platform
A client of mine recently came to me with reports of Mac users having problems connecting to their streaming video application. From the user’s view, the video simply wasn’t playing, creating suspicion that there was an FMS code or Flashplayer bug at play.
Although I’ve become [for the most part] a die hard Mac hater, I keep a couple of Macs in the office for testing applications (or perhaps more to the point, seeing what doesn’t work on Mac, or makes the browser crash on Mac, or what gives me that stupid spining color wheel on Mac, or…). One runs OS 10.4 (Tiger), the other runs OS 10.5(Leopard)
Since I knew for sure that my client’s FMS application was well coded, and I knew that it works flawlessly on Windows, I came into the investigation with reasonable confidence that the problem has to be specific to the Mac. My OS 10.4 machine connected without issue, so it was clear that the problem is OS 10.5 specific
While testing on OS 10.5, I found that I was able to connect to the application, but it was taking an unreasonable period of time for the connection to be established… upwards of 25 seconds. I further found that refreshing the page (after connecting) resulted in a successful connection almost immediately.
That result made DNS issues my primary suspect. After clearing out my dns cache, I started a tcpdump session to see what was going on. It turns out that OS 10.5 is first attempting an IPv6 SRV lookup, rather than an IPv4 A record lookup. In fact, the Mac was trying several SRV lookups before finally falling back to an A record lookup.
Unfortunately, if your router, your DNS, or the host DNS does not support IPv6, you have to sit there waiting for all of those SRV lookups to fail before you finally get your A record lookup. That’s not such a big deal when it comes to HTTP requests, but it can be catastrophic for FMS applications. When the Flashplayer initiates a connection, a timeout is set. If the connection isn’t successful or rejected before that time runs out, the Flashplayer throws a failure event. Since waiting for those SRV lookups to fail can take a while, there are situations where the netconnection.connect() will time out before the DNS lookup is completed. Although this isn’t a flashplayer or FMs bug, the problem makes it appear [to some OS 10.5 users] that your application is broken.
There are two ways I can think of working around this problem:
1. Use IP addresses for your FMS servers instead of domains. Of course, this means that you can’t access a named Vhost… all of your junk has to run from the _defaultVhost_ .
2. Rework your client side netconnection’s status event handler to retry the connection after a failure. This sucks to the Nth degree, as it means you have to delay failure handling even for genuine failures, so your users get to wait even longer to be told the server isn’t available.
Personally, I hate both of those approaches, as it means limiting your deployment options or degrading your application to serve the poor design of a specific version of a specific vendor’s operating system.
Some might argue that OS 10.5 is actually doing the “right” thing by embracing modern standards. I suppose I can see the point way off in the distance there (blurry… but I see it). The problem there is that [most of] the rest of the world is not running on IPv6 and SRV yet (how many hosts/sites/service providers do you know to be using IPv6?), so really, this is a case of Apple engineers shooting their customers in the foot, and making life generally aggrivating for developers like me.
As best I can tell, there is no OS level configuration setting for this, so if there’s anywhere in the lookup process that IPv6 isn’t supported you’re stuck waiting each time a DNS lookup is done, making this item #26580 on my list of reasons to hate Mac OS. Don’t believe the hype… the pretty box is a lie (although it makes for a nice doorstop).