Presence issue

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Presence issue

Dan Pascu

After I started to test the lastest git code from master I noticed errors like this in my logs:


Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Duplicate entry 'dan-test.sip2sip.info-presence-a.1537527127.22838.2.1' for key 'presentity_idx'
Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:core:db_do_update: error while submitting query
Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:update_presentity: updating published info in database
Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:handle_publish: when updating presentity


I checked the presentity table and there is NO record with etag = a.1537527127.22838.2.1 in the database. I found however multiple records in the database for that particular account some of which are long expired yet not deleted from the database. The records seem to increase every time I publish presence:

MariaDB [opensips]> select username, domain, event, etag from presentity where username = 'dan';
+----------+-------------------+----------+------------------------+
| username | domain            | event    | etag                   |
+----------+-------------------+----------+------------------------+
| dan      | test.sip2sip.info | presence | a.1537455410.31931.2.2 |
| dan      | test.sip2sip.info | presence | a.1537456928.2432.2.0  |
| dan      | test.sip2sip.info | presence | a.1537526062.20412.1.0 |
| dan      | test.sip2sip.info | presence | a.1537526092.20529.2.0 |
| dan      | test.sip2sip.info | presence | a.1537526122.20854.1.0 |
| dan      | test.sip2sip.info | presence | a.1537526997.22186.2.0 |
| dan      | test.sip2sip.info | presence | a.1537527037.22557.1.0 |
| dan      | test.sip2sip.info | presence | a.1537527072.22698.1.0 |
| dan      | test.sip2sip.info | presence | a.1537527127.22835.2.0 |
+----------+-------------------+----------+------------------------+
9 rows in set (0.00 sec)


I also checked an older opensips-1.11 server and there I only have 1 record per AOR and I never see such errors in syslog:

mysql> select username, domain, event, etag from presentity where username = 'dan';
+----------+-----------------+----------+--------------------------------+
| username | domain          | event    | etag                           |
+----------+-----------------+----------+--------------------------------+
| dan      | ag-projects.com | presence | a.1530701145.32175.100449.152  |
| dan      | sip2sip.info    | presence | a.1530701145.32185.100643.3251 |
+----------+-----------------+----------+--------------------------------+
2 rows in set (0.00 sec)


I use the same SIP client in both cases, but I only see the errors on the latest opensips from master. These errors happen every time I publish presence for that account.

In addition I noticed other presence related errors in syslog, which might or might not be related to this:

Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537526997.22186.2.0]
Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527037.22557.1.0]
Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527072.22698.1.0]
Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Presence issue

Bogdan-Andrei Iancu-2
Hi Dan,

I'm trying to hunt this issue for a while , see:

https://github.com/OpenSIPS/opensips/issues/1422
https://github.com/OpenSIPS/opensips/issues/1378

But I never was able to reproduce it local, in order to debug it. Can
you reproduce it ?


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 09/21/2018 02:16 PM, Dan Pascu wrote:

