NetConnection failing on second try

I have a small audio stream between two clients in a chatroom app (using Red5 for the streaming). Now when I connect to Red5 on the first try everything works just fine. If I close the app and try again I get the following error:


Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Connect.Failed
 at lmt_tutor_test2_fla::MainTimeline/lmt_tutor_test2_fla::frame1()
Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Connect.Failed
 at lmt_tutor_test2_fla::MainTimeline/lmt_tutor_test2_fla::frame1()

the code for the connection:


var ns_in:NetStream;
var ns_out:NetStream;
nc_out.connect("rtmp://localhost/oflaDemo");
nc_in.connect("rtmp://localhost/oflaDemo");

pretty straightforward.
The really strange part is that if I restart Tomcat ( I also have Tomcat5 running on the same machine) it will work again (only the first time).
I don’t have Tomcat touching a port anything close to what Red5 uses so how does restarting that webserver affect the NetConnection?
Anyone else ever have this same sort of problem with NetConnection?
Thanks in advance.