Incorrect datetime issue

Somanath Mishra somanath.mishra at planetsbrain.com
Thu Sep 13 14:59:26 CEST 2018


ok, I am using latest version freeradius. I modified queries.conf to
implement GroupName in radacct. So revert changes. Now it is as it was
before. and insert stmt to radacct quries:


 start {
                        #
                        #  Insert a new record into the sessions table
                        #
                        query = "\
                                INSERT INTO ${....acct_table1} \
                                        (${...column_list}) \
                                VALUES \
                                        ('%{Acct-Session-Id}', \
                                        '%{Acct-Unique-Session-Id}', \
                                        '%{SQL-User-Name}', \
                                        '%{Realm}', \
                                        '%{NAS-IP-Address}', \
                                        '%{%{NAS-Port-ID}:-%{NAS-Port}}', \
                                        '%{NAS-Port-Type}', \
                                        FROM_UNIXTIME(%{integer:Event-Timestamp}),
\
                                        FROM_UNIXTIME(%{integer:Event-Timestamp}),
\
                                        NULL, \
                                        '0', \
                                        '%{Acct-Authentic}', \
                                        '%{Connect-Info}', \
                                        '', \
                                        '0', \
                                        '0', \
                                        '%{Called-Station-Id}', \
                                        '%{Calling-Station-Id}', \
                                        '', \
										'%{Service-Type}', \
                                        '%{Framed-Protocol}', \
                                        '%{Framed-IP-Address}')"

                        #
                        #  Key constraints prevented us from inserting a
new session,
                        #  use the alternate query to update an existing
session.
                        #


I am not able to understand where is the issue. Queries.conf looks
correct. Can you help me please?


---------------------------------------------------------------------

On Thu, September 13, 2018 5:30 pm, Alan DeKok wrote:
> On Sep 13, 2018, at 7:52 AM, Somanath Mishra
> <somanath.mishra at planetsbrain.com> wrote:
>
>> here is all debug output queries. You can see incorrect datetime value
>> below :
>
> You either edited the default queries, *or*, you're running a version of
> FreeRADIUS that is many, many, years old.
>
>
> The default MySQL queries have have "FROM_UNIXTIME" for at least 4 years,
> maybe longer.  I didn't bother to go further than that.
>
> Use 3.0.17.  Use the default queries.  It will work.
>
>
> Alan DeKok.
>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list