> After I started to test the lastest git code from master I noticed errors like this in my logs:
>
>
> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Duplicate entry 'dan-test.sip2sip.info-presence-a.1537527127.22838.2.1' for key 'presentity_idx'
> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:core:db_do_update: error while submitting query
> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:update_presentity: updating published info in database
> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:handle_publish: when updating presentity
>
>
> I checked the presentity table and there is NO record with etag = a.1537527127.22838.2.1 in the database. I found however multiple records in the database for that particular account some of which are long expired yet not deleted from the database. The records seem to increase every time I publish presence:
>
> MariaDB [opensips]> select username, domain, event, etag from presentity where username = 'dan';
> +----------+-------------------+----------+------------------------+
> | username | domain            | event    | etag                   |
> +----------+-------------------+----------+------------------------+
> | dan      | test.sip2sip.info | presence | a.1537455410.31931.2.2 |
> | dan      | test.sip2sip.info | presence | a.1537456928.2432.2.0  |
> | dan      | test.sip2sip.info | presence | a.1537526062.20412.1.0 |
> | dan      | test.sip2sip.info | presence | a.1537526092.20529.2.0 |
> | dan      | test.sip2sip.info | presence | a.1537526122.20854.1.0 |
> | dan      | test.sip2sip.info | presence | a.1537526997.22186.2.0 |
> | dan      | test.sip2sip.info | presence | a.1537527037.22557.1.0 |
> | dan      | test.sip2sip.info | presence | a.1537527072.22698.1.0 |
> | dan      | test.sip2sip.info | presence | a.1537527127.22835.2.0 |
> +----------+-------------------+----------+------------------------+
> 9 rows in set (0.00 sec)
>
>
> I also checked an older opensips-1.11 server and there I only have 1 record per AOR and I never see such errors in syslog:
>
> mysql> select username, domain, event, etag from presentity where username = 'dan';
> +----------+-----------------+----------+--------------------------------+
> | username | domain          | event    | etag                           |
> +----------+-----------------+----------+--------------------------------+
> | dan      | ag-projects.com | presence | a.1530701145.32175.100449.152  |
> | dan      | sip2sip.info    | presence | a.1530701145.32185.100643.3251 |
> +----------+-----------------+----------+--------------------------------+
> 2 rows in set (0.00 sec)
>
>
> I use the same SIP client in both cases, but I only see the errors on the latest opensips from master. These errors happen every time I publish presence for that account.
>
> In addition I noticed other presence related errors in syslog, which might or might not be related to this:
>
> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537526997.22186.2.0]
> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527037.22557.1.0]
> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527072.22698.1.0]
> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>
>
> --
> Dan
>
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Presence issue

Dan Pascu

On 24 Sep 2018, at 23:14, Bogdan-Andrei Iancu wrote:

> Hi Dan,
>
> I'm trying to hunt this issue for a while , see:
>
> https://github.com/OpenSIPS/opensips/issues/1422
> https://github.com/OpenSIPS/opensips/issues/1378
>
> But I never was able to reproduce it local, in order to debug it. Can you reproduce it ?

It happens to me for every PUBLISH received.

>
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>  http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2018
>  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>
> On 09/21/2018 02:16 PM, Dan Pascu wrote:
>> After I started to test the lastest git code from master I noticed errors like this in my logs:
>>
>>
>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Duplicate entry 'dan-test.sip2sip.info-presence-a.1537527127.22838.2.1' for key 'presentity_idx'
>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:core:db_do_update: error while submitting query
>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:update_presentity: updating published info in database
>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:handle_publish: when updating presentity
>>
>>
>> I checked the presentity table and there is NO record with etag = a.1537527127.22838.2.1 in the database. I found however multiple records in the database for that particular account some of which are long expired yet not deleted from the database. The records seem to increase every time I publish presence:
>>
>> MariaDB [opensips]> select username, domain, event, etag from presentity where username = 'dan';
>> +----------+-------------------+----------+------------------------+
>> | username | domain            | event    | etag                   |
>> +----------+-------------------+----------+------------------------+
>> | dan      | test.sip2sip.info | presence | a.1537455410.31931.2.2 |
>> | dan      | test.sip2sip.info | presence | a.1537456928.2432.2.0  |
>> | dan      | test.sip2sip.info | presence | a.1537526062.20412.1.0 |
>> | dan      | test.sip2sip.info | presence | a.1537526092.20529.2.0 |
>> | dan      | test.sip2sip.info | presence | a.1537526122.20854.1.0 |
>> | dan      | test.sip2sip.info | presence | a.1537526997.22186.2.0 |
>> | dan      | test.sip2sip.info | presence | a.1537527037.22557.1.0 |
>> | dan      | test.sip2sip.info | presence | a.1537527072.22698.1.0 |
>> | dan      | test.sip2sip.info | presence | a.1537527127.22835.2.0 |
>> +----------+-------------------+----------+------------------------+
>> 9 rows in set (0.00 sec)
>>
>>
>> I also checked an older opensips-1.11 server and there I only have 1 record per AOR and I never see such errors in syslog:
>>
>> mysql> select username, domain, event, etag from presentity where username = 'dan';
>> +----------+-----------------+----------+--------------------------------+
>> | username | domain          | event    | etag                           |
>> +----------+-----------------+----------+--------------------------------+
>> | dan      | ag-projects.com | presence | a.1530701145.32175.100449.152  |
>> | dan      | sip2sip.info    | presence | a.1530701145.32185.100643.3251 |
>> +----------+-----------------+----------+--------------------------------+
>> 2 rows in set (0.00 sec)
>>
>>
>> I use the same SIP client in both cases, but I only see the errors on the latest opensips from master. These errors happen every time I publish presence for that account.
>>
>> In addition I noticed other presence related errors in syslog, which might or might not be related to this:
>>
>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537526997.22186.2.0]
>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527037.22557.1.0]
>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527072.22698.1.0]
>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>>
>>
>> --
>> Dan
>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Presence issue

