Project

General

Profile

Bug #7965

freeradius 3 with MySQL

Added by Konstantin Ab about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
FreeRADIUS
Target version:
-
Start date:
10/17/2017
Due date:
% Done:

0%

Estimated time:
Affected Version:
Affected Architecture:

Description

sorry, I will duplicate issue 7947, BUT i think this is a 100% bug. Please, let's take it seriously.

I'm upgrading from 2.3.4 to and I tried a clean installation of 2.4.

FreeRadius3 width checked MYSQL - not worked!

Oct 16 10:47:45 radiusd 26285 /usr/local/etc/raddb/sites-enabled/default[142]: Failed to find "daily" as a module or policy.
Oct 16 10:47:45 radiusd 26285 /usr/local/etc/raddb/sites-enabled/default[142]: Please verify that the configuration exists in /usr/local/etc/raddb/mods-enabled/daily.
Oct 16 10:47:45 radiusd 26285 /usr/local/etc/raddb/sites-enabled/default[127]: Errors parsing accounting section.

I'm editing /usr/local/etc/raddb/sites-enabled/default , section "accounting":

accounting {
......
  1. sql DISABLED ###
    -daily
    -weekly
    -monthly
    -forever

Only this edit allows you to start the freeradius with MYSQL!!! I NOT USE ACCOUNTING! This parsing error!!!

the "-" sign indicates that the module is loaded if it is configured. In log:

Oct 18 11:12:01 radiusd 58508 [/usr/local/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay" found in filter list for realm "DEFAULT".
Oct 18 11:12:01 radiusd 58508 [/usr/local/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay-USec" found in filter list for realm "DEFAULT".
Oct 18 11:12:01 radiusd 58508 Loaded virtual server <default>
Oct 18 11:12:01 radiusd 58508 Ignoring "daily" (see raddb/mods-available/README.rst)
Oct 18 11:12:01 radiusd 58508 Ignoring "weekly" (see raddb/mods-available/README.rst)
Oct 18 11:12:01 radiusd 58508 Ignoring "monthly" (see raddb/mods-available/README.rst)

it turns out, these modules "by default" are not configured?

AND BUG №2:
i'm upgraded server from 2.3.4 to 2.4 and radius to freeradius 3.
I use 2 servers MYSQL in reduntant mode.
After upgrade AND uncheck mysql №2 - freeradius writes an error in the log:

Oct 18 11:03:13 radiusd 62974 /usr/local/etc/raddb/sites-enabled/default[45]: Failed to find "sql2" as a module or policy.
Oct 18 11:03:13 radiusd 62974 /usr/local/etc/raddb/sites-enabled/default[45]: Please verify that the configuration exists in /usr/local/etc/raddb/mods-enabled/sql2.
Oct 18 11:03:13 radiusd 62974 /usr/local/etc/raddb/sites-enabled/default[45]: Failed to parse "sql2" entry.
Oct 18 11:03:13 radiusd 62974 /usr/local/etc/raddb/sites-enabled/default[8]: Errors parsing authorize section.
Oct 18 11:03:13 radiusd 62974 Failed to load virtual server default

on this server I do not edited files

History

#1 Updated by Konstantin Ab about 2 years ago

i use freeradius for Plain MAC Authentication

#2 Updated by Kill Bill about 2 years ago

This commit: https://github.com/pfsense/FreeBSD-ports/commit/eafa6ca5d0b89a3e6a9110dfea8e2a89fe24d245

- The hunk starting with line 129 doesn't make any sense to me, what's that daily etc. cruft there? Isn't that what we are talking about here? I have that there even with SQL disabled and the whole section doesn't make sense:

This is my /usr/local/etc/raddb/sites-enabled/default with SQL completely disabled:

        ### sql DISABLED ###
        daily
        weekly
        monthly
        forever

Also looks like multiple copy/paste problems there (where either sql1 should in fact be sql2 most likely...)
- Around line 1860 in that commit
- Ditto lines 1940, 1960, 1974
...

Note: I cannot test any SQL setup here, merely observing the code changes there.

#3 Updated by Konstantin Ab about 2 years ago

where its apply for testing?

#4 Updated by Kill Bill about 2 years ago

There is nothing for testing (beyond reverting that commit). The linked commit is potentially a source of the issues here.

#5 Updated by Konstantin Ab about 2 years ago

hmmm.... will this commit fall into the repository? or nothing?
how can I help?

#6 Updated by Konstantin Ab about 2 years ago

this problem prevents the upgrade of servers to 2.4

#7 Updated by Konstantin Ab almost 2 years ago

new version package. Thx
And new problem with parsing. I use sql module with 1 sql server (NOT 2 servers!)

its log:

Nov 23 09:11:02 radiusd 8277 Loaded virtual server <default>
Nov 23 09:11:02 radiusd 8277 /usr/local/etc/raddb/sites-enabled/default168: Failed to find "sql2" as a module or policy.
Nov 23 09:11:02 radiusd 8277 /usr/local/etc/raddb/sites-enabled/default168: Please verify that the configuration exists in /usr/local/etc/raddb/mods-enabled/sql2.
Nov 23 09:11:02 radiusd 8277 /usr/local/etc/raddb/sites-enabled/default168: Failed to parse "sql2" entry.
Nov 23 09:11:02 radiusd 8277 /usr/local/etc/raddb/sites-enabled/default153: Errors parsing post-auth section.
Nov 23 09:11:02 radiusd 8277 Failed to load virtual server default

its not work, freeradius not started

redundant sql {
sql1
sql2
}

Its work:

redundant sql {
sql1
#sql2
}

#8 Updated by Jim Pingle almost 2 years ago

  • Status changed from New to Feedback
  • Assignee set to Jim Pingle

Fixed in commit:a5d0e15340e1975a86fb5fe48f93032b3c574934 - pkg version 0.15.4

#9 Updated by Konstantin Ab almost 2 years ago

Thank you! It remains to fix "daily" in config to run freeradius
With "daily(and etc...)" in config freeradius not started

#10 Updated by Jim Pingle almost 2 years ago

There should not be any need for manual corrections on the current version. The counters should be handled properly.

If you still get an error on the current version then I'll need to know the exact values you have set on the SQL tab for the checkboxes and enable/disable drop-down menu entries.

#11 Updated by Konstantin Ab almost 2 years ago

THX! It's worked!

#12 Updated by Jim Pingle almost 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF