MacOS – Aborted localhost http requests — how to troubleshoot

macosNetwork

I've got a webserver running on localhost (not the one built into OSX — a different, proprietary webserver). I do most of my web app dev there, refreshing the browser to reload, etc. This has worked flawlessly for years. Lately though I've been having a bizarre problem.

Some of the resources (different ones each time) simply aren't loading — they show status Aborted in Firebug.

enter image description here

When I enable the deepest level of debugs on the webserver, I can verify that the webserver never sees the requests at all. The webserver does not see these requests, as if they never happened.

The only way I've found to resolve this is to restart my macbook. Other things I've tried unsuccessfully:

  • changing IP and Port – doesn't help
  • restarting loopback interface (sudo ifconfig lo0 down; sudo ifconfig lo0 up) – doesn't help
  • Have disabled all plugins/extensions in FF & Chrome – doesn't help

How can I get to the bottom of this? What kinds of issues may be at the root of it?

Here is some more info that may help:

  • OSX 10.7.5
  • Webserver is Webcluster 5.2 (a java based HTTP server my company developed — you haven't heard of it 😉
  • The webserver is restarted often through the day — meaning the IP+port is dropped and then reattached frequently
  • Happens both when wifi and when cabled
  • Happens both on our VPN and off it
  • Seeing this in Firefox 20.0, Chrome 26.0.1410.65, and Safari 6.0.4.

Best Answer

This application was frequently (20+ times a day) un binding and binding the ip+port. Once I refactored this to stop doing that, it no longer has had problems.