Issue in loading acct queries

Alan DeKok aland at
Tue Jan 24 15:55:18 CET 2017

> On Jan 24, 2017, at 4:22 AM, Mustafa Mujahid/SYS <mustafa.mujahid at> wrote:
> Hello,
> I am observing some peculiar behavior in my debug log. Currently running freeradius 3.0.12
> When modules are loaded , I get the following debug output. I have followed this guide :

  You followed the guide to do what?

> including configuration file /etc/raddb/mods-enabled/oracle
> /etc/raddb/mods-enabled/oracle[171]: Reference "${....accounting_onoff_query}" not found
> /etc/raddb/mods-enabled/oracle[174]: Reference "${....accounting_onoff_query}" not found
> /etc/raddb/mods-enabled/oracle[177]: Reference "${....accounting_start_query}" not found
> /etc/raddb/mods-enabled/oracle[178]: Reference "${....accounting_start_query_alt}" not found
> /etc/raddb/mods-enabled/oracle[181]: Reference "${....accounting_update_query}" not found
> /etc/raddb/mods-enabled/oracle[182]: Reference "${....accounting_update_query_alt}" not found
> /etc/raddb/mods-enabled/oracle[185]: Reference "${....accounting_stop_query}" not found
> /etc/raddb/mods-enabled/oracle[186]: Reference "${....accounting_stop_query_alt}" not found

  The guide doesn't say to do that.  Whatever you've done is wrong, and that's what the message is telling you.

> But when the rlm_sql_oracle module is loaded I observe that the queries are loaded by the module as it should be expected. Please see the following debug log:

  Because it's reading the queries from somewhere else.

> *The Content of my Orac**le sql file*:

  Please don't edit the configuration unless you know why you're making those changes, and what those changes do.

>        accounting_onoff_query   =         <same query used in radius 2.x >
>        accounting_update_query =       <same query used in radius 2.x >
>        accounting_update_query_alt = <same query used in radius 2.x >
>        accounting_start_query =        <same query used in radius 2.x >
>        accounting_start_query_alt  =     <same query used in radius 2.x >
>        accounting_stop_query =       <same query used in radius 2.x >
>        accounting_stop_query_alt = <same query used in radius 2.x >

  Don't do that.  The queries in v3 work, and have been updated for a reason.

> The queries are the same as mentioned above, in the debug log. The issue as described above , it shows "reference not found" but then later is capable of loading the queries. And they are working as well when a user is connected to the NAS.
> any guidance is greatly appreciated.

  Remove all of your changes, and use a stock "sql" module from v3, using the v3 configuration, and using the v3 queries.  Change it to use:

 	driver = rlm_sql_oracle
	dialect = oracle

  It *will* work.

  The queries in v3 have been updated to allow for more complex situations, so that the data in the "radacct" table is updated in more situations.  The underlying "radacct" table is the same, and contains the same information.

  Again, you've put a lot of work into destroying the configuration and breaking the server.  Please don't do that.  The default configuration works.  Why not use that?

  Alan DeKok.

More information about the Freeradius-Users mailing list