OPNsense Forum

English Forums => General Discussion => Topic started by: SuperMiguel on November 14, 2021, 12:42:18 am

Title: FreeRadius fails to install
Post by: SuperMiguel on November 14, 2021, 12:42:18 am
Hello all, on a new installation i tried install FreeRadius and i get the following:

Code: [Select]
***GOT REQUEST TO INSTALL***
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
The following 10 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
freeradius3: 3.0.25
gdbm: 1.22
groff: 1.22.4_4
libpaper: 1.1.24.4
mysql57-client: 5.7.36
os-freeradius: 1.9.17
protobuf: 3.17.3,1
psutils: 1.17_5
talloc: 2.3.1
uchardet: 0.0.7

Number of packages to be installed: 10

The process will require 103 MiB more space.
9 MiB to be downloaded.
[1/10] Fetching os-freeradius-1.9.17.txz: ...... done
[2/10] Fetching freeradius3-3.0.25.txz: .......... done
[3/10] Fetching talloc-2.3.1.txz: ....... done
[4/10] Fetching mysql57-client-5.7.36.txz: .......... done
[5/10] Fetching groff-1.22.4_4.txz: .......... done
[6/10] Fetching uchardet-0.0.7.txz: .......... done
[7/10] Fetching psutils-1.17_5.txz: ........ done
[8/10] Fetching libpaper-1.1.24.4.txz: ... done
[9/10] Fetching protobuf-3.17.3,1.txz: .......... done
[10/10] Fetching gdbm-1.22.txz: .......... done
Checking integrity... done (0 conflicting)
[1/10] Installing libpaper-1.1.24.4...
[1/10] Extracting libpaper-1.1.24.4: .......... done
[2/10] Installing uchardet-0.0.7...
[2/10] Extracting uchardet-0.0.7: .......... done
[3/10] Installing psutils-1.17_5...
[3/10] Extracting psutils-1.17_5: .......... done
[4/10] Installing groff-1.22.4_4...
[4/10] Extracting groff-1.22.4_4: .......... done
[5/10] Installing protobuf-3.17.3,1...
[5/10] Extracting protobuf-3.17.3,1: .......... done
[6/10] Installing talloc-2.3.1...
[6/10] Extracting talloc-2.3.1: .......... done
[7/10] Installing mysql57-client-5.7.36...
[7/10] Extracting mysql57-client-5.7.36: .......... done
[8/10] Installing gdbm-1.22...
[8/10] Extracting gdbm-1.22: .......... done
[9/10] Installing freeradius3-3.0.25...
===> Creating groups.
Using existing group 'freeradius'.
===> Creating users
Using existing user 'freeradius'.
===> Setting user and group in radiusd.conf
[9/10] Extracting freeradius3-3.0.25: .......... done
===> Adjusting ownership of directory /usr/local/etc/raddb
===> Adjusting ownership of directory /var/log/radacct
===> Adjusting ownership of directory /var/run/radiusd
===> Adjusting ownership of /var/log/radius.log
===> Adjusting ownership of /var/log/radutmp
===> Adjusting ownership of /var/log/radwtmp
===> Updating libdir in /usr/local/etc/raddb/radiusd.conf
[10/10] Installing os-freeradius-1.9.17...
[10/10] Extracting os-freeradius-1.9.17: .......... done
Stopping configd...done
Starting configd.
*** OPNsense\Freeradius\Eap Migration failed, check log for details
Reloading plugin configuration
Configuring system logging...done.
Reloading template OPNsense/Freeradius: Execute error
=====
Message from groff-1.22.4_4:

--
In order to be able to use the html driver, you need to install the following
packages:
 - ghostscript
 - netpbm
=====
Message from mysql57-client-5.7.36:

--
This is the mysql CLIENT without the server.
for complete server and client, please install databases/mysql57-server
=====
Message from freeradius3-3.0.25:

--
To enable FreeRADIUS, put the following line in /etc/rc.conf

radiusd_enable="YES"


The sample configuration can be found at
/usr/local/share/examples/freeradius/raddb

If you are upgrading FreeRADIUS, you are advised to use this as a reference
for updating your configuration.


FreeRADIUS will look for its configuration directory at
/usr/local/etc/raddb by default.

If you did not already have a configuration at this location, the sample
configuration has been copied to this location and has been bootstrapped.


