<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">For anyone who may run into this see "<span class="Apple-style-span" style="font-size: 12px; "><b>FS shutdown not closing TCP port causes TIME_WAIT problems" for follow up and solution.</b></span><div><div>On Apr 2, 2012, at 1:33 PM, Mario G wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>That's what I was thinking, trying to figure out how now. Will post a solution when I get one.<br><br>On Apr 2, 2012, at 1:28 PM, Anthony Minessale wrote:<br><br><blockquote type="cite"><blockquote type="cite">From what I see, sofia uses the REUSEADDR flag so I will bet its yet<br></blockquote></blockquote><blockquote type="cite">another MAC specific thing.<br></blockquote><blockquote type="cite">I am not really sure what you can do since you tend to find issues<br></blockquote><blockquote type="cite">deep inside libsofia-sip and its portability to OSX.<br></blockquote><blockquote type="cite">Maybe make your restart script sleep a bit?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c:<br></blockquote><blockquote type="cite">su_setreuseaddr(socket, 1);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Mon, Apr 2, 2012 at 3:13 PM, Mario G &lt;<a href="mailto:mario_fs@mgtech.com">mario_fs@mgtech.com</a>&gt; wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">If FS is shutdown and started too quickly, the internal profile ip/port stays in use and FS will fail to start it. After searching on the wen I found many references to TIME_WAIT but all fixes were to the program source. So I am wondering if when FS/sofia shuts down they are not releasing the ip/port for internal. If it's true, I found some source changes to solve it. Google "TIME-WAIT" and you'll find lots of good stuff like <a href="http://serverfault.com/questions/329845/how-to-forcibly-close-a-socket-in-time-wait">http://serverfault.com/questions/329845/how-to-forcibly-close-a-socket-in-time-wait</a>. Apparently there is no way to free up the port manually. Help/comments anyone?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Mario G<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_________________________________________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Professional FreeSWITCH Consulting Services:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.cudatel.com">http://www.cudatel.com</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Official FreeSWITCH Sites<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.cluecon.com">http://www.cluecon.com</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">FreeSWITCH-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">Anthony Minessale II<br></blockquote><blockquote type="cite"><br></blockquote><br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></div></blockquote></div><br></body></html>