buffered-sql problem
Alan DeKok
aland at deployingradius.com
Wed Jan 25 19:59:59 CET 2017
On Jan 25, 2017, at 1:01 PM, Jouni Soini via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
>
> there seems to be a problem with buffered-sql
> it sometimes doesn't pick the accounting request from detail file and just skip it.
> this happens once in a few million requests and I had to debug and monitor this for several days to find one (looking for a user who remains online)
> nothing special exists in debug logs. the accounting request is logged to detail file but the sql statement part doesn't exits.
> following is the debug logs as you can see the accounting request is logged to detail file (in my tests to two separate files for extra monitoring) but it is not sent to sql database
That's what you configured it to do.
...
> (494090) Wed Jan 25 12:04:10 2017: Debug: # Executing section accounting from file /etc/freeradius/sites-enabled/default
> (494090) Wed Jan 25 12:04:10 2017: Debug: accounting {
> (494090) Wed Jan 25 12:04:10 2017: Debug: modsingle[accounting]: calling detail (rlm_detail)
Versus:
> (494092) Wed Jan 25 12:04:11 2017: Debug: # Executing section accounting from file /etc/freeradius/sites-enabled/buffered-sql
> (494092) Wed Jan 25 12:04:11 2017: Debug: accounting {
> (494092) Wed Jan 25 12:04:11 2017: Debug: modsingle[accounting]: calling sql (rlm_sql)
> (494092) Wed Jan 25 12:04:11 2017: Debug: sql: EXPAND %{tolower:type.%{Acct-Status-Type}.query}
> (494092) Wed Jan 25 12:04:11 2017: Debug: sql: --> type.start.query
> (494092) Wed Jan 25 12:04:11 2017: Debug: sql: Using query template 'query'
> (494092) Wed Jan 25 12:04:11 2017: Debug: sql: EXPAND %{User-Name}
> (494092) Wed Jan 25 12:04:11 2017: Debug: sql: --> test2
One is running the "default" virtual server, and the other is "buffered-sql". The "default" virtual server doesn't write to SQL.
So "test1" is written to the detail file, and then some time later, read from the detail file, and written to SQL.
Alan DeKok.
More information about the Freeradius-Users
mailing list