Freeradius 3.0.17 Unable to connect mssql database with iodbc

Alan Buxey alan.buxey at gmail.com
Sat Nov 17 12:16:58 CET 2018


Hi

You've defined an IP address in the ini file ... In FR you've just got the
name 'test'. C and n your server resolve that to an IP address eg can you
'dig test' (or 'ping test' and see an IP address that matches your initial
file)?

Alan

On Sat, 17 Nov 2018, 09:30 Giovanni Di Giorgio <gioele01 at gmail.com wrote:

> Hi, i'm trying to work with freeradius (ver 3.0.17 on ubuntu server 16.04)
> and a mssql db as backend, using odbc drivers.
>
> I've installed odbc driver from:
>
> https://docs.microsoft.com/it-it/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server
>
> my odbc.ini:
> "
> [test]
> Driver = ODBC Driver 17 for SQL Server
> Database = radius
> Server = 10.196.200.74
> "
>
> connection test:
>
> "
> root at radius:~# isql -v test sa ************
> +---------------------------------------+
> | Connected!                            |
> |                                       |
> | sql-statement                         |
> | help [tablename]                      |
> | quit                                  |
> |                                       |
> +---------------------------------------+
> SQL>
> "
> then i setup the database schema on mssql and i setup the freeradius
> config's files:
>
> my /etc/freeradius/mods-enabled/sql:
>
> "
> sql {
> driver = "rlm_sql_iodbc"
> dialect = "mssql"
> server = "test"
> login = "sa"
> password = "*********"
> radius_db = "radius"
> acct_table1 = "radacct"
> ..........
>
> "
>
> but if i try to start freeradius in debug mode, the attempt to connect to
> database fail  and freeradius do not start
>
> "
> root at radius:~# freeradius -X
> FreeRADIUS Version 3.0.17
> ...
> # Loaded module rlm_sql
>   # Loading module "sql" from file /etc/freeradius/mods-enabled/sql
>   sql {
>   driver = "rlm_sql_iodbc"
>   server = "test"
>   port = 1433
>   login = "sa"
>   password = <<< secret >>>
>   radius_db = "radius"
>   read_groups = yes
>   read_profiles = yes
>   read_clients = no
>   delete_stale_sessions = yes
>   sql_user_name = "%{User-Name}"
>   default_user_profile = ""
>   client_query = "SELECT id,nasname,shortname,type,secret FROM nas"
>         ........
>         rlm_sql (sql): Driver rlm_sql_iodbc (module rlm_sql_iodbc) loaded
> and linked
>         ........
>         # Instantiating module "sql" from file
> /etc/freeradius/mods-enabled/sql
>        rlm_sql (sql): Attempting to connect to database "radius"
>        rlm_sql (sql): Initialising connection pool
>        pool {
>     start = 5
>     min = 3
>     max = 32
>     spare = 10
>     uses = 0
>     lifetime = 0
>     cleanup_interval = 30
>     idle_timeout = 60
>     retry_delay = 30
>     spread = no
>        }
>       rlm_sql (sql): Opening additional connection (0), 1 of 32 pending
> slots used
>       rlm_sql_iodbc: SQLConnectfailed
> "
> Could you please help how to fix the problem?
> Thanks in advance.
> Gioele
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list