ODBC connection on Asterisk 13.13.1

I did the folliwing

odbc show

ODBC DSN Settings

Name: asterisk
DSN: asterisk-connector
Last connection attempt: 2016-12-29 21:03:05
Number of active connections: 0 (out of 1)

When I did the following “module reload res_odbc.so” I get the following errors

Module ‘res_odbc.so’ reloaded successfully.
[2016-12-29 21:09:00] WARNING[5004]: res_odbc.c:526 load_odbc_config: The ‘pooling’, ‘shared_connections’, ‘limit’, and ‘idlecheck’ options were replaced by ‘max_connections’. See res_odbc.conf.sample.
[2016-12-29 21:09:00] WARNING[5004]: res_odbc.c:526 load_odbc_config: The ‘pooling’, ‘shared_connections’, ‘limit’, and ‘idlecheck’ options were replaced by ‘max_connections’. See res_odbc.conf.sample.
[2016-12-29 21:09:00] WARNING[5004]: res_odbc.c:958 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=2005 [unixODBC][MySQL][ODBC 5.3(a) Driver]Unknown MySQL server host ‘test.smartwave.net’ (0)
[2016-12-29 21:09:00] NOTICE[5004]: res_odbc.c:617 load_odbc_config: Registered ODBC class ‘asterisk’ dsn->[asterisk-connector]

My /etc/odbc.ini file looks like this

[asterisk-connector]
Description= MySQL connection to ‘asterisk’ database
Driver= MySQL
Database=test
Server= test.smartwave.net
UserName=testorone
Password=N7HpJL9
Port=3306
Socket= /var/lib/mysql/mysql.sock

My /etc/odbcinst.ini file is

[MySQL]
Description=ODBC for MySQL
Driver64=/usr/lib64/libmyodbc5a.so
Setup64=/usr/lib64/libodbcmyS.so
FileUsage=1

Please what am I to fix?

I’d start by fixing the above error.

Do you have working DNS? Can you resolve test.smartwave.net?

I could not reach the address on the browser but the address was connecting on another asterisk server and when I “ping test.smartwave.net” I get a request timeout error. The other asterisk server it is connecting with is Asterisk 13.10.0

Look at the line where it talks about the ODBC 5.3(a) driver

[2016-12-29 21:09:00] WARNING[5004]: res_odbc.c:958 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=2005 [unixODBC][MySQL][ODBC 5.3(a) Driver]Unknown MySQL server host ‘test.smartwave.net’ (0)

Do you think that might cause it?

When I tried “module reload” I get this
[2016-12-29 23:56:03] WARNING[5943]: res_phoneprov.c:1231 get_defaults: Unable to find a valid server address or name.
[2016-12-29 23:56:03] ERROR[5943]: ari/config.c:312 process_config: No configured users for ARI
[2016-12-29 23:56:03] NOTICE[5943]: chan_skinny.c:8418 config_load: Configuring skinny from skinny.conf
[2016-12-29 23:56:03] NOTICE[5943]: cel_custom.c:97 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[2016-12-29 23:56:03] NOTICE[5943]: app_queue.c:8716 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
[2016-12-29 23:56:03] WARNING[5943]: res_odbc.c:526 load_odbc_config: The ‘pooling’, ‘shared_connections’, ‘limit’, and ‘idlecheck’ options were replaced by ‘max_connections’. See res_odbc.conf.sample.
[2016-12-29 23:56:03] WARNING[5943]: res_odbc.c:526 load_odbc_config: The ‘pooling’, ‘shared_connections’, ‘limit’, and ‘idlecheck’ options were replaced by ‘max_connections’. See res_odbc.conf.sample.
[2016-12-29 23:56:03] WARNING[5943]: res_odbc.c:958 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=2005 [unixODBC][MySQL][ODBC 5.3(a) Driver]Unknown MySQL server host ‘test.smartwave.net’ (0)
[2016-12-29 23:56:03] NOTICE[5943]: res_odbc.c:617 load_odbc_config: Registered ODBC class ‘asterisk’ dsn->[asterisk-connector]

My /etc/odbc.ini file looks like this

[asterisk-connector]
Description= MySQL connection to ‘asterisk’ database
Driver= MySQL
Database=test
Server= test.smartwave.net
UserName=testorone
Password=N7HpJL9
Port=3306
Socket= /var/lib/mysql/mysql.sock

I changed this hostname address “test.smartwave.net” to IP address and when I run odbc show. It shows active connection to be 1 which means it now works. But I still have issues with errors like

res_phoneprov.c:1231 get_defaults: Unable to find a valid server address or name.
No configured users for ARI
chan_skinny.c:8418 config_load: Configuring skinny from skinny.conf
cel_custom.c:97 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.

None of those errors have to do with ODBC, They are modules that you likely do not need at all.

res_phoneprov is for building phone configuration files from templates.
chan_skinny is a channel driver for Cisco phones that don’t speak SIP
cel_custom is for Channel Event Logging…

Thank you very much @johnkiniston. Do you have any idea about this one too

ast_sockaddr_resolve: getaddrinfo(“asterisk-pinson”, “(null)”, …): System error

Temporary failure means that there has been a failure to contact a DNS server

this can be solved adding asterisk-pinson to the /etc/hosts file. Please if you are going to ask more questions related to this topic open a new thread for this issue

check this post for references http://forums.asterisk.org/viewtopic.php?f=13&t=94169