Dan Pascu

On 28 Sep 2018, at 14:36, Dan Pascu wrote:

>
> On 24 Sep 2018, at 23:14, Bogdan-Andrei Iancu wrote:
>
>> Hi Dan,
>>
>> I'm trying to hunt this issue for a while , see:
>>
>> https://github.com/OpenSIPS/opensips/issues/1422
>> https://github.com/OpenSIPS/opensips/issues/1378
>>
>> But I never was able to reproduce it local, in order to debug it. Can you reproduce it ?
>
> It happens to me for every PUBLISH received.

So what information would you need in order to fix this?

>
>>
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>> OpenSIPS Bootcamp 2018
>> http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>>
>> On 09/21/2018 02:16 PM, Dan Pascu wrote:
>>> After I started to test the lastest git code from master I noticed errors like this in my logs:
>>>
>>>
>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Duplicate entry 'dan-test.sip2sip.info-presence-a.1537527127.22838.2.1' for key 'presentity_idx'
>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:core:db_do_update: error while submitting query
>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:update_presentity: updating published info in database
>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:handle_publish: when updating presentity
>>>
>>>
>>> I checked the presentity table and there is NO record with etag = a.1537527127.22838.2.1 in the database. I found however multiple records in the database for that particular account some of which are long expired yet not deleted from the database. The records seem to increase every time I publish presence:
>>>
>>> MariaDB [opensips]> select username, domain, event, etag from presentity where username = 'dan';
>>> +----------+-------------------+----------+------------------------+
>>> | username | domain            | event    | etag                   |
>>> +----------+-------------------+----------+------------------------+
>>> | dan      | test.sip2sip.info | presence | a.1537455410.31931.2.2 |
>>> | dan      | test.sip2sip.info | presence | a.1537456928.2432.2.0  |
>>> | dan      | test.sip2sip.info | presence | a.1537526062.20412.1.0 |
>>> | dan      | test.sip2sip.info | presence | a.1537526092.20529.2.0 |
>>> | dan      | test.sip2sip.info | presence | a.1537526122.20854.1.0 |
>>> | dan      | test.sip2sip.info | presence | a.1537526997.22186.2.0 |
>>> | dan      | test.sip2sip.info | presence | a.1537527037.22557.1.0 |
>>> | dan      | test.sip2sip.info | presence | a.1537527072.22698.1.0 |
>>> | dan      | test.sip2sip.info | presence | a.1537527127.22835.2.0 |
>>> +----------+-------------------+----------+------------------------+
>>> 9 rows in set (0.00 sec)
>>>
>>>
>>> I also checked an older opensips-1.11 server and there I only have 1 record per AOR and I never see such errors in syslog:
>>>
>>> mysql> select username, domain, event, etag from presentity where username = 'dan';
>>> +----------+-----------------+----------+--------------------------------+
>>> | username | domain          | event    | etag                           |
>>> +----------+-----------------+----------+--------------------------------+
>>> | dan      | ag-projects.com | presence | a.1530701145.32175.100449.152  |
>>> | dan      | sip2sip.info    | presence | a.1530701145.32185.100643.3251 |
>>> +----------+-----------------+----------+--------------------------------+
>>> 2 rows in set (0.00 sec)
>>>
>>>
>>> I use the same SIP client in both cases, but I only see the errors on the latest opensips from master. These errors happen every time I publish presence for that account.
>>>
>>> In addition I noticed other presence related errors in syslog, which might or might not be related to this:
>>>
>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537526997.22186.2.0]
>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527037.22557.1.0]
>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527072.22698.1.0]
>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>>>
>>>
>>> --
>>> Dan
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> Dan
>
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Presence issue

