I did a system upgrade and my silly disto upgraded FreeRADIUS to 3.0.0 so I am reconfiguring it from scratch because of the changes. I have managed to get SQL up and running but am having troubles getting my sqlcounters to work. After putting the following in /etc/raddb/mods-config/sql/counter/mysql/queries.conf sqlcounter counter_octets_daily { sql_module_instance = sql counter_name = ChilliSpot-Max-Total-Octets-Daily check_name = CS-Total-Octets-Daily reply-name = ChilliSpot-Max-Total-Octets key = User-Name reset = daily query = "SELECT IFNULL((SUM(AcctInputOctets + AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'" } I put "counter_octets_daily" in the authorize{} block after "sql" in /etc/raddb/sites-available/default but when I try and boot radiusd I get: /etc/raddb/sites-enabled/default[339]: Failed to find "counter_octets_daily" in the "modules" section. /etc/raddb/sites-enabled/default[220]: Errors parsing authorize section. When I remove "counter_octets_daily" from the authorize{} block after "sql" in /etc/raddb/sites-available/default radiusd boots but does not know what the CS-Total-Octets-Daily attribute is so I must be missing something... I can't find docs for version 3 Thanks in advance for any help
On 1 Dec 2013, at 03:24, Jed Gainer <jedgainer@gmail.com> wrote:
I did a system upgrade and my silly disto upgraded FreeRADIUS to 3.0.0 so I am reconfiguring it from scratch because of the changes. I have managed to get SQL up and running but am having troubles getting my sqlcounters to work.
After putting the following in /etc/raddb/mods-config/sql/counter/mysql/queries.conf
sqlcounter counter_octets_daily { sql_module_instance = sql
counter_name = ChilliSpot-Max-Total-Octets-Daily check_name = CS-Total-Octets-Daily reply-name = ChilliSpot-Max-Total-Octets
key = User-Name reset = daily query = "SELECT IFNULL((SUM(AcctInputOctets + AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'" }
The examples are wrong, they got accidentally moved into that folder during the reorganisation, most likely because of the incorrect header lines.
I put "counter_octets_daily" in the authorize{} block after "sql" in /etc/raddb/sites-available/default
but when I try and boot radiusd I get:
Make a file in /etc/raddb/mods-available/sql_counter move that section in there, link it to /etc/raddb/mods-enabled/sql_counter. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
sqlcounter counter_octets_daily { sql_module_instance = "sql" key = "User-Name" query = "SELECT IFNULL((SUM(AcctInputOctets + AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'" reset = "daily" counter_name = "ChilliSpot-Max-Total-Octets-Daily" check_name = "CS-Total-Octets-Daily" reply_name = "ChilliSpot-Max-Total-Octets" } /etc/raddb/mods-enabled/sql_counter[1]: Configuration item 'reply_name' cannot be a VSA /etc/raddb/mods-enabled/sql_counter[1]: Instantiation failed for module "counter_octets_daily" On Sun, Dec 1, 2013 at 2:24 AM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 1 Dec 2013, at 03:24, Jed Gainer <jedgainer@gmail.com> wrote:
I did a system upgrade and my silly disto upgraded FreeRADIUS to 3.0.0 so I am reconfiguring it from scratch because of the changes. I have managed to get SQL up and running but am having troubles getting my sqlcounters to work.
After putting the following in /etc/raddb/mods-config/sql/counter/mysql/queries.conf
sqlcounter counter_octets_daily { sql_module_instance = sql
counter_name = ChilliSpot-Max-Total-Octets-Daily check_name = CS-Total-Octets-Daily reply-name = ChilliSpot-Max-Total-Octets
key = User-Name reset = daily query = "SELECT IFNULL((SUM(AcctInputOctets + AcctOutputOctets)),0) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'" }
The examples are wrong, they got accidentally moved into that folder during the reorganisation, most likely because of the incorrect header lines.
I put "counter_octets_daily" in the authorize{} block after "sql" in /etc/raddb/sites-available/default
but when I try and boot radiusd I get:
Make a file in /etc/raddb/mods-available/sql_counter move that section in there, link it to /etc/raddb/mods-enabled/sql_counter.
-Arran
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
What distro are you using? Good to know that 3.0 is now actively distributed alan -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Jed Gainer wrote:
I did a system upgrade and my silly disto upgraded FreeRADIUS to 3.0.0
That's not nice. A normal update shouldn't change major versions of software. But if you upgraded your entire system... I guess I can see why they'd think that's useful.
so I am reconfiguring it from scratch because of the changes. I have managed to get SQL up and running but am having troubles getting my sqlcounters to work.
The sqlcounters really haven't changed. The files have moved around, but the functionality is the same.
I can't find docs for version 3
Nonsense. See raddb/README.rst. If your distribution maintainers haven't included it, go beat them up. And then look in the main FreeRADIUS "tar" file for it. Alan DeKok.
On 1 Dec 2013, at 13:50, Alan DeKok <aland@deployingradius.com> wrote:
Jed Gainer wrote:
I did a system upgrade and my silly disto upgraded FreeRADIUS to 3.0.0
That's not nice. A normal update shouldn't change major versions of software. But if you upgraded your entire system... I guess I can see why they'd think that's useful.
so I am reconfiguring it from scratch because of the changes. I have managed to get SQL up and running but am having troubles getting my sqlcounters to work.
The sqlcounters really haven't changed. The files have moved around, but the functionality is the same.
I can't find docs for version 3
Nonsense. See raddb/README.rst.
If your distribution maintainers haven't included it, go beat them up. And then look in the main FreeRADIUS "tar" file for it.
Still interested to know what distro this is. Anyway, example configs fixed... ish. We really need ${${nested}} expansion to do this correctly, and possibly a way to select on[name2] not sure if that's allowed currently. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
It's Arch Linux. Not sure what you mean about ${${nested}} expansion and select on[name2] On Sun, Dec 1, 2013 at 2:07 PM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 1 Dec 2013, at 13:50, Alan DeKok <aland@deployingradius.com> wrote:
Jed Gainer wrote:
I did a system upgrade and my silly disto upgraded FreeRADIUS to 3.0.0
That's not nice. A normal update shouldn't change major versions of software. But if you upgraded your entire system... I guess I can see why they'd think that's useful.
so I am reconfiguring it from scratch because of the changes. I have managed to get SQL up and running but am having troubles getting my sqlcounters to work.
The sqlcounters really haven't changed. The files have moved around, but the functionality is the same.
I can't find docs for version 3
Nonsense. See raddb/README.rst.
If your distribution maintainers haven't included it, go beat them up. And then look in the main FreeRADIUS "tar" file for it.
Still interested to know what distro this is.
Anyway, example configs fixed... ish. We really need ${${nested}} expansion to do this correctly, and possibly a way to select on[name2] not sure if that's allowed currently.
-Arran
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 9 Dec 2013, at 03:54, Jed Gainer <jedgainer@gmail.com> wrote:
It's Arch Linux.
Not sure what you mean about ${${nested}} expansion and select on[name2]
It was a note to the other developers. Weird, I guess reply_name can't be a VSA. I wonder why. I'll take a quick look later and see if it's easily fixable. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
On 9 Dec 2013, at 09:16, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 9 Dec 2013, at 03:54, Jed Gainer <jedgainer@gmail.com> wrote:
It's Arch Linux.
Not sure what you mean about ${${nested}} expansion and select on[name2]
It was a note to the other developers.
Weird, I guess reply_name can't be a VSA. I wonder why.
I'll take a quick look later and see if it's easily fixable.
and... still not sure. That code is pretty bad. Oh well, i've removed the restriction. It might of been to do with paircompare, maybe it only used to work with attribute numbers. It's since been modified to work with DA's so should be ok now. Pushed fixes to both branches, let me know how you get on. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Ready to process requests rad_recv: Access-Request packet from host 127.0.0.1 port 52924, id=182, length=297 ChilliSpot-Version = '1.3.1-svn' User-Name = 'Jed Gainer' CHAP-Challenge = 0x9211c124640b4d57c41c290e43534e57 CHAP-Password = 0x0042e4ef1c3a60a1f291a7381b71d0ac99 Service-Type = Login-User Acct-Session-Id = '52ae2e9100000001' Framed-IP-Address = 10.1.128.1 NAS-Port-Type = Wireless-802.11 NAS-Port = 1 NAS-Port-Id = '00000001' Calling-Station-Id = '00-0C-29-C9-E1-01' Called-Station-Id = '00-0C-29-C3-67-E3' NAS-IP-Address = 10.1.0.1 NAS-Identifier = 'nas01' WISPr-Location-ID = 'isocc=,cc=,ac=,network=Coova,' WISPr-Location-Name = 'My_HotSpot' WISPr-Logoff-URL = 'http://10.1.0.1:3990/logoff' Message-Authenticator = 0xff857a3fbd762ac33465a30f127eb5d0 (0) # Executing section authorize from file /etc/raddb/sites-enabled/default (0) authorize { (0) filter_username filter_username { (0) ? if (User-Name =~ /@.*@/ ) (0) ? if (User-Name =~ /@.*@/ ) -> FALSE (0) ? if (User-Name =~ /\\.\\./ ) (0) ? if (User-Name =~ /\\.\\./ ) -> FALSE (0) ? if ((User-Name =~ /@/) && (User-Name !~ /@(.+)\\.(.+)$/)) (0) ? if ((User-Name =~ /@/) && (User-Name !~ /@(.+)\\.(.+)$/)) -> FALSE (0) ? if (User-Name =~ /\\.$/) (0) ? if (User-Name =~ /\\.$/) -> FALSE (0) ? if (User-Name =~ /@\\./) (0) ? if (User-Name =~ /@\\./) -> FALSE (0) } # filter_username filter_username = notfound (0) [preprocess] = ok (0) chap : Setting 'Auth-Type := CHAP' (0) [chap] = ok (0) [mschap] = noop (0) [digest] = noop (0) suffix : No '@' in User-Name = "Jed Gainer", looking up realm NULL (0) suffix : No such realm "NULL" (0) [suffix] = noop (0) eap : No EAP-Message, not doing EAP (0) [eap] = noop (0) [files] = noop Segmentation fault (core dumped) [root@hotspot freeradius-git]# On Mon, Dec 9, 2013 at 11:33 AM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 9 Dec 2013, at 09:16, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 9 Dec 2013, at 03:54, Jed Gainer <jedgainer@gmail.com> wrote:
It's Arch Linux.
Not sure what you mean about ${${nested}} expansion and select on[name2]
It was a note to the other developers.
Weird, I guess reply_name can't be a VSA. I wonder why.
I'll take a quick look later and see if it's easily fixable.
and... still not sure. That code is pretty bad. Oh well, i've removed the restriction. It might of been to do with paircompare, maybe it only used to work with attribute numbers. It's since been modified to work with DA's so should be ok now.
Pushed fixes to both branches, let me know how you get on.
-Arran
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 16 Dec 2013, at 11:11, A.L.M.Buxey@lboro.ac.uk wrote:
Hi,
(0) suffix : No such realm "NULL" (0) [suffix] = noop (0) eap : No EAP-Message, not doing EAP (0) [eap] = noop (0) [files] = noop Segmentation fault (core dumped) [root@hotspot freeradius-git]#
happens consistently? follow the guide in doc/bugs
i.e. provide a backtrace from GDB. We can't infer what went wrong from 'Segmentation fault (core dumped)', the server is 80,000+ LoC... Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Is there a guide on how to get a backtrace with GDB? On Mon, Dec 16, 2013 at 6:02 AM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 16 Dec 2013, at 11:11, A.L.M.Buxey@lboro.ac.uk wrote:
Hi,
(0) suffix : No such realm "NULL" (0) [suffix] = noop (0) eap : No EAP-Message, not doing EAP (0) [eap] = noop (0) [files] = noop Segmentation fault (core dumped) [root@hotspot freeradius-git]#
happens consistently? follow the guide in doc/bugs
i.e. provide a backtrace from GDB.
We can't infer what went wrong from 'Segmentation fault (core dumped)', the server is 80,000+ LoC...
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
as already said. Read the bugs text file in the docs sub directory. I don't write random things for fun. ... Alan -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
participants (5)
-
A.L.M.Buxey@lboro.ac.uk -
Alan Buxey -
Alan DeKok -
Arran Cudbard-Bell -
Jed Gainer