Menu

FreeRADIUS failed to start after basic configuration

Help
2018-03-23
2018-03-24
  • Markus Lösch

    Markus Lösch - 2018-03-23

    Hi guys,

    I have installed RADIUSdesk according to the manual (http://www.radiusdesk.com/docuwiki/getting_started/install_ubuntu_freeradius_3) and I'm using Debian 9 Stretch (i686) as an OS. The only difference is that I installed the packages of the debian project (freeradius-3.0.12) and not from the recommended launchpad.net repository. But so far everything works great.

    After "Configuring FreeRADIUS version 3.x" (chapter) and the following lines

    sudo systemctl daemon-reload 
    sudo systemctl restart freeradius.service
    

    the freeradius.service failed to start (see below for error output)

    systemctl status freeradius.service
    ● freeradius.service - FreeRADIUS multi-protocol policy server
       Loaded: loaded (/lib/systemd/system/freeradius.service; enabled; vendor preset: enabled)
       Active: activating (auto-restart) (Result: exit-code) since Sun 2018-03-18 09:56:18 CET; 5s ago
         Docs: man:radiusd(8)
               man:radiusd.conf(5)
               http://wiki.freeradius.org/
               http://networkradius.com/doc/
      Process: 1841 ExecStart=/usr/sbin/freeradius $FREERADIUS_OPTIONS (code=exited, status=1/FAILURE)
    
    Mär 18 09:56:18 radius systemd[1]: freeradius.service: Control process exited, code=exited status=1
    Mär 18 09:56:18 radius systemd[1]: Failed to start FreeRADIUS multi-protocol policy server.
    Mär 18 09:56:18 radius systemd[1]: freeradius.service: Unit entered failed state.
    Mär 18 09:56:18 radius systemd[1]: freeradius.service: Failed with result 'exit-code'.
    Mär 18 09:56:24 radius systemd[1]: freeradius.service: Service hold-off time over, scheduling restart.
    

    Can you please give me a hint how to solve this issue?

    Besides I noticed that the original freeradius configuration directory on Debian 9 (/etc/freeradius/3.0/) differs from the directory which was extracted from the 'freeradius-3-radiusdesk.tar.gz' file (/etc/freeradius/). Does that matter in this case?

    Thank you in advance for your help.

    Markus

     
    • Mfawa Alfred Onen

      Markus, you could double check that the freeradius.service file is the
      same with what the instructution suggests

      sudo vi /lib/systemd/system/freeradius.service

      [Unit]
      Description=FreeRADIUS multi-protocol policy server
      After=syslog.target network.target
      Documentation=man:radiusd(8) man:radiusd.conf(5) http://wiki.freeradius.org/
      http://networkradius.com/doc/

      [Service]
      Type=forking
      PIDFile=/run/freeradius/freeradius.pid

      EnvironmentFile=-/etc/default/freeradius

      ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cxm -lstdout

      ExecStart=/usr/sbin/freeradius $FREERADIUS_OPTIONS
      Restart=on-failure
      RestartSec=5

      [Install]
      WantedBy=multi-user.target

      As for the directory difference, it shouldn't matter as it is matter of
      directory structure as opposed to fixed directory path. Just copy the
      contents of freeradius-3-radiusdesk.tar.gz to /etc/freeradius/3.0/

       
  • Markus Lösch

    Markus Lösch - 2018-03-24

    Thank you Mfawa for your fast reply.

    Short status update:
    The configuration of the freeradius.service file is the same as in the suggested instructions. I verified that.

    As you suggested, I copied the contents to /etc/freeradius/3.0/. Only the dictionary_overrides folder obviously has to be in /etc/freeradius/ (according to errors in /var/log/freeradius/radius.log)
    After that the FreeRADIUS started - with one error and some warnings (see radius.log below):

    Sat Mar 24 08:51:52 2018 : Info: Debugger not attached
    Sat Mar 24 08:51:52 2018 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
    Sat Mar 24 08:51:53 2018 : Warning: [/etc/freeradius/3.0/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay"   found in filter list for realm "DEFAULT". 
    Sat Mar 24 08:51:53 2018 : Warning: [/etc/freeradius/3.0/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay-USec"  found in filter list for realm "DEFAULT". 
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql_mysql: libmysql version: 10.1.26-MariaDB
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Attempting to connect to database "rd"
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Opening additional connection (0), 1 of 32 pending slots used
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Opening additional connection (1), 1 of 31 pending slots used
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Opening additional connection (2), 1 of 30 pending slots used
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Opening additional connection (3), 1 of 29 pending slots used
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Opening additional connection (4), 1 of 28 pending slots used
    Sat Mar 24 08:51:53 2018 : Error: Failed to add duplicate client localhost
    Sat Mar 24 08:51:53 2018 : Warning: Failed to add client, possible duplicate?
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Need 5 more connections to reach 10 spares
    Sat Mar 24 08:51:53 2018 : Info: rlm_sql (sql): Opening additional connection (5), 1 of 27 pending slots used
    Sat Mar 24 08:51:53 2018 : Info: Loaded virtual server <default>
    Sat Mar 24 08:51:53 2018 : Warning: Ignoring "ldap" (see raddb/mods-available/README.rst)
    Sat Mar 24 08:51:53 2018 : Info: Loaded virtual server inner-tunnel
    Sat Mar 24 08:51:53 2018 : Info: Loaded virtual server default
    Sat Mar 24 08:51:53 2018 : Info: Loaded virtual server dynamic_clients
    Sat Mar 24 08:51:53 2018 : Info: Loaded virtual server radiusdesk-plain
    Sat Mar 24 08:51:53 2018 : Info: Ready to process requests
    

    I try to understand und solve this error and the warnings (if necessary). Then I'm going to post the final solution.

    I'm thankful if you or anyone can give me a little tip/advice.

     
  • Mfawa Alfred Onen

    Markus, this line tells you the problem already:

    Sat Mar 24 08:51:53 2018 : Error: Failed to add duplicate client localhost
    Sat Mar 24 08:51:53 2018 : Warning: Failed to add client, possible duplicate?
    

    The client (NAS) configuration is done via the database but FreeRADIUS comes with a clients.conf file I believe that defines a NAS entry for localhost. See if you have a client.conf file and comment out the localhost client block then restart FreeRADIUS, it should be happy now.

     
    • Markus Lösch

      Markus Lösch - 2018-03-24

      Hi Mfawa,

      yes, the error message was clear to me :-). But I'm currently not that experienced in configuring/troubleshooting a RADIUS server.

      As I can read from this post (http://freeradius.1045715.n5.nabble.com/Version-3-0-10-has-been-released-td5737024.html), the warnings are OK.
      Now, the FreeRADIUS starts fine.

      Thank you for your great support!

       
  • Markus Lösch

    Markus Lösch - 2018-03-24

    The solution:
    If you have Debian 9 (Stretch) as an OS and installed the freeradius from the official repository, then the FreeRADIUS config is located in /etc/freeradius/3.0.

    Therefore the extracted files/folders (of 'freeradius-3-radiusdesk.tar.gz') should be located in /etc/freeradius/3.0 - and not /etc/freeradius. Only the "dictionary_overrides" folder has to be in /etc/freeradius.

    The directory structure should then look like this:
    /etc/freeradius/3.0
    /etc/freeradius/dictionary_overrides

    Please remember that you set the appropriate owner for the folder /etc/freeradius/3.0

    sudo chown freerad:freerad /etc/freeradius/3.0
    

    After that it's necessary to reload the daemon and to restart the FreeRADIUS.

    Then it's possible to continue as it is suggested in the installation manual.

     

    Last edit: Markus Lösch 2018-03-24

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.