Flash SWF Will not load on Solaris in Firefox
UPDATE + SOLUTION ===============================
Sorry to be posting the solution here instead of in a comment, but something about my work's filtering doesn't allow the comment functionality to work for me.
I ended up using the -b 0.0.0.0 property in jboss to bind to all addresses, so I could try accessing machine A's server with machine B as the client, and vice-versa. I found that it always failed to load when running on machine B, whether or not I was connecting from A or B.
I started wireshark on a windows machine on the same network, and observed the TCP connection that was loading the webpage. I saw that the request for the .swf in the cases where it failed had a content length of 2 million or so, and when I right clicked the wireshark logs and selected "view conversation" or something like that, the size of the total conversation to get the .swf file was only 130,000. Looking at about:cache, that was about equal to what it ended up caching before saying "Done" on the page.
I ended up finding that there is a bug with the useSendFile property. (http://community.jboss.org/thread/148651?tstart=0). This causes it to only send part of the file if you are running low on kernel memory. Using useSendFile="false" in our server.xml has seemed to resolve the problem.
=====================================================
Original problem:
I have a flash .swf file that loads intermittently in Firefox on Solaris 10. I have tried Firefox 2 and 3, and Flashplayer 10 and 10.1 on various Solaris patch levels, and none have worked consistently. It seems to be a caching issue, but I don't know what I need to do to fix it.
Upon starting firefox with a freshly cleared cache, and going to my webpage (on localhost) that contains the swf, I can see the Firefox does a GET request to the JBoss server to get the swf file. The content-type is properly recognized as application/x-shockwave-flash and the contentLength of the response is 2240830 with a status of 200, signifying that the whole file was sent. After this response, the page appears as a black background with the flash "Loading" bar, which is about 5% complete. At this point, I would have expected it to show up because it did get the full file.
When I go to about:cache after this and look at Disk Cache entries, I see a "Data size" of 196608 bytes, so it seems like it has cached only part of the file.
Since it has not loaded in the window, I do a refresh of the browser. I see it request in the header range bytes field "196608 -" so it looks like it is requesting what it does not have cached. The application server responds with a correct content type, status of 206 (partial content), and a length of 2044222. Refreshing the cache, it is now listed as 393216 bytes.
I do another refresh, get another partial content response, and then my flash file is loaded. In about:cache, I see the data size as 2240830, the size of the original response with a status of 200.
Why did my flash file not load after the first response (the one with a 200 OK status that returned the full file). Why would it cache only part of it, and why would it not automatically request the rest of the file?
Everything works fine on the Windows install with the same version of the .swf file, the same version of the application server, and the same version of firefox and flash player.
EDIT: Since I'm having trouble posting comments in reply, I'll just add here. There is no debug version for Solaris. I have one o开发者_开发知识库n Windows, but it works fine there. It does work on Solaris after a few refreshes, and the wrong size in the cache in Firefox leads me to believe it's probably an issue with caching.
精彩评论