[Modules] mod_auth_xradius works, but not attempt connection to memcached

Daniel Maher dma at witbe.net
Fri Nov 12 06:25:34 EST 2010


Hello,

I appear to have a functional basic mod_auth_xradius setup (which is 
great, so thanks for that :) ); however, despite numerous compilation / 
configuration attempts the module does NOT attempt to cache the results 
with memcached (it doesn't even open a connection).  A simple telnet 
test to memcached shows that it is running and accepting requests as 
expected.

CentOS 5.5 i386

apr_memcache 0.7.0 compiled and installed as :
$ ./configure && make && sudo make install

mod_auth_xradius 0.4.6 configured as :
$ ./configure --with-apxs=`which apxs` --with-apr-memcache=/usr/lib
    ...
checking for Apache 2.0 version >= 2.0.40... yes
    ...
checking for apr_memcache library in /etc/httpd/lib... no
checking for apr_memcache library in /usr/lib/lib... yes
checking for apr_memcache_create in -lapr_memcache... yes
configure: using '-R/usr/lib/lib -L/usr/lib/lib -lapr_memcache' for memcache
    ...

That looks fine (?).

make fails on finding apr_memcache.h, thus :
(include/mod_auth_xradius.h)
#if HAVE_APR_MEMCACHE
#include "/usr/include/apr_memcache-0/apr_memcache.h"
#endif

$ make && sudo make install

Everything seems to be OK up until this point (i guess).  On to the 
Apache config :
(/etc/httpd/conf.d/xradius.conf)
LoadModule auth_xradius_module modules/mod_auth_xradius.so
AuthXRadiusCache memcache "<server>"
AuthXRadiusCacheTimeout 300
<Location /xrad1>
   AuthName "xrad test 1"
   AuthType Basic
   AuthXRadiusAddServer "<server>:1812" "<secret>"
   AuthXRadiusTimeout 2
   AuthXRadiusRetries 2
   require valid-user
</Location>
<Location /xrad2>
   AuthName "xrad test 2"
   AuthType Basic
   AuthXRadiusAddServer "<server>:1812" "<secret>"
   AuthXRadiusTimeout 2
   AuthXRadiusRetries 2
   require valid-user
</Location>

Apache restarts OK.  When i point a broswer at /xrad1 the standard 
user/pass window pops up.  I can authenticate against it as expected, 
and when i hit /xrad2 no authentication windows pops up, which is also 
as expected.

Unfortunately, the same config on a httpd machine challenges for 
authentication again, which is the first clue that nothing got cached. 
I restarted memcached in a debug console, confirmed that it's working 
via simple telnet test, and then tried the xradius auth again - as i 
noted previously, the request never arrives from xradius.

Any hints on where i should look or how i can get mod_auth_xradius cache 
to memcached (or, at least, even try to ?).

Thank you all !

-- 
Daniel Maher <dma AT witbe DOT net>
"The Internet is completely over." -- Prince


More information about the Modules mailing list