Bogdan-Andrei Iancu-2
Hi Dan,

What I failed so far was to reproduced it in a controlled environment.
Do you have a setup, special cfg + SIP UAC , instructions to reproduce
this issue ?

Thanks,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/16/2018 02:30 PM, Dan Pascu wrote:

> On 28 Sep 2018, at 14:36, Dan Pascu wrote:
>
>> On 24 Sep 2018, at 23:14, Bogdan-Andrei Iancu wrote:
>>
>>> Hi Dan,
>>>
>>> I'm trying to hunt this issue for a while , see:
>>>
>>> https://github.com/OpenSIPS/opensips/issues/1422
>>> https://github.com/OpenSIPS/opensips/issues/1378
>>>
>>> But I never was able to reproduce it local, in order to debug it. Can you reproduce it ?
>> It happens to me for every PUBLISH received.
> So what information would you need in order to fix this?
>
>>>
>>> Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>> OpenSIPS Bootcamp 2018
>>> http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>>>
>>> On 09/21/2018 02:16 PM, Dan Pascu wrote:
>>>> After I started to test the lastest git code from master I noticed errors like this in my logs:
>>>>
>>>>
>>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Duplicate entry 'dan-test.sip2sip.info-presence-a.1537527127.22838.2.1' for key 'presentity_idx'
>>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:core:db_do_update: error while submitting query
>>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:update_presentity: updating published info in database
>>>> Sep 21 13:01:41 node03 /usr/sbin/opensips[22838]: ERROR:presence:handle_publish: when updating presentity
>>>>
>>>>
>>>> I checked the presentity table and there is NO record with etag = a.1537527127.22838.2.1 in the database. I found however multiple records in the database for that particular account some of which are long expired yet not deleted from the database. The records seem to increase every time I publish presence:
>>>>
>>>> MariaDB [opensips]> select username, domain, event, etag from presentity where username = 'dan';
>>>> +----------+-------------------+----------+------------------------+
>>>> | username | domain            | event    | etag                   |
>>>> +----------+-------------------+----------+------------------------+
>>>> | dan      | test.sip2sip.info | presence | a.1537455410.31931.2.2 |
>>>> | dan      | test.sip2sip.info | presence | a.1537456928.2432.2.0  |
>>>> | dan      | test.sip2sip.info | presence | a.1537526062.20412.1.0 |
>>>> | dan      | test.sip2sip.info | presence | a.1537526092.20529.2.0 |
>>>> | dan      | test.sip2sip.info | presence | a.1537526122.20854.1.0 |
>>>> | dan      | test.sip2sip.info | presence | a.1537526997.22186.2.0 |
>>>> | dan      | test.sip2sip.info | presence | a.1537527037.22557.1.0 |
>>>> | dan      | test.sip2sip.info | presence | a.1537527072.22698.1.0 |
>>>> | dan      | test.sip2sip.info | presence | a.1537527127.22835.2.0 |
>>>> +----------+-------------------+----------+------------------------+
>>>> 9 rows in set (0.00 sec)
>>>>
>>>>
>>>> I also checked an older opensips-1.11 server and there I only have 1 record per AOR and I never see such errors in syslog:
>>>>
>>>> mysql> select username, domain, event, etag from presentity where username = 'dan';
>>>> +----------+-----------------+----------+--------------------------------+
>>>> | username | domain          | event    | etag                           |
>>>> +----------+-----------------+----------+--------------------------------+
>>>> | dan      | ag-projects.com | presence | a.1530701145.32175.100449.152  |
>>>> | dan      | sip2sip.info    | presence | a.1530701145.32185.100643.3251 |
>>>> +----------+-----------------+----------+--------------------------------+
>>>> 2 rows in set (0.00 sec)
>>>>
>>>>
>>>> I use the same SIP client in both cases, but I only see the errors on the latest opensips from master. These errors happen every time I publish presence for that account.
>>>>
>>>> In addition I noticed other presence related errors in syslog, which might or might not be related to this:
>>>>
>>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537526997.22186.2.0]
>>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527037.22557.1.0]
>>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:delete_phtable_query: Record not found [a.1537527072.22698.1.0]
>>>> Sep 21 13:02:08 node03 /usr/sbin/opensips[22889]: ERROR:presence:msg_presentity_clean: deleting from pres hash table
>>>>
>>>>
>>>> --
>>>> Dan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> --
>> Dan
>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> --
> Dan
>
>
>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Presence issue

