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

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


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

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

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.

> 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
>            Severity: Blocker
>
> 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