[Freeswitch-users] question about HA solution

Michael Jerris mike at jerris.com
Mon Jun 19 16:45:56 UTC 2017


what is “channels_pkey” … thats not something thats anywhere in our codebase.


> On Jun 15, 2017, at 5:40 AM, Igor Olhovskiy <igorolhovskiy at gmail.com> wrote:
> 
> Hi!
> Same situation here.
> Idea is:
> I’m having Freeswitch HA (keepalived, working, same database, calls recovering…)
> If I look on «show calls» at slave node, I see calls on master node. 
> I crash master node (with «fsctl crash»), calls are transferred to slave node, restored, but when I run «show calls» on this (slave) node again, I see 0 calls. But calls are actually going on.
> 
> So, it’s seems impossible to have 2nd recover on already recovered call.
> 
> 
> In DB logs seen an errors like
> insert into channels (uuid,direction,created,created_epoch, name,state,callstate,dialplan,context,hostname,initial_cid_name,initial_cid_num,initial_ip_addr,initial_dest,initial_dialplan,initial_context) values('57904410-a8ad-4c28-a88a-83bd2280e146','outbound','2017-06-15 19:30:32','1497519032','sofia/internal/113-akbepcb59gt2a at 172.17.240.50:5060 <http://113-akbepcb59gt2a@172.17.240.50:5060/>','CS_INIT','DOWN','XML','sip303.empowervoice.com <http://sip303.empowervoice.com/>','blueAPACHE_test','103','103','172.17.240.50','113-akbepcb59gt2a','XML','sip303.empowervoice.com <http://sip303.empowervoice.com/>')
> Jun 15 19:30:31 E2-EVL-T-DB-01 postgres[28042]: [109-1] 2017-06-15 19:30:31 AEST [28042-103] freeswitch at freeswitch ERROR:  duplicate key value violates unique constraint «channels_pkey"
> Or like
> statement: insert into calls (call_uuid,call_created,call_created_epoch,caller_uuid,callee_uuid,hostname) values ('ffaf3eb5-3fc5-47fe-adef-cc4dddf53bab','2017-06-15 19:30:32','1497519032','ffaf3eb5-3fc5-47fe-adef-cc4dddf53bab','57904410-a8ad-4c28-a88a-83bd2280e146','blueAPACHE_test')
> Jun 15 19:30:31 E2-EVL-T-DB-01 postgres[28042]: [147-1] 2017-06-15 19:30:31 AEST [28042-142] freeswitch at freeswitch ERROR:  duplicate key value violates unique constraint «calls_pkey"
> 
> Also I see much queries like this
> delete from calls where (caller_uuid=‘ffaf3eb5-3fc5-47fe-adef-cc4dddf53bab’ or callee_uuid='ffaf3eb5-3fc5-47fe-adef-cc4dddf53bab')
> delete from recovery where runtime_uuid!=‘91f571c5-e0d2-462e-aa84-e4ca07052119’ and technology=‘sofia’….
> when calls are switched.
> 
> So, can this help to point an issue?
> 
> 2017-06-08 18:48 GMT+03:00 Michael Jerris <mike at jerris.com <mailto:mike at jerris.com>>:
> check your db logs as nothing we are doing should be clearing those.
> 
> On Thu, Jun 8, 2017 at 4:08 AM Denys Pozniak <denys.pozniak at crazycall.com <mailto:denys.pozniak at crazycall.com>> wrote:
> Hello!
> 
> My configs:
> 
> switch.conf.xml
> 
>     <param name="switchname" value="freeswitch01"/>
>     <param name="core-recovery-db-dsn" value="odbc://freeswitch:root:ubuntu"/>
>     <param name="core-db-dsn" value="odbc://freeswitch:root:ubuntu"/>
>     <param name="auto-create-schemas" value="false"/>
>     <param name="auto-clear-sql" value="false"/>
> 
> 
> external.conf.xml
> 
>    <param name="track-calls" value="true"/>
>    <param name="odbc-dsn" value="odbc://freeswitch:root:ubuntu"/>
> 
> 
> On 7 June 2017 at 17:35, Michael Jerris <mike at jerris.com <mailto:mike at jerris.com>> wrote:
> That param should keep it from doing so, if its not you are not setting it somehow or something else is wiping the db.
> 
>> On Jun 5, 2017, at 1:50 PM, Denys Pozniak <denys.pozniak at crazycall.com <mailto:denys.pozniak at crazycall.com>> wrote:
>> 
>> Yes, correct. But when you restart FS on slave, it will erase database. And option auto-clear-sql=false not working for me.
>> 
>> On Jun 5, 2017 6:32 PM, "Michael Jerris" <mike at jerris.com <mailto:mike at jerris.com>> wrote:
>> recovered calls will get new entries in the table.
>> 
>>> On Jun 5, 2017, at 7:41 AM, Denys Pozniak <denys.pozniak at crazycall.com <mailto:denys.pozniak at crazycall.com>> wrote:
>>> 
>>> Hello!
>>> 
>>> Thank you Raymond about your explanation, but I dont agree with some point: 
>>> If it really need an answer about your question -- "if it is possible to move calls back".   I think it's unnecessary.  - in my case I have two not equal servers, so I need to have only one as a master.
>>> If switchover happens I need to have ability to restore master back.
>>> 
>>> Thank you Luis for your link, you can do simple test to understand what I am talking about: do call -> check on master and slave #show channels -> restart FS on slave -> check on master #show channels. In my case I dont see any active calls after this, so restoring back is not possible.
>>> 
>>> 
>>> 
>>> On 3 June 2017 at 22:16, Luis Daniel Lucio Quiroz <luis.daniel.lucio at gmail.com <mailto:luis.daniel.lucio at gmail.com>> wrote:
>>> You may want to read this article.
>>> 
>>> http://inside-out.xyz/technology/how-to-configure-freeswitch-for-ha.html <http://inside-out.xyz/technology/how-to-configure-freeswitch-for-ha.html>
>>> 
>>> Le 31 mai 2017 6:29 PM, "Denys Pozniak" <denys.pozniak at crazycall.com <mailto:denys.pozniak at crazycall.com>> a écrit :
>>> Hello!
>>> 
>>> I built FS HA solution based on keepalived and mysql master-master.
>>> It works ok generally, but as I understand FS after restarting cleaning own database.
>>> 
>>> So when node1 fails calls jump to node2, after script restarts node1 it is not possible to move calls back.
>>> 
>>> Tried options in switch.conf.xml, but no luck:
>>> 
>>>     <param name="auto-create-schemas" value="false"/>
>>>     <param name="auto-clear-sql" value="false"/>
>>> 
>>> Is there is a way to solve this?
>>> 
> 
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org <http://www.freeswitch.org/>
> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
> http://www.cluecon.com <http://www.cluecon.com/>
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org <http://www.freeswitch.org/>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org <http://www.freeswitch.org/>
> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
> http://www.cluecon.com <http://www.cluecon.com/>
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org <http://www.freeswitch.org/>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org <http://www.freeswitch.org/>
> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
> http://www.cluecon.com <http://www.cluecon.com/>
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
> http://www.freeswitch.org <http://www.freeswitch.org/>
> 
> 
> 
> -- 
> Best regards,
> Igor
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170619/06e4e245/attachment-0001.html>


More information about the FreeSWITCH-users mailing list