FreeRadius copy-acct-to-home-server
Hi, Not sure what is wrong, I have enabled the ntdomain and created a home server for the 2nd radius and added the name into the update control section also added the radius01 as a nas on radius2
From debug am having the below:
Fri Aug 13 14:55:32 2021 : Debug: Listening on detail file /var/log/freeradius/radacct/detail as server copy-acct-to-home-server Fri Aug 13 14:55:32 2021 : Debug: Opened new proxy socket 'proxy address * port 40506' Fri Aug 13 14:55:32 2021 : Debug: Listening on proxy address * port 40506 Fri Aug 13 14:55:32 2021 : Info: Ready to process requests Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.964644 sec Fri Aug 13 14:55:33 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:33 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.803769 sec Fri Aug 13 14:55:33 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:33 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 1.056526 sec Fri Aug 13 14:55:34 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:34 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.929141 sec Fri Aug 13 14:55:35 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:35 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 1.115887 sec Fri Aug 13 14:55:37 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:37 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 1.080575 sec Fri Aug 13 14:55:38 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:38 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.757045 sec Fri Aug 13 14:55:38 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Seems I am missing something. Regards, Pizu
On Aug 13, 2021, at 9:21 AM, Pizu <pizpower@gmail.com> wrote:
Not sure what is wrong, I have enabled the ntdomain and created a home server for the 2nd radius and added the name into the update control section also added the radius01 as a nas on radius2
From debug am having the below:
Fri Aug 13 14:55:32 2021 : Debug: Listening on detail file /var/log/freeradius/radacct/detail as server copy-acct-to-home-server Fri Aug 13 14:55:32 2021 : Debug: Opened new proxy socket 'proxy address * port 40506' Fri Aug 13 14:55:32 2021 : Debug: Listening on proxy address * port 40506 Fri Aug 13 14:55:32 2021 : Info: Ready to process requests Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.964644 sec
Yes... all that means is there's no detail file. Did you also configure the server to write the detail file? Is the server receiving accounting packets? Alan DeKok.
Hi, Yes, the server received accounting packets but am not seeing this module being used, the details files need to be created manually or? Regards, Pizu On Fri, 13 Aug 2021 at 15:27, Alan DeKok <aland@deployingradius.com> wrote:
Not sure what is wrong, I have enabled the ntdomain and created a home server for the 2nd radius and added the name into the update control section also added the radius01 as a nas on radius2
From debug am having the below:
Fri Aug 13 14:55:32 2021 : Debug: Listening on detail file /var/log/freeradius/radacct/detail as server copy-acct-to-home-server Fri Aug 13 14:55:32 2021 : Debug: Opened new proxy socket 'proxy address
On Aug 13, 2021, at 9:21 AM, Pizu <pizpower@gmail.com> wrote: *
port 40506' Fri Aug 13 14:55:32 2021 : Debug: Listening on proxy address * port 40506 Fri Aug 13 14:55:32 2021 : Info: Ready to process requests Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.964644 sec
Yes... all that means is there's no detail file.
Did you also configure the server to write the detail file?
Is the server receiving accounting packets?
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi, Do I need to use this line instead? for the filename filename = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d instead of filename = ${radacctdir}/detail Regards, Pizu On Fri, 13 Aug 2021 at 15:38, Pizu <pizpower@gmail.com> wrote:
Hi,
Yes, the server received accounting packets but am not seeing this module being used,
the details files need to be created manually or?
Regards,
Pizu
On Fri, 13 Aug 2021 at 15:27, Alan DeKok <aland@deployingradius.com> wrote:
On Aug 13, 2021, at 9:21 AM, Pizu <pizpower@gmail.com> wrote:
Not sure what is wrong, I have enabled the ntdomain and created a home server for the 2nd radius and added the name into the update control section also added the radius01 as a nas on radius2
From debug am having the below:
Fri Aug 13 14:55:32 2021 : Debug: Listening on detail file /var/log/freeradius/radacct/detail as server copy-acct-to-home-server Fri Aug 13 14:55:32 2021 : Debug: Opened new proxy socket 'proxy address * port 40506' Fri Aug 13 14:55:32 2021 : Debug: Listening on proxy address * port 40506 Fri Aug 13 14:55:32 2021 : Info: Ready to process requests Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 14:55:32 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.964644 sec
Yes... all that means is there's no detail file.
Did you also configure the server to write the detail file?
Is the server receiving accounting packets?
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Aug 13, 2021, at 9:38 AM, Pizu <pizpower@gmail.com> wrote:
Yes, the server received accounting packets but am not seeing this module being used,
Run the server in debug mode. READ THE OUTPUT. http://wiki.freeradius.org/list-help
the details files need to be created manually or?
No. It is not useful to ask questions like "I did stuff, but it didn't work". You need to describe WHAT you did. You need to describe WHAT happened. You cannot simply poke randomly at the system until it "does stuff". You need to understand each piece, and how it works with the others. The comments in the configuration files are clear, and contain a large amount of detail. If you're reading the comments and understanding them, you should be able to ask questions like "I did A, B, and C. The comments say X should happen, but it didn't". If your questions are little more than "It doesn't work, why?" then it looks like you're not reading the docs, or not following their instructions, or not paying attention. Alan DeKok.
In the debug i don't have errors just am seeing "Detail listener state unopened waiting" and seeing that server is receiving accounting packets and MySQL is being updated something is wrong for sure and yes I read the file and i know that there is nothing written to create the file manually, I just asked, If I knew everythingI would not need to open any ticket, sorry for asking. Regards, Pizu On Fri, 13 Aug 2021 at 15:44, Alan DeKok <aland@deployingradius.com> wrote:
On Aug 13, 2021, at 9:38 AM, Pizu <pizpower@gmail.com> wrote:
Yes, the server received accounting packets but am not seeing this module being used,
Run the server in debug mode. READ THE OUTPUT.
http://wiki.freeradius.org/list-help
the details files need to be created manually or?
No.
It is not useful to ask questions like "I did stuff, but it didn't work".
You need to describe WHAT you did. You need to describe WHAT happened.
You cannot simply poke randomly at the system until it "does stuff". You need to understand each piece, and how it works with the others. The comments in the configuration files are clear, and contain a large amount of detail.
If you're reading the comments and understanding them, you should be able to ask questions like "I did A, B, and C. The comments say X should happen, but it didn't".
If your questions are little more than "It doesn't work, why?" then it looks like you're not reading the docs, or not following their instructions, or not paying attention.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Aug 13, 2021, at 9:51 AM, Pizu <pizpower@gmail.com> wrote:
In the debug i don't have errors just am seeing "Detail listener state unopened waiting" and seeing that server is receiving accounting packets and MySQL is being updated something is wrong for sure
Yes... do you see it WRITING the packets to the detail file? If so, which file?
and yes I read the file and i know that there is nothing written to create the file manually,
I have no idea what that means.
I just asked, If I knew everythingI would not need to open any ticket, sorry for asking.
If you get offended when you're told to ask better questions, you will have a very bad time on this list. In order to build complicated systems, you need to learn how to debug complicated systems. This is a skill which takes time. We cannot debug your systems remotely. We cannot help you when you questions have essentially zero content. The Wiki page has extensive documentation on what we need. The wiki page describes what you need to do, so that we can help you. If you're not going to follow the instructions on the Wiki page I posted, then it is *impossible* for us to help you. So... either follow instructions and get it fixed, or don't follow instructions and don't get it fixed. And don't complain when someone is trying to help you. It's rude. No one is telling you you need to know everything. That's a rude thing to say. Alan DeKok.
I did not get offended, I just asked a question and it seems I again got misunderstood, no problem. anyway. Seems I had to edit the mods-enabled/detail to have the below result, which is not written in the module of copy-acct-to-home-server. Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Renaming /var/log/freeradius/radacct/detail -> /var/log/freeradius/radacct/ detail.work Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Acct-Status-Type = Start Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Acct-Session-Id = "4cb0f1ed" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - User-Name = "xxxxxx" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - NAS-Identifier = "MST_FG_3300E" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Fortinet-Client-IP-Address = x.x.x.x Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Fortinet-Vdom-Name = "xxxxxxxx" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Calling-Station-Id = "x.x.x.x" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Event-Timestamp = "Aug 13 2021 16:01:28 CEST" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - NAS-IP-Address = 10.69.3.182 Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Tmp-String-9 = "ai:" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Acct-Unique-Session-Id = "670031e84b71b0311bf5a9a5cdf82cdf" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Stripped-User-Name = "xxxxxxxx" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Trying to read VP from line - Realm = "NULL" Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Read packet from /var/log/freeradius/radacct/detail.work Acct-Status-Type = Start Acct-Session-Id = "4cb0f1ed" User-Name = "xxxxxxxx" NAS-Identifier = "MST_FG_3300E" Fortinet-Client-IP-Address = x.x.x.x Fortinet-Vdom-Name = "xxxxxxxxx" Calling-Station-Id = "x.x.x.x" Event-Timestamp = "Aug 13 2021 17:01:28 CEST" NAS-IP-Address = 10.69.3.182 Tmp-String-9 = "ai:" Acct-Unique-Session-Id = "670031e84b71b0311bf5a9a5cdf82cdf" Stripped-User-Name = "xxxxxxxxx" Realm = "NULL" Packet-Original-Timestamp = "Aug 13 2021 16:01:27 CEST" Acct-Delay-Time = 4294963695 Packet-Transmit-Counter = 1 Fri Aug 13 16:01:27 2021 : Debug: (6) # Executing section preacct from file /etc/freeradius/sites-enabled/copy-acct-to-home-server Fri Aug 13 16:01:27 2021 : Debug: (6) preacct { Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[preacct]: calling preprocess (rlm_preprocess) Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[preacct]: returned from preprocess (rlm_preprocess) Fri Aug 13 16:01:27 2021 : Debug: (6) [preprocess] = ok Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[preacct]: calling ntdomain (rlm_realm) Fri Aug 13 16:01:27 2021 : Debug: (6) ntdomain: Request already has destination realm set. Ignoring Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[preacct]: returned from ntdomain (rlm_realm) Fri Aug 13 16:01:27 2021 : Debug: (6) [ntdomain] = noop Fri Aug 13 16:01:27 2021 : Debug: (6) update control { Fri Aug 13 16:01:27 2021 : Debug: (6) &Home-Server-Name := "ztnfreerad01_Copy_Acct" Fri Aug 13 16:01:27 2021 : Debug: (6) } # update control = noop Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[preacct]: calling files (rlm_files) Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[preacct]: returned from files (rlm_files) Fri Aug 13 16:01:27 2021 : Debug: (6) [files] = noop Fri Aug 13 16:01:27 2021 : Debug: (6) } # preacct = ok Fri Aug 13 16:01:27 2021 : Debug: (6) # Executing section accounting from file /etc/freeradius/sites-enabled/copy-acct-to-home-server Fri Aug 13 16:01:27 2021 : Debug: (6) accounting { Fri Aug 13 16:01:27 2021 : Debug: (6) update control { Fri Aug 13 16:01:27 2021 : Debug: (6) &Home-Server-Name := "ztnfreerad01_Copy_Acct" Fri Aug 13 16:01:27 2021 : Debug: (6) Overwriting value "ztnfreerad01_Copy_Acct" with "ztnfreerad01_Copy_Acct" Fri Aug 13 16:01:27 2021 : Debug: (6) } # update control = noop Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[accounting]: calling ok (rlm_always) Fri Aug 13 16:01:27 2021 : Debug: (6) modsingle[accounting]: returned from ok (rlm_always) Fri Aug 13 16:01:27 2021 : Debug: (6) [ok] = ok Fri Aug 13 16:01:27 2021 : Debug: (6) } # accounting = ok Fri Aug 13 16:01:27 2021 : Debug: (6) detail (/var/log/freeradius/radacct/detail): Done Accounting-Request packet. Fri Aug 13 16:01:27 2021 : Debug: (6) detail (/var/log/freeradius/radacct/detail): Received response for request 6. Will read the next packet in 0 seconds Fri Aug 13 16:01:27 2021 : Debug: (6) Finished request Fri Aug 13 16:01:27 2021 : Debug: (6) Cleaning up request packet ID 2 with timestamp +69 Fri Aug 13 16:01:27 2021 : Debug: Waking up in 4.9 seconds. Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Unlinking /var/log/freeradius/radacct/ detail.work Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 0.759758 sec Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file Fri Aug 13 16:01:27 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Detail listener state unopened waiting 1.058731 sec Fri Aug 13 16:01:28 2021 : Debug: detail (/var/log/freeradius/radacct/detail): Polling for detail file So the Polling will remain unopened until there is an accounting packet. Now in order to to see if it rely copied on the other server I need to check on the MySQL of the home server if the details are added. correct? Regards, Pizu On Fri, 13 Aug 2021 at 16:01, Alan DeKok <aland@deployingradius.com> wrote:
On Aug 13, 2021, at 9:51 AM, Pizu <pizpower@gmail.com> wrote:
In the debug i don't have errors just am seeing "Detail listener state unopened waiting" and seeing that server is receiving accounting packets and MySQL is being updated something is wrong for sure
Yes... do you see it WRITING the packets to the detail file? If so, which file?
and yes I read the file and i know that there is nothing written to create the file manually,
I have no idea what that means.
I just asked, If I knew everythingI would not need to open any ticket, sorry for asking.
If you get offended when you're told to ask better questions, you will have a very bad time on this list.
In order to build complicated systems, you need to learn how to debug complicated systems. This is a skill which takes time.
We cannot debug your systems remotely. We cannot help you when you questions have essentially zero content.
The Wiki page has extensive documentation on what we need. The wiki page describes what you need to do, so that we can help you.
If you're not going to follow the instructions on the Wiki page I posted, then it is *impossible* for us to help you.
So... either follow instructions and get it fixed, or don't follow instructions and don't get it fixed.
And don't complain when someone is trying to help you. It's rude. No one is telling you you need to know everything. That's a rude thing to say.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Aug 13, 2021, at 10:11 AM, Pizu <pizpower@gmail.com> wrote:
Seems I had to edit the mods-enabled/detail to have the below result, which is not written in the module of copy-acct-to-home-server.
The comments say that the "filename" configuration item is where the detail files are located, which should be clear.
So the Polling will remain unopened until there is an accounting packet.
Yes.
Now in order to to see if it rely copied on the other server I need to check on the MySQL of the home server if the details are added. correct?
Perhaps run the home server in ****DEBUG MODE****. Alan DeKok.
Hi, So in order to make it work I had to change from &Home-Server-Name to &Proxy-To-Realm and it worked. The &Home-Server-Name was not sending the packets to the other Radius. For &Proxy-To-Realm I have created a realm with the above home server and started to see the packets. Thanks. Regards, Pizu On Fri, 13 Aug 2021 at 16:42, Alan DeKok <aland@deployingradius.com> wrote:
On Aug 13, 2021, at 10:11 AM, Pizu <pizpower@gmail.com> wrote:
Seems I had to edit the mods-enabled/detail to have the below result, which is not written in the module of copy-acct-to-home-server.
The comments say that the "filename" configuration item is where the detail files are located, which should be clear.
So the Polling will remain unopened until there is an accounting packet.
Yes.
Now in order to to see if it rely copied on the other server I need to check on the MySQL of the home server if the details are added. correct?
Perhaps run the home server in ****DEBUG MODE****.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
Pizu