[asterisk-bugs] [JIRA] (ASTERISK-28455) Asterisk res_odbc not working on Proxysql

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Jun 20 03:07:47 CDT 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=247441#comment-247441 ] 

Asterisk Team commented on ASTERISK-28455:
------------------------------------------

The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process.

> Asterisk res_odbc not working on Proxysql
> -----------------------------------------
>
>                 Key: ASTERISK-28455
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28455
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_odbc
>    Affects Versions: 13.26.0
>         Environment: centos 7
>            Reporter: cagdas kopuz
>
> Asterisk realtime and func_odbc can not connect proxysql server.
> I tried all mysql-connector-odbc 5.0 to 8.0.
> When I connect same database without proxysql everything is fine.
> Asterisk gives me these errors:
> [Jun 20 10:55:21] ERROR[16739]: res_odbc.c:292 ast_odbc_find_table: Unable to query database columns on connection 'proxysql'.
> [Jun 20 10:55:21] ERROR[16739]: res_odbc.c:292 ast_odbc_find_table: Unable to query database columns on connection 'proxysql2'.
> [Jun 20 10:55:21] WARNING[16739]: res_odbc.c:550 ast_odbc_print_errors: SQL Execute returned an error: 42S22: [MySQL][ODBC 5.1 Driver][mysqld-5.5.30]Unknown column 'data' in 'field list'
> [Jun 20 10:55:21] WARNING[16739]: res_odbc.c:445 ast_odbc_prepare_and_execute: SQL Execute error -1!
> *CLI> [Jun 20 10:55:21] WARNING[16739]: res_odbc.c:550 ast_odbc_print_errors: SQL Execute returned an error: 42S22: [MySQL][ODBC 5.1 Driver][mysqld-5.5.30]Unknown column 'data' in 'field list'
> [Jun 20 10:55:21] WARNING[16739]: res_odbc.c:445 ast_odbc_prepare_and_execute: SQL Execute error -1!
> [Jun 20 10:55:25] ERROR[16771]: res_odbc.c:292 ast_odbc_find_table: Unable to query database columns on connection 'pbxconf1'.
> [Jun 20 10:55:25] WARNING[16771]: res_odbc.c:550 ast_odbc_print_errors: SQL Execute returned an error: 42000: [MySQL][ODBC 5.1 Driver][mysqld-5.5.30]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE name='startrinity'' at line 1
> [Jun 20 10:55:25] WARNING[16771]: res_odbc.c:445 ast_odbc_prepare_and_execute: SQL Execute error -1!
> odbcinst.ini
> [MySQL ODBC 5.1 Driver]
> Driver=/usr/lib64/libmyodbc5.so
> UsageCount=1
> -------------------------
> odbc.ini
> [proxysql]
> Description = pbxproxy
> Driver = MySQL ODBC 5.1 Driver
> Server = 10.10.10.221
> Port = 6033
> User = pbxuser
> Password = passw0rd
> Database = pbxlogs
> Option = 3
> --------------------------
> res_odbc.conf
> [proxysql]
> enabled => yes
> dsn => proxysql
> username => pbxuser 
> password => passw0rd 
> pre-connect => yes
> -----------------------
> asterisk cli: odbc show all
> ODBC DSN Settings
>   Name:   proxysql
>   DSN:    proxysql
>     Last connection attempt: 1970-01-01 02:00:00
>     Number of active connections: 1 (out of 1)
>     Logging: Disabled
> I can connect proxysql from host with isql command or php-pdo.
> root at netsantral-test modules]# isql proxysql pbxuser passw0rd -vvv
> +---------------------------------------+
> | Connected!                            |
> |                                       |
> | sql-statement                         |
> | help [tablename]                      |
> | quit                                  |
> |                                       |
> +---------------------------------------+
> SQL> SELECT start,linkedid FROM pbxlogs.cdr limit 1;
> +--------------------+---------------------------------+
> | start              | linkedid                        |
> +--------------------+---------------------------------+
> | 2019-06-20 10:52:09| 1561017129.475827               |
> +--------------------+---------------------------------+
> SQLRowCount returns 1
> 1 rows fetched



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list