Re: Freeradius 3.0.19 causes 'acctterminatecause' cannot be null

classic Classic list List threaded Threaded
2 messages Options
| Threaded
Open this post in threaded view
|

Re: Freeradius 3.0.19 causes 'acctterminatecause' cannot be null

Volodymyr Litovka
Hi,

On Mar 18, 2020; 1:04am Alan wrote:

> > I'm using Freeradius 3.0.19 on Ubuntu 19.10.
> > The default schema in
> > /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql doesn't
> seem to
> > work.  I get the following error message, when connecting with my NAS.
> >
> > (3) sql: ERROR: rlm_sql_mysql: ERROR 1048 (Column 'acctterminatecause'
> > cannot be null): 23000
> >
> > I have attached the detailed log.
>
>   The queries added in 3.0.18 had NULL for the 'acctterminatecause'
> field.  That should just be ''.
>
>   I've pushed a fix to GitHub.
>
>   Alan DEKok.

Please, be aware, that queries.conf still contains an error (at least on
Ubuntu 20.04, freeradius 3.0.20+dfsg-3build1), which appears when adding
sql_session_start in post_auth section -
queries.conf/accounting/type/post-auth explicitly inserts NULL for
'acctterminatecause' column.

The patch below fixes this (only for MySQL), but I guess same can be
done for other dialects:

--- mods-config/sql/main/mysql/queries.conf.orig 2020-10-13
08:49:35.841485192 +0300 +++ mods-config/sql/main/mysql/queries.conf
2020-10-13 08:49:58.877127891 +0300 @@ -273,7 +273,7 @@ 0, \
'%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ - NULL, \ + '', \
'%{Service-Type}', \ NULL, \ '', \

Thank you.

--
Volodymyr Litovka
   "Vision without Execution is Hallucination." -- Thomas Edison

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius 3.0.19 causes 'acctterminatecause' cannot be null

Alan DeKok-2

> On Oct 13, 2020, at 2:51 AM, Volodymyr Litovka <[hidden email]> wrote
> Please, be aware, that queries.conf still contains an error (at least on
> Ubuntu 20.04, freeradius 3.0.20+dfsg-3build1), which appears when adding
> sql_session_start in post_auth section -
> queries.conf/accounting/type/post-auth explicitly inserts NULL for
> 'acctterminatecause' column.
>
> The patch below fixes this (only for MySQL), but I guess same can be
> done for other dialects:
>
> --- mods-config/sql/main/mysql/queries.conf.orig 2020-10-13
> 08:49:35.841485192 +0300 +++ mods-config/sql/main/mysql/queries.conf
> 2020-10-13 08:49:58.877127891 +0300 @@ -273,7 +273,7 @@ 0, \
> '%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ - NULL, \ + '', \
> '%{Service-Type}', \ NULL, \ '', \

  That's already fixed in the v3.0.x branch, thanks.

  Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html