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

    freeradius3 - 0.15.7_9 2020-01-20 : its stops : can't find libmysqlclient.so.20

    Scheduled Pinned Locked Moved pfSense Packages
    13 Posts 3 Posters 1.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.
    • GertjanG
      Gertjan
      last edited by Gertjan

      freeradius3 - 0.15.7_9 - installed this morning 2020-01-20?

      When started using 'radiusd -X' it stops with the text it can't find libmysqlclient.so.20 :

      Could not link driver rlm_sql_mysql: Shared object "libmysqlclient.so.20" not found, required by "rlm_sql_mysql.so"
      Make sure it (and all its dependent libraries!) are in the search path of your system's ld
      /usr/local/etc/raddb/mods-enabled/sql[2]: Instantiation failed for module "sql1"
      

      These libs are available in /usr/local/lib/mysql :

      -rw-r--r--   1 root  wheel  4577404 Jan 14 21:56 libmysqlclient.a
      lrwxr-xr-x   1 root  wheel       20 Jan 14 21:56 libmysqlclient.so -> libmysqlclient.so.20
      -rwxr-xr-x   1 root  wheel  3889360 Jan 14 21:56 libmysqlclient.so.20
      lrwxr-xr-x   1 root  wheel       16 Jan 14 21:56 libmysqlclient_r.a -> libmysqlclient.a
      lrwxr-xr-x   1 root  wheel       17 Jan 14 21:56 libmysqlclient_r.so -> libmysqlclient.so
      lrwxr-xr-x   1 root  wheel       20 Jan 14 21:56 libmysqlclient_r.so.20 -> libmysqlclient.so.20
      drwxr-xr-x   2 root  wheel      512 Jan 17 15:35 plugin
      

      but not in /usr/local/lib/ ...

      I don't know what changed - between version freeradius _9 and _8 ....

      I created these 'links' so there are visible both in /usr/local/lib/ :

      lrwxr-xr-x  1 root  wheel  26 Jan 20 13:24 libmysqlclient.so -> mysql/libmysqlclient.so.20
      lrwxr-xr-x  1 root  wheel  26 Jan 20 13:24 libmysqlclient.so.20 -> mysql/libmysqlclient.so.20
      

      and FreeRadius (radiusd) is happy now.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        Where are you seeing this - are you on a snap, 2.5?

        I don't show _9 available in package manager on 2.4.4p3

        freerad.jpg

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan
          last edited by

          Oh ... oops.
          I'm using 2.4.5 2.4.5.a.20200119.2153, (pre 2.4.5 release) so I receive intermediate package releases non-ready-for-the-public that 2.4.4-p3 doesn't see.

          Anyway.
          I hope m yfeedback is useful for other 2.4.5 pre release testers.
          ( I'll backlink this thread from Home > pfSense® Software > Development )

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            Yeah good idea - or we could just move the thread.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              Does that persist after a reboot? What shows up in the output of ldconfig -r?

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              GertjanG 1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan @jimp
                last edited by

                @jimp said in freeradius3 - 0.15.7_9 2020-01-20 : its stops : can't find libmysqlclient.so.20:

                Does that persist after a reboot?

                Nice catch !

                @jimp said in freeradius3 - 0.15.7_9 2020-01-20 : its stops : can't find libmysqlclient.so.20:

                What shows up in the output of ldconfig -r?

                This :

                [2.4.5-DEVELOPMENT][admin@pfsense.brit-hotel-fumel.net]/root: ldconfig -r
                /var/run/ld-elf.so.hints:
                        search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/freeradius-3.0.20:/usr/local/lib/ipsec:/usr/local/lib/mysql:/usr/local/lib/perl5/5.30/mach/CORE
                        0:-lz.6 => /lib/libz.so.6
                        1:-lssp.0 => /lib/libssp.so.0
                        2:-lbsdxml.4 => /lib/libbsdxml.so.4
                        3:-lgcc_s.1 => /lib/libgcc_s.so.1
                .... snip snip ....
                        247:-lmysqlclient.20 => /usr/local/lib/mysql/libmysqlclient.so.20
                        248:-lmysqlclient_r.20 => /usr/local/lib/mysql/libmysqlclient_r.so.20
                

                It's ok now.
                "Solved !'

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  Is it solved because what you did, or after reboot... I don't recall packages requiring reboot before?

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    It shouldn't require a reboot, but it's possible that when it didn't work, the mysql lib directory wasn't in the ldconfig path when it should have been. A reboot might have made it refresh the paths it needed there. In the output posted last, I see the mysql lib dir in there.

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan
                      last edited by Gertjan

                      Guess not. (edit : replying to @johnpoz )
                      I removed my links I put in myself before rebooting.

                      The "ldconfig -r" shows the correct info now. For me, it looks like the /mysql/ dir is now included into the lib search path.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan
                        last edited by Gertjan

                        The latest "freeradius3 0.15.7_10" and or "2.4.5.a.20200124.0859" solved this.

                        edit : that is : a reboot after a package (FreRadius) or a second reboot after an update to, for example, "2.4.5.a.20200124.0853" is needed.

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

                        1 Reply Last reply Reply Quote 0
                        • GertjanG
                          Gertjan
                          last edited by

                          Up until today, when I upgrade to the latest RC candidate, 2.4.5.r.20200313.0600, FreeRadius 0.15.7_11 will not start because of missing "/usr/local/lib/mysql" libraries.
                          The upgrade process finishes with a reboot.
                          Everything is fine, except that the captive portal - using FreeRadius, stops working.

                          The "GUI" illustrates it nicely :

                          4eb18461-1afd-437a-a0d9-b5bfefb70360-image.png

                          The radusd logs tells me why : missing mysql libs in the lib path. Or, the files ate there ...

                          I have to SSH in, and execute "/etc/rc.d/ldconfig start". Then I can start radiusd with a click in the GUI.

                          I'm pretty sure that when pfSense boots, one of the first things it does, is calling "/etc/rc.d/ldconfig ...." this isn't logged no where and can be seen only on the hooked up VGA screen. It's scrolls fast ....

                          Is the "reboot after upgrade" a special case, and it does need a second reboot ?
                          The mysql lib files are in place before the reboot, and after the reboot, and probably not touched during (most of) the pfSense RC updates. I I tried to understand why an initial ldconfig call doesn't include these libs, but a subsequent call does.

                          Any thoughts ?

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          1 Reply Last reply Reply Quote 0
                          • jimpJ
                            jimp Rebel Alliance Developer Netgate
                            last edited by

                            I've seen a problem like that in the past, but not recently, and not with FreeRADIUS: https://github.com/pfsense/FreeBSD-ports/commit/9a560601981644bfcfcc54d77fe97aee87bcdcde

                            The FreeRADIUS package may need a similar change

                            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                            Need help fast? Netgate Global Support!

                            Do not Chat/PM for help!

                            1 Reply Last reply Reply Quote 0
                            • GertjanG
                              Gertjan
                              last edited by

                              Interesting.
                              Thanks. I'll have something to test this weekend.

                              Still : Am I the only one using the captive portal AND using FreeRadius package to auth and account AND follow the 2.4.4-RC update path ?

                              No "help me" PM's please. Use the forum, the community will thank you.
                              Edit : and where are the logs ??

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