Wrong date of freeradius 3 recording in MySql

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

Wrong date of freeradius 3 recording in MySql

nikolai.petrov
Hello,
I installed FreeRADIUS 3, Daloradius, and MySQL Debian 9.
After some struggle I drove everything I had on another machine with a
similar installation but with freeradius 2.
I noticed a problem with accounting (wrote in db). The time is correct, but
the date is 2 days ago. The problem is from freeradius. When I write from
PHP in MySql my date is ok, but from accounting, it comes with a date of -2
days.

*Do you any idea of where to hide the problem?*
Best Regards,
Nikolai Petrov
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Wrong date of freeradius 3 recording in MySql

Alan DeKok-2
On Jan 12, 2021, at 3:06 PM, Nikolai Petrov <[hidden email]> wrote:
> I installed FreeRADIUS 3, Daloradius, and MySQL Debian 9.
> After some struggle I drove everything I had on another machine with a
> similar installation but with freeradius 2.
> I noticed a problem with accounting (wrote in db). The time is correct, but
> the date is 2 days ago. The problem is from freeradius. When I write from
> PHP in MySql my date is ok, but from accounting, it comes with a date of -2
> days.

  Which field in SQL?

  If it's the Acct start time or stop time, that comes directly from the NAS.  FreeRADIUS doesn't create / edit it.

  If you look at the radius.log file, you'll see it logging messages with todays date.  It gets that date from the system.

  Alan DeKok.


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

Re: Wrong date of freeradius 3 recording in MySql

nikolai.petrov
Thanks for the quick answer.
These are fields. This is the picture at the moment.
[image: image.png]
You are right
[image: image.png]
But the date on Nas is OK
[image: image.png]
Hotspot-9 is in another time zone.
*I have another machine with freeradius 2. I will connect Hotspot-9 to it
and see if the problem is in the NAS.*

Best Regards,
Nikolai Petrov


На вт, 12.01.2021 г. в 22:13 ч. Alan DeKok <[hidden email]>
написа:

> On Jan 12, 2021, at 3:06 PM, Nikolai Petrov <[hidden email]>
> wrote:
> > I installed FreeRADIUS 3, Daloradius, and MySQL Debian 9.
> > After some struggle I drove everything I had on another machine with a
> > similar installation but with freeradius 2.
> > I noticed a problem with accounting (wrote in db). The time is correct,
> but
> > the date is 2 days ago. The problem is from freeradius. When I write from
> > PHP in MySql my date is ok, but from accounting, it comes with a date of
> -2
> > days.
>
>   Which field in SQL?
>
>   If it's the Acct start time or stop time, that comes directly from the
> NAS.  FreeRADIUS doesn't create / edit it.
>
>   If you look at the radius.log file, you'll see it logging messages with
> todays date.  It gets that date from the system.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html

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

image.png (40K) Download Attachment
image.png (199K) Download Attachment
image.png (7K) Download Attachment
| Threaded
Open this post in threaded view
|

Re: Wrong date of freeradius 3 recording in MySql

Alan DeKok-2


> On Jan 12, 2021, at 3:32 PM, Nikolai Petrov <[hidden email]> wrote:
>
> Thanks for the quick answer.
> These are fields. This is the picture at the moment.

  Please just post text.  It makes *zero* sense to point a screen capture of the debug output.

> [image: image.png]
> You are right
> [image: image.png]
> But the date on Nas is OK
> [image: image.png]
> Hotspot-9 is in another time zone.

  I have no idea what time zone you're in, or which times are correct.  Some explanation might have been useful.

> *I have another machine with freeradius 2. I will connect Hotspot-9 to it
> and see if the problem is in the NAS.*

  Again, the Acct-Start-Time comes from the NAS.  If it's wrong, fix the NAS.

  No amount of poking FreeRADIUS will fix the time on the NAS.

  You don't "see if the problem is in the NAS".  I told you it *is* in the NAS.

  Alan DeKok.


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

Re: Wrong date of freeradius 3 recording in MySql

nikolai.petrov
Now I remembered that I had php code that limited the number of successful
sessions per user. And he uses today's date. Both this NAS and the
freeradius 2 system worked with today's limitations.

image 1
fields are: *acctstarttime* , acctupdatetime, *acctstoptime - *all fields
of type *datetime*

