Complete Newb to FreeRadius here. I have: radiusd -v radiusd: FreeRADIUS Version 2.1.5, for host x86_64-unknown-linux-gnu, built on Apr 1 2009 at 15:51:57 built from freeradius-server-2.1.4.tar.gz on an OpenSuSE 10.X server using postgresql 8.3.3 Authorize works well, all my NAS info is in the NAS table, and I have dial up clients using now on a very limited basis. My problem is that I can not get the accounting to work in postgres, my radacct table is empty. Everything I have read has said to put sql in the accounting section and I have done this. I also uncommented the section: $INCLUDE sql/${database}/dialup.conf At the end of the log file I have this: radiusd: #### Instantiating modules #### instantiate { Module: Linked to module rlm_exec Module: Instantiating exec exec { wait = no input_pairs = "request" shell_escape = yes } Module: Linked to module rlm_expr Module: Instantiating expr /usr/local/etc/raddb/modules/counter[71]: Failed to link to module 'rlm_counter': rlm_counter.so: cannot open shared object file: No such file or directory Errors initializing modules I "assume" this is my problem? I did a find for rlm_counter.so and, guess what, it was not found. I then looked for just rlm_counter and it was found in freeradius-server-2.1.4/src/modules/rlm_counter from the tarball. I did read a list post from back in October of 2002 that talked about libtool not working well on SuSE, not sure if this is still the case. Any pointers? Am I going down the wrong road? Is there anything else that is glaringly missing? Any other relevant info I need to add here to aid in getting help? Thanks for any help. -- JohnM
Ivan Kalik wrote:
'rlm_counter': rlm_counter.so: cannot open shared object file: No such file or directory
This is in the FAQ. Fix your linker PATH.
Ivan Kalik Kalik Informatika ISP
OK I read the section that says: "Could not link ... file not found", what do I do? and I have in ld.so.conf the paths to the SQL libs in /usr/local/pgsql I also have the normal /usr/local/lib and /usr/local/lib64 Also the sql module is loading as evidenced by the fact that the users are authorizing against the postgresql DB. I know I must be missing something simple but I do not know what. What libs am I looking for for the rlm_counter to build if not the postgresql libs? I even did an export of the postgresql libs reran configure and make found this in the make output: Making all in rlm_sqlcounter... gmake[6]: Entering directory `/home/jmillican/installs/freeradius-server-2.1.4/src/modules/rlm_sqlcounter' for x in .libs/* rlm_sqlcounter.la; do \ rm -rf /home/jmillican/installs/freeradius-server-2.1.4/src/modules/lib/$x; \ ln -s /home/jmillican/installs/freeradius-server-2.1.4/src/modules/rlm_sqlcounter/$x /home/jmillican/installs/freeradius-server-2.1.4/src/modules/lib/$x; \ done gmake[6]: Leaving directory `/home/jmillican/installs/freeradius-server-2.1.4/src/modules/rlm_sqlcounter' then from make install: gmake[6]: Entering directory `/home/jmillican/installs/freeradius-server-2.1.4/src/modules/rlm_sqlcounter' if [ "xrlm_sqlcounter" != "x" ]; then \ /home/jmillican/installs/freeradius-server-2.1.4/libtool --mode=install /home/jmillican/installs/freeradius-server-2.1.4/install-sh -c -c \ rlm_sqlcounter.la /usr/local/lib/rlm_sqlcounter.la || exit $?; \ rm -f /usr/local/lib/rlm_sqlcounter-2.1.5.la; \ ln -s rlm_sqlcounter.la /usr/local/lib/rlm_sqlcounter-2.1.5.la || exit $?; \ fi libtool: install: warning: relinking `rlm_sqlcounter.la' (cd /home/jmillican/installs/freeradius-server-2.1.4/src/modules/rlm_sqlcounter; /bin/sh /home/jmillican/installs/freeradius-server-2.1.4/libtool --mode=relink gcc -release 2.1.5 -module -export-dynamic -o rlm_sqlcounter.la -rpath /usr/local/lib rlm_sqlcounter.lo rlm_sqlcounter.c /home/jmillican/installs/freeradius-server-2.1.4/src/lib/libfreeradius-radius.la -lnsl -lresolv -lpthread ) gcc -shared .libs/rlm_sqlcounter.o -L/usr/local/lib -lfreeradius-radius -lnsl -lresolv -lpthread -Wl,-soname -Wl,rlm_sqlcounter-2.1.5.so -o .libs/rlm_sqlcounter-2.1.5.so /home/jmillican/installs/freeradius-server-2.1.4/install-sh -c -c .libs/rlm_sqlcounter-2.1.5.soT /usr/local/lib/rlm_sqlcounter-2.1.5.so (cd /usr/local/lib && { ln -s -f rlm_sqlcounter-2.1.5.so rlm_sqlcounter.so || { rm -f rlm_sqlcounter.so && ln -s rlm_sqlcounter-2.1.5.so rlm_sqlcounter.so; }; }) /home/jmillican/installs/freeradius-server-2.1.4/install-sh -c -c .libs/rlm_sqlcounter.lai /usr/local/lib/rlm_sqlcounter.la /home/jmillican/installs/freeradius-server-2.1.4/install-sh -c -c .libs/rlm_sqlcounter.a /usr/local/lib/rlm_sqlcounter.a chmod 644 /usr/local/lib/rlm_sqlcounter.a ranlib /usr/local/lib/rlm_sqlcounter.a PATH="$PATH:/sbin" ldconfig -n /usr/local/lib ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- gmake[6]: Leaving directory `/home/jmillican/installs/freeradius-server-2.1.4/src/modules/rlm_sqlcounter' Could it be that radiusd is looking for rlm_counter.so while what I actualy have is rlm_sqlcounter.so If this is the case is it due to a config error on my part? -- JohnM
John Millican wrote:
"Could not link ... file not found", what do I do? and I have in ld.so.conf the paths to the SQL libs in /usr/local/pgsql I also have the normal /usr/local/lib and /usr/local/lib64
No. The entry in the FAQ is an *EXAMPLE*. If it can't find a module... ANY module, not JUST the SQL module... it's because the libraries for that module can't be found. This usually happens when: 1) you build on one server, and copy the rlm_* to another server, but *don't* install the libraries needed by the rlm_* modules. 2) you ignored the output of "configure" and "make", and try to configure a module that needs a library... when that library isn't on your system. This looks like case (2). The rlm_counter module needs some things (these are printed out at the "configure" stage). They haven't been found, so the rlm_counter module wasn't built. Even though the module doesn't exist, you're trying to make the server use it. Install the dependencies needed by rlm_counter, and it will be created during the "make" process. Alan DeKok.
Could it be that radiusd is looking for rlm_counter.so while what I actualy have is rlm_sqlcounter.so If this is the case is it due to a config error on my part?
Rlm_counter and rlm_sqlcounter are different modules. If you are not using counter module remove it from the configuration (I think daily is enabled in default configuration). Check instantiate (radiusd.conf) and authorize and accounting sections in virtual servers. Ivan Kalik Kalik Informatika ISP
participants (3)
-
Alan DeKok -
Ivan Kalik -
John Millican