[asterisk-bugs] [JIRA] (ASTERISK-22459) username not parsed correctly in res_odbc.conf

Rusty Newton (JIRA) noreply at issues.asterisk.org
Tue Sep 10 16:13:03 CDT 2013


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

Rusty Newton edited comment on ASTERISK-22459 at 9/10/13 4:12 PM:
------------------------------------------------------------------

I added ODBC trace, but when I start asterisk, nothing shows up in the trace file.

The asterisk logs show:
{noformat}
grep -i warning /var/log/asterisk/extrafull
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Unable to retrieve database handle for table description 'sip at asterisk'
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: Unable to retrieve database handle for table description 'sip at asterisk'
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Unable to retrieve database handle for table description 'voicemail at asterisk'
{noformat}
If I use the isql tool to test, the test query (select 1) works and I get an odbc trace file.
                
      was (Author: patrickm):
    I added ODBC trace, but when I start asterisk, nothing shows up in the trace file.

The asterisk logs show:
grep -i warning /var/log/asterisk/extrafull
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Unable to retrieve database handle for table description 'sip at asterisk'
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: Unable to retrieve database handle for table description 'sip at asterisk'
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1532] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=1045 ��.��
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Failed to connect to asterisk
[Sep  6 09:19:59] WARNING[1512] res_odbc.c: Unable to retrieve database handle for table description 'voicemail at asterisk'

If I use the isql tool to test, the test query (select 1) works and I get an odbc trace file.
                  
> username not parsed correctly in res_odbc.conf
> ----------------------------------------------
>
>                 Key: ASTERISK-22459
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22459
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_odbc
>    Affects Versions: 11.5.1
>         Environment: Debian linux (squeeze), ODBC/MysQL
>            Reporter: Patrick Maille
>            Assignee: Michael L. Young
>
> When I set (in res_odbc.conf):
> username=>asterisk
> the mysql logs show:
> 130904 15:51:30    57 Connect   Access denied for user 'a'@'localhost' (using password: YES)
> If I set (in res_odbc.conf):
> username=>debian
> the mysql logs show:
> 130904 15:52:30    63 Connect   Access denied for user 'd'@'localhost' (using password: YES)
> So it looks like it's only taking the first letter of the username for authentication to the database.
> I confirmed that my odbc/mysql stack works:
> $ echo "select 1" | isql -v asterisk-connector asterisk Test1234
> +---------------------------------------+
> | Connected!                            |
> |                                       |
> | sql-statement                         |
> | help [tablename]                      |
> | quit                                  |
> |                                       |
> +---------------------------------------+
> SQL> select 1
> +---------------------+
> | 1                   |
> +---------------------+
> | 1                   |
> +---------------------+
> SQLRowCount returns 1
> 1 rows fetched

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list