Dan Pascu

On 17 Oct 2018, at 23:33, Bogdan-Andrei Iancu wrote:

> Hi Dan,
>
> What I failed so far was to reproduced it in a controlled environment. Do you have a setup, special cfg + SIP UAC , instructions to reproduce this issue ?

I use Blink as the client. I see this every time the proxy receives a PUBLISH request:

Oct 19 19:29:55 node15 ./opensips[23510]: [CONFIG] PUBLISH for presence sip:[hidden email] origin 86.120.12.1
64:41062 from sip:[hidden email] to sip:[hidden email] (243988a9-511e-4108-8950-5ab6edf82c3c)
Oct 19 19:29:55 node15 ./opensips[23510]: CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Du
plicate entry 'dan-test.sip2sip.info-presence-a.1539700118.23510.517.1' for key 'presentity_idx'
Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:core:db_do_update: error while submitting query
Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:presence:update_presentity: updating published info in database
Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:presence:handle_publish: when updating presentity

or this:

Oct 19 19:29:55 node15 ./opensips[23508]: [CONFIG] PUBLISH for presence sip:[hidden email] origin 86.120.12.1
64:39673 from sip:[hidden email] to sip:[hidden email] (cc4704d0-a5e7-4c78-89ae-4c31b6cb6246)
Oct 19 19:29:55 node15 ./opensips[23508]: INFO:presence:update_presentity: *** found in db but not in htable [a.1539
700118.23508.2291.0]

Below is the relevant part of my configuration (I included all the presence related modules I load and their configuration as they may be relevant):