image 2
Tue Jan 12 20:23:39 2021 : Info: rlm_sql (sql): Opening additional
connection (230), 1 of 31 pending slots used
Tue Jan 12 20:23:39 2021 : Info: rlm_sql (sql): Need 2 more connections to
reach 10 spares
Tue Jan 12 20:23:39 2021 : Info: rlm_sql (sql): Opening additional
connection (229), 1 of 32 pending slots used
Tue Jan 12 20:23:39 2021 : Info: rlm_sql (sql): Closing connection (228):
Hit idle_timeout, was idle for 210 seconds
Tue Jan 12 20:23:39 2021 : Info: rlm_sql (sql): Closing connection (226):
Hit idle_timeout, was idle for 210 seconds
Tue Jan 12 20:23:39 2021 : Info: rlm_sql (sql): Closing connection (227):
Hit idle_timeout, was idle for 210 seconds
Tue Jan 12 20:19:27 2021 : Info: rlm_sql (sql): Opening additional
connection (228), 1 of 30 pending slots used
Tue Jan 12 20:19:27 2021 : Info: rlm_sql (sql): Need 1 more connections to
reach 10 spares
Tue Jan 12 20:18:39 2021 : Info: rlm_sql (sql): Opening additional
connection (227), 1 of 31 pending slots used
Tue Jan 12 20:18:39 2021 : Info: rlm_sql (sql): Need 2 more connections to
reach 10 spares
Tue Jan 12 20:18:39 2021 : Info: rlm_sql (sql): Opening additional
connection (226), 1 of 32 pending slots used
Tue Jan 12 20:18:39 2021 : Info: rlm_sql (sql): Closing connection (225):
Hit idle_timeout, was idle for 216 seconds
Tue Jan 12 20:18:39 2021 : Info: rlm_sql (sql): Closing connection (224):
Hit idle_timeout, was idle for 216 seconds
Tue Jan 12 20:15:03 2021 : Info: rlm_sql (sql): Opening additional
connection (225), 1 of 31 pending slots used
Tue Jan 12 20:15:03 2021 : Info: rlm_sql (sql): Need 2 more connections to
reach 10 spares
Tue Jan 12 20:15:03 2021 : Info: rlm_sql (sql): Opening additional
connection (224), 1 of 32 pending slots used
Tue Jan 12 20:15:03 2021 : Info: rlm_sql (sql): Closing connection (222):
Hit idle_timeout, was idle for 85 seconds
Tue Jan 12 20:15:03 2021 : Info: rlm_sql (sql): Closing connection (221):
Hit idle_timeout, was idle for 85 seconds
Tue Jan 12 20:15:03 2021 : Info: rlm_sql (sql): Closing connection (223):
Hit idle_timeout, was idle for 86 seconds
Tue Jan 12 20:13:05 2021 : Info: rlm_sql (sql): Opening additional
connection (223), 2 of 31 pending slots used
Tue Jan 12 20:13:05 2021 : Info: rlm_sql (sql): Need 1 more connections to
reach 10 spares

image 3

root@hotspot-9:~# date
Tue Jan 12 22:26:01 EET 2021

Best Regards,
Nikolai Petrov


На вт, 12.01.2021 г. в 23:24 ч. Alan DeKok <[hidden email]>
написа:

>
>
> > On Jan 12, 2021, at 3:32 PM, Nikolai Petrov <[hidden email]>
> wrote:
> >
> > Thanks for the quick answer.
> > These are fields. This is the picture at the moment.
>
>   Please just post text.  It makes *zero* sense to point a screen capture
> of the debug output.
>
> > [image: image.png]
> > You are right
> > [image: image.png]
> > But the date on Nas is OK
> > [image: image.png]
> > Hotspot-9 is in another time zone.
>
>   I have no idea what time zone you're in, or which times are correct.
> Some explanation might have been useful.
>
> > *I have another machine with freeradius 2. I will connect Hotspot-9 to it
> > and see if the problem is in the NAS.*
>
>   Again, the Acct-Start-Time comes from the NAS.  If it's wrong, fix the
> NAS.
>
>   No amount of poking FreeRADIUS will fix the time on the NAS.
>
>   You don't "see if the problem is in the NAS".  I told you it *is* in the
> NAS.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Wrong date of freeradius 3 recording in MySql

nikolai.petrov
In reply to this post by Alan DeKok-2
Very strange. Freeradius 2 server and NAS are in one hour and everything
was fine. I moved the NAS time zone to the server area with freeradius 3
and everything is fine now.
Thank you for your cooperation.
2021-01-12 21:44:26 NULL 2021-01-12 21:44:26 NULL 0 0 0
2021-01-10 21:02:55 2021-01-10 21:32:56 2021-01-10 21:27:56 300 0
Best Regards,
Nikolai Petrov


На вт, 12.01.2021 г. в 23:24 ч. Alan DeKok <[hidden email]>
написа:

>
>
> > On Jan 12, 2021, at 3:32 PM, Nikolai Petrov <[hidden email]>
> wrote:
> >
> > Thanks for the quick answer.
> > These are fields. This is the picture at the moment.
>
>   Please just post text.  It makes *zero* sense to point a screen capture
> of the debug output.
>
> > [image: image.png]
> > You are right
> > [image: image.png]
> > But the date on Nas is OK
> > [image: image.png]
> > Hotspot-9 is in another time zone.
>
>   I have no idea what time zone you're in, or which times are correct.
> Some explanation might have been useful.
>
> > *I have another machine with freeradius 2. I will connect Hotspot-9 to it
> > and see if the problem is in the NAS.*
>
>   Again, the Acct-Start-Time comes from the NAS.  If it's wrong, fix the
> NAS.
>
>   No amount of poking FreeRADIUS will fix the time on the NAS.
>
>   You don't "see if the problem is in the NAS".  I told you it *is* in the
> NAS.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html