Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Workaround for freeradius2 failing to start on reboot with PFSense 2.2 nanobsd.

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 3 Posters 4.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bfeitell
      last edited by

      When freeradius2 is installed on nanobsd.

      The cause seems to be the ephemeral nature of files in /var, which on nanobsd exists as a ramdisk.

      The freeradius2 package requires the following directories:

      /var/log/radaact
      /var/log/radacct/datacounter
      /var/log/radacct/timecounter

      My workaround is to install the shellcmd package and add the following two earlyshellcmd entries:

      mkdir -p /var/log/radacct/datacounter
      mkdir -p /var/log/radacct/timecounter

      The -p flag tells mkdir to create the intermediate /var/log/radacct directory as well, if it is missing.

      I am using this solution with PFSense 2.2.2-RELEASE (i386) nanobsd, and freeradius2 2.2.6_3 pkg v1.6.11.

      This workaround should be built into the startup script for the package.

      I hope this helps someone.

      Cheers,
      Bennett

      KEY WORDS: freeradius2 freeradius radius nanobsd start restart boot reboot fail fails failure

      1 Reply Last reply Reply Quote 0
      • O
        oke
        last edited by

        Thanks for your workaround. In my case it did not work immediately for a regular install (not NanoBSD) with memory file system for /tmp and /var. The radius daemon won't start up at (re)boot. However, I was triggered by your install of package Shellcmd.

        What worked for me is the following addition to your workaround. Add in Services->Shellcmd->Settings the following shellcmd entry:

        service radiusd.sh restart
        

        It is not nice but doesn't hurt either and is clearly a workaround to a bug in pfsense/freeradius, which was first introduced in my system after upgrading form 2.2 (my first installed pfsense release) to 2.2.1 and still present in 2.2.2 before this workaround  :).

        1 Reply Last reply Reply Quote 0
        • G
          Grogorio
          last edited by

          this worked for me as well in conjunction with Watchdog package as discussed at https://forum.pfsense.org/index.php?topic=87441.30

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.