For anyone who may run into this see "FS shutdown not closing TCP port causes TIME_WAIT problems" for follow up and solution. On Apr 2, 2012, at 12:42 PM, Mario G wrote:
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?
On Apr 2, 2012, at 11:59 AM, Mario G wrote:
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.
On Apr 2, 2012, at 11:47 AM, Peter Olsson wrote:
It means port 5060 is busy (probably by the old FS instance). How do you restart FS?
/Peter
2 apr 2012 kl. 20:34 skrev "Mario G" <mario_fs@mgtech.com<mailto:mario_fs@mgtech.com>>:
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:
A TCP extension causes already in use MSG and Internal profile fails
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 the TCP extension is off or set UDP all works. 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? Mario G
tport_bind_server(0x1003a9850): calling tport_listen for tcp nta: master transport created tport_alloc_primary(0x1003a9850): new primary tport 0x1003993e0 tport_listen(0x1003a9850): bind(pf=2 tcp/[100.234.1.7]:5060): Address already in use <--------------- nta: bind(100.234.1.7:5060;transport=*): Address already in use nua: initializing SIP stack failed nua: nua_stack_deinit: entering tport_bind_server(0x1006dd850) to */100.234.1.7:5078/sip sres_sofia_update(0x1003a7e10, -1, -1) sres_sofia_update(0x0, -1, -1) tport_destroy(0x1003a9850) tport_bind_server(0x1006dd850): calling tport_listen for udp tport_alloc_primary(0x1006dd850): new primary tport 0x1003a9ba0 su_kqueue_port_deinit(0x10039e350) called tport_listen(0x1003a9ba0): listening at udp/100.234.1.7:5078/sip tport_bind_server(0x1006dd850): calling tport_listen for tcp tport_alloc_primary(0x1006dd850): new primary tport 0x10039e440 tport_listen(0x10039e440): listening at tcp/100.234.1.7:5078/sip nta: bound to (100.234.1.7:5078;transport=*) nta: agent_init_via: SIP/2.0/udp 100.234.1.7:5078 (sip) nta: agent_init_via: SIP/2.0/tcp 100.234.1.7:5078 (sip) nta: Via fields initialized nta: Contact header created 2012-04-02 11:00:35.147184 [ERR] sofia.c:1940 Error Creating SIP UA for profile: internal <--------------------- nua_register: Adding contact URL '100.234.1.7' to list. tport_wakeup_pri(0x1003a9ba0): events IN tport_recv_event(0x1003a9ba0) tport_recv_iovec(0x1003a9ba0) msg 0x1003a74e0 from (udp/100.234.1.7:5078) has 20 bytes, veclen = 1
On Apr 2, 2012, at 11:08 AM, Michael Collins wrote:
What is the 2am restart? Is that a cron job or...?
On Mon, Apr 2, 2012 at 9:14 AM, Mario G <mario_fs@mgtech.com<mailto:mario_fs@mgtech.com>> wrote: 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 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? Mario G
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
!DSPAM:4f79ee9c32766092896665! _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
!DSPAM:4f79ee9c32766092896665!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org