[Home]

Summary:ASTERISK-28432: ODBC
Reporter:Vadim (cron333)Labels:
Date Opened:2019-05-31 05:58:29Date Closed:2019-05-31 10:56:37
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_odbc
Versions:13.27.0 Frequency of
Occurrence
Related
Issues:
Environment:CentOS 7.4.1708Attachments:
Description:I updated the Asterisk version to 13.27.0 (from 13.26.0). Now, when i try to exec commands: 'sip reload', 'dialplan reload' i get this WARNING on the CLI:

CLI> dialplan reload
Dialplan reloaded.
 == Setting global variable 'CONSOLE' to 'Console/dsp'
 == Setting global variable 'IAXINFO' to 'guest'
 == Setting global variable 'TRUNK' to 'DAHDI/G2'
 == Setting global variable 'TRUNKMSD' to '1'
 == Setting global variable 'DEPTH_OF_AUTODIAL' to '3'
 == Setting global variable 'TIMEWORK' to '09:00-21:00,*,*,*'
   -- Including switch 'DUNDi/e164' in context 'dundi-e164-switch'
   -- Including switch 'DUNDi/e164' in context 'ael-dundi-e164-switch'
   -- Including switch 'Lua/' in context 'default'
[May 31 13:38:25] WARNING[47011]: res_config_odbc.c:113 custom_prepare: SQL Alloc Handle failed!
[May 31 13:38:25] WARNING[47011]: res_config_odbc.c:113 custom_prepare: SQL Alloc Handle failed!
   -- Including switch 'Lua/' in context 'public'
   -- Including switch 'Lua/' in context 'demo'
[May 31 13:38:25] WARNING[47011]: res_config_odbc.c:113 custom_prepare: SQL Alloc Handle failed!
[May 31 13:38:25] WARNING[47011]: res_config_odbc.c:113 custom_prepare: SQL Alloc Handle failed!
   -- Including switch 'Lua/' in context 'local'
   -- Time to scan old dialplan and merge leftovers back into the new: 0.000751 sec
   -- Time to restore hints and swap in new dialplan: 0.000009 sec
   -- Time to delete the old dialplan: 0.000317 sec
   -- Total time merge_contexts_delete: 0.001077 sec
   -- pbx_config successfully loaded 83 contexts (enable debug for details).


CLI> sip reload
Reloading SIP
 == Using SIP TOS bits 96
 == Using SIP CoS mark 3
[May 31 13:52:05] WARNING[46966]: res_config_odbc.c:113 custom_prepare: SQL Alloc Handle failed!


I have this line in the extconfig.conf file:

sippeers => odbc,asterisk

If I comment this line the WARNING disappear.
Comments:By: Asterisk Team (asteriskteam) 2019-05-31 05:58:30.158-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Joshua C. Colp (jcolp) 2019-05-31 06:03:31.789-0500

If you roll back to 13.26.0 does the problem still occur? Did you upgrade anything else (UnixODBC for example)?

By: Vadim (cron333) 2019-05-31 06:28:08.449-0500

No, I didn't update anything. It worked well on the version 13.26.0

Additional info:
This appear after trying to exec odbc function (with INSERT). It doesn't write into the DB

[May 31 14:09:18] WARNING[47155][C-00000009]: func_odbc.c:463 execute: SQL Alloc Handle failed (-1)

By: Joshua C. Colp (jcolp) 2019-05-31 06:34:34.352-0500

That doesn't answer my other question - if you reinstall 13.26.0 does it return to working?

By: Vadim (cron333) 2019-05-31 08:09:25.833-0500

After roll back to 13.26.0 it doesn't work with the same errors/warnings. (but it wrote to DB before).  

After roll back to 13.7.2 it works ...

By: Joshua C. Colp (jcolp) 2019-05-31 08:12:36.798-0500

Okay, so it doesn't seem to be the result of the 13.27.0 upgrade itself.

By: Vadim (cron333) 2019-05-31 08:22:22.084-0500

But the 13.7.2 is working ... !?

By: Joshua C. Colp (jcolp) 2019-05-31 08:25:29.225-0500

I understand that, my questions were to determine if it was a regression between 13.26.0 and 13.27.0. It doesn't appear to be so which is what I was expecting. The log message itself is the result of UnixODBC returning a failure when we are trying to use it. Why that is I do not know.

By: Vadim (cron333) 2019-05-31 10:25:59.165-0500

I removed MariaDB-Galera and installed the mariadb-5.5 (and its devel package),  replaced mysqlconnector (there was installed "mariadbconnector"). After I re-compiled Asterisk 13.27.0. It work! Thanks! And sorry for the false request ... )