Re: [Freeswitch-users] FS shutdown not closing TCP port causes TIME_WAIT problems
By the way - why do you restart FS every night, and do you really need to detect if the process has died and restart it? If you're trying to solve a problem in FS by restarting, it would be much better if a Jira was submitted, so it can be fixed. /Peter -----Ursprungligt meddelande----- Från: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] För Mario G Skickat: den 2 april 2012 22:33 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] FS shutdown not closing TCP port causes TIME_WAIT problems That's what I was thinking, trying to figure out how now. Will post a solution when I get one. On Apr 2, 2012, at 1:28 PM, Anthony Minessale wrote:
From what I see, sofia uses the REUSEADDR flag so I will bet its yet another MAC specific thing. I am not really sure what you can do since you tend to find issues deep inside libsofia-sip and its portability to OSX. Maybe make your restart script sleep a bit?
libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c: su_setreuseaddr(socket, 1);
On Mon, Apr 2, 2012 at 3:13 PM, Mario G <mario_fs@mgtech.com> wrote:
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 http://serverfault.com/questions/329845/how-to-forcibly-close-a-socket-in-ti.... Apparently there is no way to free up the port manually. Help/comments anyone? Mario G _____________________________________________________________________ ____ 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-us ers http://www.freeswitch.org
-- Anthony Minessale II
_________________________________________________________________________ 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 !DSPAM:4f7a0b6432767969573744!
Or do not restart at all :) 3 апреля 2012 г. 12:25 пользователь Peter Olsson < peter.olsson@visionutveckling.se> написал:
By the way - why do you restart FS every night, and do you really need to detect if the process has died and restart it? If you're trying to solve a problem in FS by restarting, it would be much better if a Jira was submitted, so it can be fixed.
/Peter
-----Ursprungligt meddelande----- Från: freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] För Mario G Skickat: den 2 april 2012 22:33 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] FS shutdown not closing TCP port causes TIME_WAIT problems
That's what I was thinking, trying to figure out how now. Will post a solution when I get one.
On Apr 2, 2012, at 1:28 PM, Anthony Minessale wrote:
From what I see, sofia uses the REUSEADDR flag so I will bet its yet another MAC specific thing. I am not really sure what you can do since you tend to find issues deep inside libsofia-sip and its portability to OSX. Maybe make your restart script sleep a bit?
libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c: su_setreuseaddr(socket, 1);
On Mon, Apr 2, 2012 at 3:13 PM, Mario G <mario_fs@mgtech.com> wrote:
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 http://serverfault.com/questions/329845/how-to-forcibly-close-a-socket-in-ti.... Apparently there is no way to free up the port manually. Help/comments anyone? Mario G _____________________________________________________________________ ____ 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-us ers http://www.freeswitch.org
-- Anthony Minessale II
_________________________________________________________________________ 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
!DSPAM:4f7a0b6432767969573744!
_________________________________________________________________________ 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
Need to restart due to memory leak bug that's been on Jira for years. May be gone now need to test more. On Apr 3, 2012, at 2:40 AM, Anton Kvashenkin wrote:
Or do not restart at all :)
3 апреля 2012 г. 12:25 пользователь Peter Olsson <peter.olsson@visionutveckling.se> написал: By the way - why do you restart FS every night, and do you really need to detect if the process has died and restart it? If you're trying to solve a problem in FS by restarting, it would be much better if a Jira was submitted, so it can be fixed.
/Peter
-----Ursprungligt meddelande----- Från: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] För Mario G Skickat: den 2 april 2012 22:33 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] FS shutdown not closing TCP port causes TIME_WAIT problems
That's what I was thinking, trying to figure out how now. Will post a solution when I get one.
On Apr 2, 2012, at 1:28 PM, Anthony Minessale wrote:
From what I see, sofia uses the REUSEADDR flag so I will bet its yet another MAC specific thing. I am not really sure what you can do since you tend to find issues deep inside libsofia-sip and its portability to OSX. Maybe make your restart script sleep a bit?
libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c: su_setreuseaddr(socket, 1);
On Mon, Apr 2, 2012 at 3:13 PM, Mario G <mario_fs@mgtech.com> wrote:
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 http://serverfault.com/questions/329845/how-to-forcibly-close-a-socket-in-ti.... Apparently there is no way to free up the port manually. Help/comments anyone? Mario G _____________________________________________________________________ ____ 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-us ers http://www.freeswitch.org
-- Anthony Minessale II
_________________________________________________________________________ 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
!DSPAM:4f7a0b6432767969573744!
_________________________________________________________________________ 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
participants (3)
-
Anton Kvashenkin
-
Mario G
-
Peter Olsson