Re: Accounting Relay to Fortigate - Issue with accounting file
Hi Alan et al, Apologies for the cluttered email. Detail listener /var/log/freeradius/radacct/detail state unopened signalled 0 waiting 1.086950 sec Waking up in 1.0 seconds. Polling for detail file /var/log/freeradius/radacct/detail Detail listener /var/log/freeradius/radacct/detail state unopened signalled 0 waiting 0.762697 sec Waking up in 0.7 seconds. ^C root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# ls -lrt total 4 drwxr-xr-x 2 freerad freerad 4096 Oct 18 05:08 192.168.1.2 root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# ls -lrt total 4 drwxr-xr-x 2 freerad freerad 4096 Oct 18 05:08 192.168.1.2 root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# cd 192.168.1.2/ root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct/192.168.1.2# ls -lrt total 8 -rw------- 1 freerad freerad 141 Oct 17 18:14 auth-detail-20171017 -rw------- 1 freerad freerad 1267 Oct 18 05:41 auth-detail-20171018 root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct/192.168.1.2# FreeRADIUS Version 2.1.12 Hi, I am setting up freeRADIUS to forward accounting requests to Fortigate. I have done the configuration but i am observing messages as below; Detail listener /var/log/freeradius/radacct/detail state unopened signalled 0 waiting 1.086950 sec Waking up in 1.0 seconds. Polling for detail file /var/log/freeradius/radacct/detail Detail listener /var/log/freeradius/radacct/detail state unopened signalled 0 waiting 0.762697 sec Waking up in 0.7 seconds. ^C root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# ls -lrt total 4 drwxr-xr-x 2 freerad freerad 4096 Oct 18 05:08 192.168.1.2 root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# cd 192.168.1.2/ root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct/192.168.1.2# ls -lrt total 8 -rw------- 1 freerad freerad 141 Oct 17 18:14 auth-detail-20171017 -rw------- 1 freerad freerad 1267 Oct 18 05:41 auth-detail-20171018 root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct/192.168.1.2# FreeRADIUS Version is 2.1.12 I have modified the modules/detail file to log all accounting packets to a single detail file as below Comment the line below by adding the # in front: # detailfile = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d detailfile = ${radacctdir}/detail I can see that it is not creating detail file and above log messages keeps on repeating for polling the detail file. I m not sure if should be seeing those messages during debug. Currently i dont have clients to simulate but will be made available tomorrow hence i m trying to be more proactive that the relay should work. Any pointers are appreciated. I am going through the documentation but any interim help is appreciated. Cheers Hitesh Vinzoda On Tuesday, 17 October 2017 10:48 PM, Alan DeKok <aland@deployingradius.com> wrote:
On Oct 17, 2017, at 12:24 PM, Hitesh Vinzoda via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
Cluttered Email - Resending again
Fix your mailer to post text, not HTML. That way it won't mangle the debug output. The text you posted is incomprehensible, so I won't bother trying to figure it out. Instead, I'll suggest that you follow the documentation. See the file sites-available/decoupled-accounting. That contains examples and documentation for how to configure detail file relaying. Or, see sites-available/copy-acct-to-home-server. That contains more examples and documentation. i.e. instead of giving a partial summary of what you did and asking "what went wrong?", you should follow the existing documentation and examples. If it doesn't work, you can then explain what you did, and what happened. And post messages which aren't mangled. That makes it much easier to help you. Alan DeKok.
On Oct 17, 2017, at 3:31 PM, Hitesh Vinzoda via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
Detail listener /var/log/freeradius/radacct/detail state unopened signalled 0 waiting 1.086950 sec Waking up in 1.0 seconds. Polling for detail file /var/log/freeradius/radacct/detail Detail listener /var/log/freeradius/radacct/detail state unopened signalled 0 waiting 0.762697 sec Waking up in 0.7 seconds.
i.e. the file isn't there.
^C root@user-To-be-filled-by-O-E-M:/var/log/freeradius/radacct# ls -lrt
All of that is useless. The debug output shows you which file it's looking for. You're not verifying that the file exists. All you need to check is: $ ls -l /var/log/freeradius/radacct/detail You'll also note that it's looking for one file. It's NOT doing a wildcard search. i.e. You've configured it to look for ONE file "detail", which is located in the directory "/var/log/freeradius/radacct/" While you're actually writing files to the directory "/var/log/freeradius/radacct/192.168.1.2", and writing files named like "auth-detail-20171017" The disconnect between reader and writer should be obvious. Again, read the examples and documentation. This is all documented. - write detail files to ONE directory, not multiple sub-directories - configure the detail file reader to read files (wildcard) from that directory. - the wildcard needs to match the filenames it's writing... On top of that, the detail file reader CANNOT read authentication packets. It can only read accounting packets. Again, this is documented. The documentation really isn't that bad. It's certainly better to read the documentation than to ignore it entirely.
FreeRADIUS Version 2.1.12
Ugh. Upgrade to 2.2.10 at least. It fixes lots of issues. Likely also issues with the detail files. Alan DeKok.
participants (2)
-
Alan DeKok -
Hitesh Vinzoda