Thanks for the explanation.  So does this problem cause any calls to drop?  I 
haven't restarted the server or made any changes to the b2b tables so don't 
quite understand how this could have happened.

Regards

Lee

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Ovidiu Sas
Sent: 08 September 2011 16:22
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Possible MYQL B2B problem?

There is an issue with the b2b_logic module.
If a b2b_logic context is saved in the db and the b2b_entities corresponding to 
the b2b_logic contexts are lost, the db is not properly cleaned up.
When a new call comes in, a b2b_logic context is created and it may have the 
same key as the saved old b2b_logic context in the db.
When a db operation is performed on that call (like inserting a new b2b_logic 
context with the same id as the one in the db) the operation fails and you see 
those errors.

It might be possible that you arrived in this scenario after an opensips crash 
that left the db out of synch.
When opensips was restarted, the b2b_logic context failed to load but it was 
not cleaned up in the db.

In your case, you should see that you have in b2b_logic table a context with 
si_key='414.0'.
You will need to manually delete that one from the db.

When opensips starts, there are ERROR logs for this kind of situation:
ERROR:b2b_entities:b2b_restore_logic_info: No dialog found for key 
[bk2bk.287.95]
WARNING:b2b_logic:b2bl_add_tuple: Failed to restore logic info for tuple:entity 
[644.0][0]
ERROR:b2b_entities:b2b_restore_logic_info: No dialog found for key 
[bk2bk.132.8088290]
WARNING:b2b_logic:b2bl_add_tuple: Failed to restore logic info for tuple:entity 
[644.0][1]

In this case, the b2b_logic context should be removed from the db because the 
restoration failed.


Please open a bug report about this.


Regards,
Ovidiu Sas

On Thu, Sep 8, 2011 at 4:03 AM, Lee Archer <[email protected]> wrote:
> Hi all, I am using the b2b entities and logic modules and keep seeing 
> the following in the log:
>
> /usr/local/sbin/opensips[2642]:
> CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062):
> Duplicate entry '414.0' for key 2
> /usr/local/sbin/opensips[2642]: ERROR:core:db_do_insert: error while 
> submitting query
> /usr/local/sbin/opensips[2642]: ERROR:b2b_logic:b2b_logic_dump: Sql 
> insert failed
>
> Is it something to worry about and what problems could I encounter?  
> I've done some searching but haven't found much hence the question to the 
> group.
> Is it correct to assume the call will be dropped?
>
> Thanks
>
> Lee
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to