# The address on which OpenSIPS will listen
define(`SERVER_IP', esyscmd(`echo -n $(hostname -i)'))
define(`SERVER_UDP_PORT', `5060')
define(`SERVER_TCP_PORT', `5060')
define(`SERVER_TLS_PORT', `5061')

# The server contact address
define(`SERVER_ADDRESS', `ifelse(SERVER_UDP_PORT, `5060', `SERVER_IP', `SERVER_IP:SERVER_UDP_PORT')')
# Contact used by the presence server
define(`PRESENCE_SERVER_ADDRESS', `sip:presence@SERVER_ADDRESS')
# Contact used by the resource list server
define(`RLS_SERVER_ADDRESS', `sip:rls@SERVER_ADDRESS')


loadmodule "presence.so"
loadmodule "xcap.so"
loadmodule "presence_xml.so"
loadmodule "presence_mwi.so"
loadmodule "pua.so"
loadmodule "pua_mi.so"
loadmodule "rls.so"
loadmodule "presence_xcapdiff.so"


modparam("presence", "db_url", "MySQL_URI")
modparam("presence", "server_address", "PRESENCE_SERVER_ADDRESS")
modparam("presence", "fallback2db", 1)
modparam("presence", "clean_period", 30)
modparam("presence", "notify_offline_body", 0)

modparam("presence_xml", "pres_rules_auid", "org.openmobilealliance.pres-rules")
modparam("presence_xml", "force_active", 0)
modparam("presence_xml", "pidf_manipulation", 1)
modparam("presence_xml", "generate_offline_body", 0)

modparam("pua", "db_url", "MySQL_URI")

modparam("xcap", "db_url", "MySQL_URI")
modparam("xcap", "integrated_xcap_server", 1)

modparam("rls", "server_address", "RLS_SERVER_ADDRESS")
modparam("rls", "to_presence_code", 5)
modparam("rls", "waitn_time", 10)

route {
    if ($rm == "PUBLISH") {
        if (is_from_local()) {
            if (!proxy_authorize("", "SUBSCRIBER_TABLE")) {
                proxy_challenge("", "0");
                return;
            } else if ($au != $fU) {
                sl_send_reply("403", "Username!=From not allowed ($au!=$fU)");
                return;
            }

            if ($rd == "") {
                $rd = $fd;
            }

            if (avp_check("$hdr(Event)", "fm/presence*/i") && ($au != $rU || $ar != $rd)) {
                sl_send_reply("403", "Publishing $hdr(Event) events for others is forbidden");
                return;
            }

            # Hide auth credentials to downstream routers
            consume_credentials();
        } else {
            sl_send_reply("403", "PUBLISH forbidden for outside domains");
            return;
        }

        if (t_newtran()) {
            handle_publish();
        } else {
            sl_reply_error();
        }
        exit;
    }
}


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Presence issue

Bogdan-Andrei Iancu-2
Hi Dan,

Ok, installing Blink and trying to see if I get the error.

Thanks for the input.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/19/2018 08:39 PM, Dan Pascu wrote:

> On 17 Oct 2018, at 23:33, Bogdan-Andrei Iancu wrote:
>
>> Hi Dan,
>>
>> What I failed so far was to reproduced it in a controlled environment. Do you have a setup, special cfg + SIP UAC , instructions to reproduce this issue ?
> I use Blink as the client. I see this every time the proxy receives a PUBLISH request:
>
> Oct 19 19:29:55 node15 ./opensips[23510]: [CONFIG] PUBLISH for presence sip:[hidden email] origin 86.120.12.1
> 64:41062 from sip:[hidden email] to sip:[hidden email] (243988a9-511e-4108-8950-5ab6edf82c3c)
> Oct 19 19:29:55 node15 ./opensips[23510]: CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Du
> plicate entry 'dan-test.sip2sip.info-presence-a.1539700118.23510.517.1' for key 'presentity_idx'
> Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:core:db_do_update: error while submitting query
> Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:presence:update_presentity: updating published info in database
> Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:presence:handle_publish: when updating presentity
>
> or this:
>
> Oct 19 19:29:55 node15 ./opensips[23508]: [CONFIG] PUBLISH for presence sip:[hidden email] origin 86.120.12.1
> 64:39673 from sip:[hidden email] to sip:[hidden email] (cc4704d0-a5e7-4c78-89ae-4c31b6cb6246)
> Oct 19 19:29:55 node15 ./opensips[23508]: INFO:presence:update_presentity: *** found in db but not in htable [a.1539
> 700118.23508.2291.0]
>
> Below is the relevant part of my configuration (I included all the presence related modules I load and their configuration as they may be relevant):
>
> # The address on which OpenSIPS will listen
> define(`SERVER_IP', esyscmd(`echo -n $(hostname -i)'))
> define(`SERVER_UDP_PORT', `5060')
> define(`SERVER_TCP_PORT', `5060')
> define(`SERVER_TLS_PORT', `5061')
>
> # The server contact address
> define(`SERVER_ADDRESS', `ifelse(SERVER_UDP_PORT, `5060', `SERVER_IP', `SERVER_IP:SERVER_UDP_PORT')')
> # Contact used by the presence server
> define(`PRESENCE_SERVER_ADDRESS', `sip:presence@SERVER_ADDRESS')
> # Contact used by the resource list server
> define(`RLS_SERVER_ADDRESS', `sip:rls@SERVER_ADDRESS')
>
>
> loadmodule "presence.so"
> loadmodule "xcap.so"
> loadmodule "presence_xml.so"
> loadmodule "presence_mwi.so"
> loadmodule "pua.so"
> loadmodule "pua_mi.so"
> loadmodule "rls.so"
> loadmodule "presence_xcapdiff.so"
>
>
> modparam("presence", "db_url", "MySQL_URI")
> modparam("presence", "server_address", "PRESENCE_SERVER_ADDRESS")
> modparam("presence", "fallback2db", 1)
> modparam("presence", "clean_period", 30)
> modparam("presence", "notify_offline_body", 0)
>
> modparam("presence_xml", "pres_rules_auid", "org.openmobilealliance.pres-rules")
> modparam("presence_xml", "force_active", 0)
> modparam("presence_xml", "pidf_manipulation", 1)
> modparam("presence_xml", "generate_offline_body", 0)
>
> modparam("pua", "db_url", "MySQL_URI")
>
> modparam("xcap", "db_url", "MySQL_URI")
> modparam("xcap", "integrated_xcap_server", 1)
>
> modparam("rls", "server_address", "RLS_SERVER_ADDRESS")
> modparam("rls", "to_presence_code", 5)
> modparam("rls", "waitn_time", 10)
>
> route {
>      if ($rm == "PUBLISH") {
>          if (is_from_local()) {
>              if (!proxy_authorize("", "SUBSCRIBER_TABLE")) {
>                  proxy_challenge("", "0");
>                  return;
>              } else if ($au != $fU) {
>                  sl_send_reply("403", "Username!=From not allowed ($au!=$fU)");
>                  return;
>              }
>
>              if ($rd == "") {
>                  $rd = $fd;
>              }
>
>              if (avp_check("$hdr(Event)", "fm/presence*/i") && ($au != $rU || $ar != $rd)) {
>                  sl_send_reply("403", "Publishing $hdr(Event) events for others is forbidden");
>                  return;
>              }
>
>              # Hide auth credentials to downstream routers
>              consume_credentials();
>          } else {
>              sl_send_reply("403", "PUBLISH forbidden for outside domains");
>              return;
>          }
>
>          if (t_newtran()) {
>              handle_publish();
>          } else {
>              sl_reply_error();
>          }
>          exit;
>      }
> }
>
>
> --
> Dan
>
>
>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Presence issue

Bogdan-Andrei Iancu-2
Hi all,

Thanks to Dan's help, I managed to locate and fix the issue, see :
https://github.com/OpenSIPS/opensips/commit/1ac9010f4fb8fff513ce25e06fdf210412c4a39b

Once again, thank you Dan !

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/23/2018 04:49 PM, Bogdan-Andrei Iancu wrote:

> Hi Dan,
>
> Ok, installing Blink and trying to see if I get the error.
>
> Thanks for the input.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2018
>   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>
> On 10/19/2018 08:39 PM, Dan Pascu wrote:
>> On 17 Oct 2018, at 23:33, Bogdan-Andrei Iancu wrote:
>>
>>> Hi Dan,
>>>
>>> What I failed so far was to reproduced it in a controlled
>>> environment. Do you have a setup, special cfg + SIP UAC ,
>>> instructions to reproduce this issue ?
>> I use Blink as the client. I see this every time the proxy receives a
>> PUBLISH request:
>>
>> Oct 19 19:29:55 node15 ./opensips[23510]: [CONFIG] PUBLISH for
>> presence sip:[hidden email] origin 86.120.12.1
>> 64:41062 from sip:[hidden email] to sip:[hidden email]
>> (243988a9-511e-4108-8950-5ab6edf82c3c)
>> Oct 19 19:29:55 node15 ./opensips[23510]:
>> CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error
>> (1062): Du
>> plicate entry
>> 'dan-test.sip2sip.info-presence-a.1539700118.23510.517.1' for key
>> 'presentity_idx'
>> Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:core:db_do_update:
>> error while submitting query
>> Oct 19 19:29:55 node15 ./opensips[23510]:
>> ERROR:presence:update_presentity: updating published info in database
>> Oct 19 19:29:55 node15 ./opensips[23510]:
>> ERROR:presence:handle_publish: when updating presentity
>>
>> or this:
>>
>> Oct 19 19:29:55 node15 ./opensips[23508]: [CONFIG] PUBLISH for
>> presence sip:[hidden email] origin 86.120.12.1
>> 64:39673 from sip:[hidden email] to sip:[hidden email]
>> (cc4704d0-a5e7-4c78-89ae-4c31b6cb6246)
>> Oct 19 19:29:55 node15 ./opensips[23508]:
>> INFO:presence:update_presentity: *** found in db but not in htable
>> [a.1539
>> 700118.23508.2291.0]
>>
>> Below is the relevant part of my configuration (I included all the
>> presence related modules I load and their configuration as they may
>> be relevant):
>>
>> # The address on which OpenSIPS will listen
>> define(`SERVER_IP', esyscmd(`echo -n $(hostname -i)'))
>> define(`SERVER_UDP_PORT', `5060')
>> define(`SERVER_TCP_PORT', `5060')
>> define(`SERVER_TLS_PORT', `5061')
>>
>> # The server contact address
>> define(`SERVER_ADDRESS', `ifelse(SERVER_UDP_PORT, `5060',
>> `SERVER_IP', `SERVER_IP:SERVER_UDP_PORT')')
>> # Contact used by the presence server
>> define(`PRESENCE_SERVER_ADDRESS', `sip:presence@SERVER_ADDRESS')
>> # Contact used by the resource list server
>> define(`RLS_SERVER_ADDRESS', `sip:rls@SERVER_ADDRESS')
>>
>>
>> loadmodule "presence.so"
>> loadmodule "xcap.so"
>> loadmodule "presence_xml.so"
>> loadmodule "presence_mwi.so"
>> loadmodule "pua.so"
>> loadmodule "pua_mi.so"
>> loadmodule "rls.so"
>> loadmodule "presence_xcapdiff.so"
>>
>>
>> modparam("presence", "db_url", "MySQL_URI")
>> modparam("presence", "server_address", "PRESENCE_SERVER_ADDRESS")
>> modparam("presence", "fallback2db", 1)
>> modparam("presence", "clean_period", 30)
>> modparam("presence", "notify_offline_body", 0)
>>
>> modparam("presence_xml", "pres_rules_auid",
>> "org.openmobilealliance.pres-rules")
>> modparam("presence_xml", "force_active", 0)
>> modparam("presence_xml", "pidf_manipulation", 1)
>> modparam("presence_xml", "generate_offline_body", 0)
>>
>> modparam("pua", "db_url", "MySQL_URI")
>>
>> modparam("xcap", "db_url", "MySQL_URI")
>> modparam("xcap", "integrated_xcap_server", 1)
>>
>> modparam("rls", "server_address", "RLS_SERVER_ADDRESS")
>> modparam("rls", "to_presence_code", 5)
>> modparam("rls", "waitn_time", 10)
>>
>> route {
>>      if ($rm == "PUBLISH") {
>>          if (is_from_local()) {
>>              if (!proxy_authorize("", "SUBSCRIBER_TABLE")) {
>>                  proxy_challenge("", "0");
>>                  return;
>>              } else if ($au != $fU) {
>>                  sl_send_reply("403", "Username!=From not allowed
>> ($au!=$fU)");
>>                  return;
>>              }
>>
>>              if ($rd == "") {
>>                  $rd = $fd;
>>              }
>>
>>              if (avp_check("$hdr(Event)", "fm/presence*/i") && ($au
>> != $rU || $ar != $rd)) {
>>                  sl_send_reply("403", "Publishing $hdr(Event) events
>> for others is forbidden");
>>                  return;
>>              }
>>
>>              # Hide auth credentials to downstream routers
>>              consume_credentials();
>>          } else {
>>              sl_send_reply("403", "PUBLISH forbidden for outside
>> domains");
>>              return;
>>          }
>>
>>          if (t_newtran()) {
>>              handle_publish();
>>          } else {
>>              sl_reply_error();
>>          }
>>          exit;
>>      }
>> }
>>
>>
>> --
>> Dan
>>
>>
>>
>>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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