Issues with rlm_cache_memcached in 3.0.7
Hello, I'm trying to get rlm_cache_memcached working, but I'm having some issues with freeradius merging the values from memcached - all my values get truncated. Am I doing it wrong or is this a bug? I've attached the full output of radiusd -X, but I've pasted relevant sections below. Creating the cache entry: (0) eduroam_inner_cache: EXPAND %{User-Name} (0) eduroam_inner_cache: --> asdf@utk.edu rlm_cache (eduroam_inner_cache): Reserved connection (4) (0) eduroam_inner_cache: No cache entry found for "asdf@utk.edu" (0) eduroam_inner_cache: Creating new cache entry (0) eduroam_inner_cache: request:Stripped-User-Name = &Stripped-User-Name -> 'asdf' (0) eduroam_inner_cache: request:Realm = &Realm -> 'utk.edu' (0) eduroam_inner_cache: control:Aruba-User-Role := &Aruba-User-Role -> 'eduroam-student' (0) eduroam_inner_cache: EXPAND Cache last updated at %t (0) eduroam_inner_cache: --> Cache last updated at Mon Apr 13 16:24:23 2015 (0) eduroam_inner_cache: reply:Reply-Message += "Cache last updated at Mon Apr 13 16:24:23 2015" (0) eduroam_inner_cache: Merging cache entry into request (0) eduroam_inner_cache: &control:Aruba-User-Role := 'eduroam-student' (0) eduroam_inner_cache: &request:Stripped-User-Name = 'asdf' (0) eduroam_inner_cache: &request:Realm = 'utk.edu' (0) eduroam_inner_cache: &reply:Reply-Message += 'Cache last updated at Mon Apr 13 16:24:23 2015' (0) eduroam_inner_cache: Commited entry, TTL 14400 seconds rlm_cache (eduroam_inner_cache): Released connection (4) (0) [eduroam_inner_cache] = updated Reading and merging from the cache: (1) update control { (1) &Cache-Read-Only = yes (1) &Cache-Merge = yes (1) } # update control = noop (1) } # else = noop (1) eduroam_inner_cache: EXPAND %{User-Name} (1) eduroam_inner_cache: --> asdf@utk.edu rlm_cache (eduroam_inner_cache): Reserved connection (4) (1) eduroam_inner_cache: Retrieved 223 bytes from memcached (1) eduroam_inner_cache: &Cache-Expires = 1428971063 &Cache-Created = 1428956663 &control:Aruba-User-Role := 'eduroam-student' &Stripped-User-Name = 'asdf' &Realm = 'utk.edu' &reply:Reply-Message += 'Cache last updated at Mon Apr 13 16:24:23 2015' (1) eduroam_inner_cache: Found entry for "asdf@utk.edu" (1) eduroam_inner_cache: Merging cache entry into request (1) eduroam_inner_cache: &control:Aruba-User-Role = '' (1) eduroam_inner_cache: &request:Stripped-User-Name = '' (1) eduroam_inner_cache: &request:Realm = '' (1) eduroam_inner_cache: &reply:Reply-Message = '' rlm_cache (eduroam_inner_cache): Released connection (4) (1) [eduroam_inner_cache] = ok Thanks, Kyle Birkeland kbirkela@utk.edu
On 13 Apr 2015, at 16:59, Kyle Birkeland <kbirkela@utk.edu> wrote:
Hello,
I'm trying to get rlm_cache_memcached working, but I'm having some issues with freeradius merging the values from memcached - all my values get truncated. Am I doing it wrong or is this a bug?
Pushed a fix. Could you try with v3.0.x HEAD. https://github.com/FreeRADIUS/freeradius-server/archive/v3.0.x.zip Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
That did it; thanks! Also, the memcached module fails on './configure' on CentOS 7 due to an undefined reference to `pthread_once'. Excerpt from config.log (full attached): configure:2994: gcc -c -g -O2 conftest.c >&5 configure:2994: $? = 0 configure:2997: result: yes configure:3169: checking for memcached in -lmemcached configure:3183: gcc -o conftest -g -O2 conftest.c -lmemcached >&5 /usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/libmemcached.so: undefined reference to `pthread_once' collect2: error: ld returned 1 exit status configure:3183: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | extern char memcached(); | int | main () | { | memcached() | ; | return 0; | } configure:3190: result: no I worked around it with the following: [root@radiustest ~/freeradius-server]# git diff diff --git a/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure b/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure index 72eede2..4ca8994 100755 --- a/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure +++ b/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure @@ -3124,7 +3124,7 @@ sm_lib_safe=`echo "memcached" | sed 'y%./+-%__p_%'` sm_func_safe=`echo "memcached" | sed 'y%./+-%__p_%'` old_LIBS="$LIBS" -old_CPPFLAGS="$CPPFLAGS" +old_CPPFLAGS="$CPPFLAGS -pthread" smart_lib= smart_ldflags= smart_lib_dir= [root@radiustest ~/freeradius-server]# Just thought you may want to know that. Thanks again, Kyle On Mon, Apr 13, 2015 at 05:18:16PM -0400, Arran Cudbard-Bell wrote:
On 13 Apr 2015, at 16:59, Kyle Birkeland <kbirkela@utk.edu> wrote:
Hello,
I'm trying to get rlm_cache_memcached working, but I'm having some issues with freeradius merging the values from memcached - all my values get truncated. Am I doing it wrong or is this a bug?
Pushed a fix. Could you try with v3.0.x HEAD.
https://github.com/FreeRADIUS/freeradius-server/archive/v3.0.x.zip
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 13 Apr 2015, at 17:35, Kyle Birkeland <kbirkela@utk.edu> wrote:
That did it; thanks!
Also, the memcached module fails on './configure' on CentOS 7 due to an undefined reference to `pthread_once'.
127 configure:2979: checking for libmemcached/memcached.h 128 configure:2994: clang -c -g -O2 conftest.c >&5 129 configure:2994: $? = 0 130 configure:2997: result: yes 131 configure:3168: checking for pthread_once in -lpthread 132 configure:3182: clang -o conftest -g -O2 conftest.c -lpthread >&5 133 configure:3182: $? = 0 134 configure:3185: result: yes 135 configure:3344: checking for memcached in -lmemcached 136 configure:3358: clang -o conftest -g -O2 conftest.c -lmemcached -lpthread >&5 137 configure:3358: $? = 0 Pushed a fix for that too :) -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (2)
-
Arran Cudbard-Bell -
Kyle Birkeland