If you wish to point FreeRADIUS to a configuration at a different
location, put the following line in /etc/rc.conf

radiusd_flags="-d /path/to/raddb"


To start the server in normal (daemon) mode, run:

/usr/local/etc/rc.d/radiusd start

and to stop the server, run:

/usr/local/etc/rc.d/radiusd stop


To start the server in debugging mode, run:

/usr/local/etc/rc.d/radiusd debug


You are advised to make cautious changes to the configuration, and to test
frequently, using debugging mode where necessary. Try to resist the
temptation to disable or delete things that you don't understand - you may
well break things!

Useful configuration advice can be found in the FreeRADIUS Wiki at
http://wiki.freeradius.org
Checking integrity... done (0 conflicting)
Nothing to do.
***DONE***



I tried starting it by using `radiusd -X` and i got:
Code: [Select]
The server is not configured to listen on any ports.  Cannot start
Title: Re: FreeRadius fails to install
Post by: benyamin on November 14, 2021, 07:46:45 am
Did you enable and configure the service at Services: FreeRADIUS: General...?
Title: Re: FreeRadius fails to install
Post by: SuperMiguel on November 15, 2021, 03:21:10 am
The only thing i did under: Services: FreeRADIUS: General was check "Enable" and check "Enable VLAN assignment" everything else is set as default.
My biggest worry was the following lines of my install log:

Code: [Select]
Stopping configd...done
Starting configd.
*** OPNsense\Freeradius\Eap Migration failed, check log for details
Reloading plugin configuration
Configuring system logging...done.
Reloading template OPNsense/Freeradius: Execute error
Title: Re: FreeRadius fails to install
Post by: benyamin on November 15, 2021, 05:16:41 am
Better eyes than mine...!

I would delete (remove/uninstall) and try again (presuming you hadn't already done so).
Title: Re: FreeRadius fails to install
Post by: mimugmail on November 15, 2021, 09:33:20 am
Which version is it? Can you post logs from System : Logging : Backend?
Title: Re: FreeRadius fails to install
Post by: SuperMiguel on November 15, 2021, 06:36:34 pm
Which version is it? Can you post logs from System : Logging : Backend?

Tried that few times, and no go.
Title: Re: FreeRadius fails to install
Post by: SuperMiguel on November 15, 2021, 06:41:23 pm
Which version is it? Can you post logs from System : Logging : Backend?

Tried that few times, and no go.

OPNsense version: OPNsense 21.7.5-amd64
FreeBSD 12.1-RELEASE-p21-HBSD
OpenSSL 1.1.1l 24 Aug 2021
FreeRadius plugin version: 1.9.17   

Here is the error i get in there:

Code: [Select]
[842be06d-7b16-498e-9f57-75cb78aeeed6] Inline action failed with OPNsense/Freeradius OPNsense/Freeradius/mods-enabled-eap 'collections.OrderedDict object' has no attribute 'eap' at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/template.py", line 264, in _generate content = j2_page.render(cnf_data) File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1304, in render self.environment.handle_exception() File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 925, in handle_exception raise rewrite_traceback_stack(source=source) File "/usr/local/opnsense/service/modules/../templates/OPNsense/Freeradius/mods-enabled-eap", line 456, in top-level template code tls_min_version = "{{ OPNsense.freeradius.eap.tls_min_version }}" File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 474, in getattr return getattr(obj, attribute) jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute 'eap' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 506, in execute return ph_inline_actions.execute(self, inline_act_parameters) File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 51, in execute filenames = tmpl.generate(parameters) File "/usr/local/opnsense/service/modules/template.py", line 341, in generate raise render_exception File "/usr/local/opnsense/service/modules/template.py", line 332, in generate for filename in self._generate(template_name, create_directory): File "/usr/local/opnsense/service/modules/template.py", line 267, in _generate raise Exception("%s %s %s" % (module_name, template_filename, render_exception)) Exception: OPNsense/Freeradius OPNsense/Freeradius/mods-enabled-eap 'collections.OrderedDict object' has no attribute 'eap'
Title: Re: FreeRadius fails to install
Post by: mimugmail on December 07, 2021, 04:01:00 pm
Just go to Services : Freeradius : EAP and hit Apply, will be fixed in next version too