Unknown Attribute "Max-Daily-Session" on freeradius3
Hi, I'm trying to use freeradius3, but i have this error on a Access-Request packet rlm_sql (sql): Executing query: 'SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'Users' ORDER BY id' rlm_sql: Failed to create the pair: Unknown attribute "Max-Daily-Session" rlm_sql (sql): Error getting data from database (0) ERROR: sql : Error retrieving check pairs for group Users with freeradius 2.2.3 it works. I have the "Max-Daily-Session" attribute in a table named "dictionary" in the radius database. How can i tell to radius that dictionary is in the database? Thanks
On 14 Feb 2014, at 11:05, Marco Marino <marino.mrc@gmail.com> wrote:
Hi, I'm trying to use freeradius3, but i have this error on a Access-Request packet
rlm_sql (sql): Executing query: 'SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'Users' ORDER BY id' rlm_sql: Failed to create the pair: Unknown attribute "Max-Daily-Session" rlm_sql (sql): Error getting data from database (0) ERROR: sql : Error retrieving check pairs for group Users
Thanks for the bug report. This was due to incorrect arguments being passed to the dict_addattr function in rlm_sqlcounter. This has now been fixed, and fixes pushed to the v3.0.x and master. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Ok. I suspected it was a bug (reading the code), but i haven't had time to thoroughly check. I proceed with a git pull. Thank You 2014-02-14 13:38 GMT+01:00 Arran Cudbard-Bell <a.cudbardb@freeradius.org>:
On 14 Feb 2014, at 11:05, Marco Marino <marino.mrc@gmail.com> wrote:
Hi, I'm trying to use freeradius3, but i have this error on a Access-Request packet
rlm_sql (sql): Executing query: 'SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'Users' ORDER BY id' rlm_sql: Failed to create the pair: Unknown attribute "Max-Daily-Session" rlm_sql (sql): Error getting data from database (0) ERROR: sql : Error retrieving check pairs for group Users
Thanks for the bug report.
This was due to incorrect arguments being passed to the dict_addattr function in rlm_sqlcounter.
This has now been fixed, and fixes pushed to the v3.0.x and master.
-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
2014-02-14 13:38 GMT+01:00 Arran Cudbard-Bell <a.cudbardb@freeradius.org>:
On 14 Feb 2014, at 11:05, Marco Marino <marino.mrc@gmail.com> wrote:
Hi, I'm trying to use freeradius3, but i have this error on a Access-Request packet
rlm_sql (sql): Executing query: 'SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'Users' ORDER BY id' rlm_sql: Failed to create the pair: Unknown attribute "Max-Daily-Session" rlm_sql (sql): Error getting data from database (0) ERROR: sql : Error retrieving check pairs for group Users
Thanks for the bug report.
This was due to incorrect arguments being passed to the dict_addattr function in rlm_sqlcounter.
This means that i have to enable sqlcounter module if i'm using dictionary table (mysql)??? BTW, git pull doesn't solved the issue.
This has now been fixed, and fixes pushed to the v3.0.x and master.
-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
This was due to incorrect arguments being passed to the dict_addattr function in rlm_sqlcounter. This means that i have to enable sqlcounter module if i'm using dictionary table (mysql)???
I have no idea what that means.
BTW, git pull doesn't solved the issue.
Please provide full debug output. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Ok... I'm trying to switch to FR3 from FR2.2.3. In the old version there is a table in the mysql db called "dictionary", created by a rails application (fixtures). I don't have a deep knowledge of FR, so i don't known how FR import this table (and its attributes) in memory... When i do echo "User-Name = marco,User-Password = mc68hc908" | /usr/bin/radclient localhost:1812 auth testing123 output is: Ready to process requests rad_recv: Access-Request packet from host 127.0.0.1 port 46505, id=12, length=45 User-Name = 'marco' User-Password = 'mc68hc908' (0) # Executing section authorize from file /etc/freeradius//sites-enabled/default (0) authorize { (0) filter_username filter_username { (0) ? if (!User-Name) (0) ? if (!User-Name) -> FALSE (0) ? if (User-Name != "%{tolower:%{User-Name}}") (0) expand: "%{tolower:%{User-Name}}" -> 'marco' (0) ? if (User-Name != "%{tolower:%{User-Name}}") -> FALSE (0) ? if (User-Name =~ / /) (0) ? if (User-Name =~ / /) -> FALSE (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] = noop (0) [mschap] = noop (0) [digest] = noop (0) suffix : No '@' in User-Name = "marco", 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 (0) sql : expand: "%{User-Name}" -> 'marco' (0) sql : SQL-User-Name set to 'marco' rlm_sql (sql): Reserved connection (4) (0) sql : expand: "SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id" -> 'SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'marco' ORDER BY id' rlm_sql (sql): Executing query: 'SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'marco' ORDER BY id' (0) sql : User found in radcheck table (0) sql : Check items matched (0) sql : expand: "SELECT id, username, attribute, value, op FROM radreply WHERE username = '%{SQL-User-Name}' ORDER BY id" -> 'SELECT id, username, attribute, value, op FROM radreply WHERE username = 'marco' ORDER BY id' rlm_sql (sql): Executing query: 'SELECT id, username, attribute, value, op FROM radreply WHERE username = 'marco' ORDER BY id' (0) sql : expand: "SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority" -> 'SELECT groupname FROM radusergroup WHERE username = 'marco' ORDER BY priority' rlm_sql (sql): Executing query: 'SELECT groupname FROM radusergroup WHERE username = 'marco' ORDER BY priority' (0) sql : User found in the group table (0) sql : expand: "SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id" -> 'SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'Users' ORDER BY id' rlm_sql (sql): Executing query: 'SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'Users' ORDER BY id' rlm_sql: Failed to create the pair: Unknown attribute "Max-Daily-Session" rlm_sql (sql): Error parsing user data from database result (0) ERROR: sql : Error retrieving check pairs for group Users rlm_sql (sql): Released connection (4) rlm_sql (sql): Closing connection (0): Too many free connections (5 > 3) rlm_sql_mysql: Socket destructor called, closing socket (0) [sql] = fail (0) } # authorize = fail (0) Using Post-Auth-Type Reject (0) # Executing group from file /etc/freeradius//sites-enabled/default (0) Post-Auth-Type REJECT { (0) [-sql] = noop (0) attr_filter.access_reject : expand: "%{User-Name}" -> 'marco' (0) attr_filter.access_reject : Matched entry DEFAULT at line 11 (0) [attr_filter.access_reject] = updated (0) eap : Request didn't contain an EAP-Message, not inserting EAP-Failure (0) [eap] = noop (0) remove_reply_message_if_eap remove_reply_message_if_eap { (0) ? if (reply:EAP-Message && reply:Reply-Message) (0) ? if (reply:EAP-Message && reply:Reply-Message) -> FALSE (0) else else { (0) [noop] = noop (0) } # else else = noop (0) } # remove_reply_message_if_eap remove_reply_message_if_eap = noop (0) } # Post-Auth-Type REJECT = updated (0) Finished request 0. Waking up in 0.3 seconds. Waking up in 0.6 seconds. (0) Sending delayed reject Sending Access-Reject of id 12 from 127.0.0.1 port 1812 to 127.0.0.1 port 46505 Waking up in 4.9 seconds. (0) Cleaning up request packet ID 12 with timestamp +17 Ready to process requests Have I some error in the configuration files? I known that switch from 2.x to 3 is possible... Thanks 2014-02-17 12:42 GMT+01:00 Arran Cudbard-Bell <a.cudbardb@freeradius.org>:
This was due to incorrect arguments being passed to the dict_addattr function in rlm_sqlcounter. This means that i have to enable sqlcounter module if i'm using dictionary table (mysql)???
I have no idea what that means.
BTW, git pull doesn't solved the issue.
Please provide full debug output.
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 17 Feb 2014, at 11:57, Marco Marino <marino.mrc@gmail.com> wrote:
Ok... I'm trying to switch to FR3 from FR2.2.3. In the old version there is a table in the mysql db called "dictionary", created by a rails application (fixtures). I don't have a deep knowledge of FR, so i don't known how FR import this table (and its attributes) in memory...
That's not a FreeRADIUS table. FreeRADIUS cannot retrieve attribute definitions from a database. Full debug output would include the output from when rlm_sqlcounter was loaded. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Ok. Now i understand. I nedd sqlcounter (or counter, in my case) module enabled if i want to use Max-Daily-Session attribute. An important change in FR3 is the method used for enabling modules (symbolic link to mods-available). I forgot to enable counter module. Now it works. Thank You. PS: Changes in the counter (not sqlcounter!) module that i've posted.... Are they useful? 2014-02-17 13:13 GMT+01:00 Arran Cudbard-Bell <a.cudbardb@freeradius.org>:
On 17 Feb 2014, at 11:57, Marco Marino <marino.mrc@gmail.com> wrote:
Ok... I'm trying to switch to FR3 from FR2.2.3. In the old version there is a table in the mysql db called "dictionary", created by a rails application (fixtures). I don't have a deep knowledge of FR, so i don't known how FR import this table (and its attributes) in memory...
That's not a FreeRADIUS table. FreeRADIUS cannot retrieve attribute definitions from a database.
Full debug output would include the output from when rlm_sqlcounter was loaded.
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
participants (2)
-
Arran Cudbard-Bell -
Marco Marino