Just a quick update. I have been able to isolate the issue down to the rlm_sql_mysql module. Something to do with something missing or a bad link to a library somewhere on this box. I've looked through the c code, but didn't see anything obvious. I'll keep plugging away at it. If I figure it out, I will let you know what it was.
I noticed some interesting behaviors, that may be a clue as to what is happening. I was wondering if you have any insight into these.
If I compile freeradius as shared (as oposed to static)...
I attempt to start radiusd -p 1645 -X, freeradius attemts to start but just hangs. This is what I see in the radius.log
Sun Jan 11 14:19:13 2004 : Info: Using deprecated naslist file. Support for this will go away soon.
Sun Jan 11 14:19:13 2004 : Info: Using deprecated clients file. Support for this will go away soon.
Sun Jan 11 14:19:13 2004 : Info: Using deprecated realms file. Support for this will go away soon.
If I then remove the sql directives out of the authorise and accounting sections, then start radiusd -p 1645 -X, free radius starts up fine and answers querys. Life appears good
Now here is the interesting part. On this box I do not have openSSL installed, therefore EAP doesn't build. With the sql directives removed freeradius doesn't raise any errors. However if I insert the sql directives, free radius then seems to care and hangs. Once I comment out the EAP stuff in radiusd.conf, leaving in the sql directives, freeradius will attemt to start given radiusd -p 1645 -X. Freeradius will now try to load all the sql bits, but segfauls when it tries to load the rlm_sql_mysql module.
If I compile freeradius as static, free radius will complain about EAP. Once I comment out the EAP stuff in radiusd.conf, freeradius will attemt to start given radiusd -p 1645 -X, but will complain "rlm_sql: Could not link driver rlm_sql_mysql: file not found" If I remove the sql directives, free radius will start.
I keep having this vision of Bart Simpson writing on the blackboard over and over, "I will not blame freeradius ....."
On the up side, I am getting to more about freeradius than I wanted ;-)
So much for the quick update, will let you know what I find.
Robert Causey iMedia Associates
Alan DeKok wrote:
Robert Causey <[EMAIL PROTECTED]> wrote:
Trying to pear down the variables and hone in on the cause is especially dificult when ld doesn't return any %^&&*$%** errors during compile.
Yes. Originally, FreeRADIUS was even worse. There were *huge* numbers of complaints from people who put MySQL into (e.g.) /opt/testing/march/try2/mysql, and then complained that FreeRADIUS wouldn't compile. We fixed the server to be a little more forgiving, and those complaints went away.
Many of the dynamic linking issues also went away, because of the instructions on how to set up linking specifically for the RADIUS server. But there is still a steady stream of people who have problems.
Strangely, no one has similar problems with PostgreSQL or Oracle. So I think that a large part of the problem really is MySQL. The default MySQL install does NOT install static libraries (other DB's have them), so even building FreeRADIUS statically won't help.
I also encountered a number of contradictions in respect to documentation. So being new to freeradius and not being familiar with the internals, it is hard for me to judge where this error is coming from considering I have 3 other applications complied from scratch on the same box with the same mysql setup and they are working fine.
I would dearly love to know WTF they're doing to make it work. So far, NO ONE who's having these problems has given any feedback as to what's going wrong, or why other programs seem to work.
Subsequent to my post I did determine that in fact *ld* was not linking in mysqlclient. If I compile with shared libs, freeradius segfaults as I described in my previous post,
Which means that something is very wrong with your system. You've got library version conflicts, or something.
however if I compile with static libs, freeradius complains "rlm_sql: Could not link driver rlm_sql_mysql: file not found" (I know 4.14 of the FAQ).
For that last problem, blame "libtool". It doesn't find a static library for MySQL, but it builds rlm_sql_mysql.a anyhow. It *does* print out huge warning messages about what's going wrong, but no one ever reads them...
As for getting it to link dynamically, the instructions in the FAQ and in the comments for the "libdir" configuration entry work for me. Yet every week, there's someone else who posts to the list, complaining that they can't get MySQL to work.
If you think you're frustrated, try dealing with the problem for three years. I have absolutely no idea why it's so difficult to get MySQL to work. The instructions I wrote in the docs work for me, but apparently other people's systems are so magical, that those same instructions don't work for them.
Mind you, part of the problem is likely that I *don't* install 4-5 versions of MySQL and OpenSSL on my systems, and I *do* force MySQL to build static libraries.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html