freeradius2 + iODBC + Informix
Hello, Please help me set up freeradius2 + iODBC + Informix (I'm newbie in freeradius). - I have a test-machine with Ubuntu 14.04 and Freeradius-server v2.1.12. - I have a server with Informix Database Server v 10.00 Step 1: - I installed unixODBC on test-machine - I installed informix-csdk for connect to Informix Database Server (Driver) - I configured files /etc/odbc.ini and /etc/odbcinst.ini to connect to Informix Database Server - Checking with isql: +++++++++++++++++++++++++++++++++++++++++ root@test:/home/test# isql -v work +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> select 1 from TABLES(SET{1}) 1 +++++++++++++++++++++++++++++++++++++++++ - Everything is allright. Step 2: - I try to install freeradius-iodbc module to connect to Informix Database Server - During install I get next warning: +++++++++++++++++++++++++++++++++++++++++++++ The following packages will be REMOVED: unixodbc unixodbc-dev The following NEW packages will be installed: libiodbc2-dev +++++++++++++++++++++++++++++++++++++++++++++ - so unixodbc and unixodbc-dev packages was removed after install freeradius-iodbc - I included in radiusd.conf: +++++++++++++++++++++++++++++++++++++++++++++ sql { # # Set the database to one of: # # mysql, mssql, oracle, postgresql # database = "iodbc" # # Which FreeRADIUS driver to use. # driver = "rlm_sql_${database}" # Connection info: server = "test.server.ru" port = 1425 login = "test" password = "test123" radius_db = "test" ... +++++++++++++++++++++++++++++++++++++++++++++ - freeradius -XXX showed me next error: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ... Fri Nov 21 14:53:48 2014 : Info: rlm_sql (sql): Driver rlm_sql_iodbc (module rlm_sql_iodbc) loaded and linked Fri Nov 21 14:53:48 2014 : Info: rlm_sql (sql): Attempting to connect to test@test.server.ru:1425/test Fri Nov 21 14:53:48 2014 : Debug: rlm_sql (sql): starting 0 Fri Nov 21 14:53:48 2014 : Info: rlm_sql (sql): Attempting to connect rlm_sql_iodbc #0 Fri Nov 21 14:53:48 2014 : Error: sql_create_socket: SQLConnectfailed: [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded Fri Nov 21 14:53:48 2014 : Error: rlm_sql (sql): Failed to connect DB handle #0 ... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Error - "SQLConnectfailed: [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded." - Where did I go wrong? - I found some information in net with same problem, but clear decision nowhere not found.
On Dec 2, 2014, at 8:05 AM, vanish <vanishox@coltel.ru> wrote:
- freeradius -XXX showed me next error
Just use “freeradius -X”. That’s what we recommend *everywhere*.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ... Fri Nov 21 14:53:48 2014 : Info: rlm_sql (sql): Driver rlm_sql_iodbc (module rlm_sql_iodbc) loaded and linked Fri Nov 21 14:53:48 2014 : Info: rlm_sql (sql): Attempting to connect to test@test.server.ru:1425/test Fri Nov 21 14:53:48 2014 : Debug: rlm_sql (sql): starting 0 Fri Nov 21 14:53:48 2014 : Info: rlm_sql (sql): Attempting to connect rlm_sql_iodbc #0 Fri Nov 21 14:53:48 2014 : Error: sql_create_socket: SQLConnectfailed: [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded
That’s an error from the iODBC driver. The parameters you’re passing to it are wrong. What are the correct parameters? I have no idea. I don’t use iODBC, sorry. Ask the iODBC people what the right parameters are. Alan DeKok.
On Tue, Dec 2, 2014 at 8:05 PM, vanish <vanishox@coltel.ru> wrote:
Hello, Please help me set up freeradius2 + iODBC + Informix (I'm newbie in freeradius).
Step 1: - I installed unixODBC on test-machine - I installed informix-csdk for connect to Informix Database Server (Driver)
- Everything is allright.
You've setup informix with unixodbc ..
Step 2: - I try to install freeradius-iodbc module to connect to Informix Database Server
+++++++++++++++++++++++++++++++++++++++++++++
The following packages will be REMOVED: unixodbc unixodbc-dev
... but then remove unixudbc and use iodbc instead.
- Where did I go wrong?
iodbc and unixodbc are two different things. FR (the source) supports both, but can only be built for one of them. Since now that you have iodbc installed, try configuring it again so that you can use isql correctly. It should be driver-compatible to some degree. If that doesn't work (e.g. because the library versions as different), then you need to build FR from source (or edit the package recipe and rebuild it) so that it uses odbc instead of iodbc. -- Fajar
Hello, we have: - test-machine with Ubuntu 14.04 and Freeradius-server v2.1.12 - Informix Database Server v 10.00 - freeradius connected to DB through iODBC driver When restarted Informix on server, freeradius still holds the connections (old connections) to database. And for all access-request packets in debug mode i see: Error: sql_create_socket: SQLAllocStmt failed: [Informix][Informix ODBC Driver]Connection not open. Error: [main_sql] Couldn't update SQL accounting ALIVE record - [Informix][Informix ODBC Driver]Connection not open. Freeradius has functional for restart his connections when database restarted? How i can catch this problems? Only in debug log?
Hi,
- test-machine with Ubuntu 14.04 and Freeradius-server v2.1.12
upgrade FreeRADUS.
Freeradius has functional for restart his connections when database restarted?
v3 has if you use connection pools.... for your current setup you'll have to have hooks that restart FreeRADIUS each time you do things on the database (eg add a call to restart the FreeRADUS service in your database start script. alan
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Fajar A. Nugraha -
vanish