<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><b><br></b><div><div>On Apr 2, 2012, at 12:42 PM, Mario G wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Looks like I know what it is but have no idea how to fix it. Multiple tests are reproducible. I did a NETSTAT -p TCP to watch the .7 address (oddly port 5060 show up as "sip" in the netstat command on OSX). When FS comes down this port stays open for about 30 seconds which is longer than the FS restart takes so sofia says .7:5060 is in use. I also tied setting keep alive to 0. I now finally figured out the problem but.... Does anyone have an idea how to force the ip/port closed sooner? <br><br>On Apr 2, 2012, at 11:59 AM, Mario G wrote:<br><br><blockquote type="cite">There is a plist that starts FS when it is down, then another plist shuts it down once a day, the startup plist causes it to restart. It's exactly the ones I put in the FS OSX install wiki (speaking of I will update this week). It's odd that it ONLY happens when an extension is set to TCP. Also, I am assuming this is the problem... I will have to retest without the TCP extensions to see it it is.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Apr 2, 2012, at 11:47 AM, Peter Olsson wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">It means port 5060 is busy (probably by the old FS instance). How do you restart FS?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">/Peter<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">2 apr 2012 kl. 20:34 skrev "Mario G" &lt;mario_fs@mgtech.com&lt;<a href="mailto:mario_fs@mgtech.com">mailto:mario_fs@mgtech.com</a>&gt;&gt;:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">It is a plist on OSX. Has been fine since 2010. I duplicated the issue by setting the in the plist, here is a replacement since I turned on all kinds of logging and finally found a message. Here is an update:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">A TCP extension causes already in use MSG and &nbsp;Internal profile fails<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I added an iPad softphone (tested SoftPhone and Bria) that requires TCP and all works fine except: When FS is restarted 2am each day the INTERNAL profile is not activated causing all internal extensions to stay offline. If &nbsp;the TCP extension is off or set UDP all works. &nbsp;Anytime after the restart I can "sofia profile internal start" to fix it. I am on Saturdays (03-30) GIT (to test the new 1.2). The only thing I can find is the "Address already in use" below which is shortly followed by the error creating internal. The .7 address is FS and there is nothing else using it. Any ideas why it says in use ONLY when an extension is set for TCP?<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">tport_bind_server(0x1003a9850): calling tport_listen for tcp<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nta: master transport created<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_alloc_primary(0x1003a9850): new primary tport 0x1003993e0<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_listen(0x1003a9850): bind(pf=2 tcp/[100.234.1.7]:5060): Address already in use &nbsp;&nbsp;&lt;---------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nta: bind(100.234.1.7:5060;transport=*): Address already in use<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nua: initializing SIP stack failed<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nua: nua_stack_deinit: entering<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_bind_server(0x1006dd850) to */100.234.1.7:5078/sip<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">sres_sofia_update(0x1003a7e10, -1, -1)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">sres_sofia_update(0x0, -1, -1)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_destroy(0x1003a9850)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_bind_server(0x1006dd850): calling tport_listen for udp<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_alloc_primary(0x1006dd850): new primary tport 0x1003a9ba0<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">su_kqueue_port_deinit(0x10039e350) called<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_listen(0x1003a9ba0): listening at udp/100.234.1.7:5078/sip<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_bind_server(0x1006dd850): calling tport_listen for tcp<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_alloc_primary(0x1006dd850): new primary tport 0x10039e440<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_listen(0x10039e440): listening at tcp/100.234.1.7:5078/sip<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nta: bound to (100.234.1.7:5078;transport=*)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nta: agent_init_via: SIP/2.0/udp 100.234.1.7:5078 (sip)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nta: agent_init_via: SIP/2.0/tcp 100.234.1.7:5078 (sip)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nta: Via fields initialized<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nta: Contact header created<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">2012-04-02 11:00:35.147184 [ERR] sofia.c:1940 Error Creating SIP UA for profile: internal &nbsp;&nbsp;&lt;---------------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">nua_register: Adding contact URL '100.234.1.7' to list.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_wakeup_pri(0x1003a9ba0): events IN<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_recv_event(0x1003a9ba0)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tport_recv_iovec(0x1003a9ba0) msg 0x1003a74e0 from (udp/100.234.1.7:5078) has 20 bytes, veclen = 1<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Apr 2, 2012, at 11:08 AM, Michael Collins wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">What is the 2am restart? Is that a cron job or...?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Mon, Apr 2, 2012 at 9:14 AM, Mario G &lt;mario_fs@mgtech.com&lt;<a href="mailto:mario_fs@mgtech.com">mailto:mario_fs@mgtech.com</a>&gt;&gt; wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I added an iPad softphone that requires TCP to converse battery. Everything works except: FS is restarted 2am each day but does not activate the INTERNAL profile, this causes all internal extensions to stay offline. If &nbsp;the TCP extension is off all works. Odd: I cannot reproduce this at any other time manually, it only occurs at the 2am restart! So debugging has been a bugger. Anytime after 2am I can "sofia profile internal start" and all is well. I ran with sofia loglevel all 9 and the TCP devices IPs did not show up in the log at all and NO MENTION of INTERNAL in the log. It's as if the file is missing, there is nothing in the FS log to provide a hint. I searched the FS wiki and web and found a TCP bug mentioned march 2011 but I updated FS to Saturdays (03-30) GIT (to test the new 1.2 anyway) and no change. BTW, I tried 2 different clients (SoftPhone and Bria) and both had the problem. Anyone have an idea what to try next?<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">_________________________________________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Professional FreeSWITCH Consulting Services:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">consulting@freeswitch.org&lt;<a href="mailto:consulting@freeswitch.org">mailto:consulting@freeswitch.org</a>&gt;<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">FreeSWITCH-users@lists.freeswitch.org&lt;<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">mailto:FreeSWITCH-users@lists.freeswitch.org</a>&gt;<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"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">!DSPAM:4f79ee9c32766092896665!<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">consulting@freeswitch.org&lt;<a href="mailto:consulting@freeswitch.org">mailto:consulting@freeswitch.org</a>&gt;<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">FreeSWITCH-users@lists.freeswitch.org&lt;<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">mailto:FreeSWITCH-users@lists.freeswitch.org</a>&gt;<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"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">!DSPAM:4f79ee9c32766092896665!<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><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">Professional FreeSWITCH Consulting Services:<br></blockquote><blockquote type="cite"><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br></blockquote><blockquote type="cite"><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br></blockquote><blockquote type="cite"><a href="http://www.cudatel.com">http://www.cudatel.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Official FreeSWITCH Sites<br></blockquote><blockquote type="cite"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></blockquote><blockquote type="cite"><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br></blockquote><blockquote type="cite"><a href="http://www.cluecon.com">http://www.cluecon.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">FreeSWITCH-users mailing list<br></blockquote><blockquote type="cite"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br></blockquote><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 type="cite">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br></blockquote><blockquote type="cite"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><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></div></body></html>