#442 undefined symbol: memcached_servers_reset

trunk
closed-accepted
modules (454)
5
2011-11-04
2011-11-01
Ryan Bullock
No

When attempting to load cachedb_memcached.so I receive the following error:

Nov 1 12:19:03 [17158] ERROR:core:sr_load_module: could not open module </usr/local/lib64/opensips/modules/cachedb_memcached.so>: /usr/local/lib64/opensips/modules/cachedb_memcached.so: undefined symbol: memcached_servers_reset

Opensips information:
version: opensips 1.8.0-dev0-notls (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: 2:8517M
@(#) $Id: main.c 8506 2011-10-21 10:21:10Z vladut-paiu $
main.c compiled on 12:03:20 Nov 1 2011 with gcc 4.4.5

System information:
Scientific Linux 6.1
2.6.32-131.17.1.el6.x86_64 #1 SMP Wed Oct 5 17:19:54 CDT 2011 x86_64 x86_64 x86_64 GNU/Linux
libmemcached-devel-0.31-1.1.el6.x86_64
libmemcached-0.31-1.1.el6.x86_64

Discussion

    • assigned_to: nobody --> vladut-paiu
    • status: open --> open-accepted
     
  • Hello Ryan,

    Seem you are using quite an old version of libmemcached. If you upgrade it, I think the problem will dissapear. I am currently using 0.40 and I do not get this error message.

    Still, I will try to see if there is a work-around for this in older libmemcached versions.

    Regards,
    Vlad
    Vlad

     
  • Ryan Bullock
    Ryan Bullock
    2011-11-02

    Thanks for the response. I was just testing going from 1.7 to trunk and started receiving that error.

    That is the current version that is shipping with SL6 and RHEL6, so it may unfortunately be around for awhile.

    Could this be turned into a more informative error (e.g you need version >= 0.4)? Or perhaps one at compile time?

    Looks like I will be building myself an updated libmemcached.

    Thanks again.

     
  • Hello,

    On second thought, I do not think that calling memcached_servers_reset si absolutely needed there.
    I have just committed a fix for this on trunk. Can you please check out and let me know if everything is ok now ?

    Regards,
    Vlad

     
  • Ryan Bullock
    Ryan Bullock
    2011-11-03

    No longer get the undefined symbol with the latest head. However it doesn't seem to like parsing my configuration options.

    modparam("cachedb_memcached","cachedb_url","memcached:cache1://10.100.100.21")

    ERROR:core:new_cachedb_id: error while parsing database URL: 'memcached:cache1://10.100.100.21'
    ERROR:core:cachedb_do_init: cannot parse url [memcached:cache1://10.100.100.21]

    According to the doc it should be right?

     
  • Hello,

    Seems there was a typo in the docs. The proper URL should be :

    modparam("cachedb_memcached","cachedb_url","memcached:cache1://10.100.100.21/")

    , notice the extra / at the end of the url.

    I will update the docs about this.

    Regards,
    Vlad

     
  • Ryan Bullock
    Ryan Bullock
    2011-11-04

    Seems to be working fine now. Tested storing and fetching from a pool of memcached servers with no problems.

    As a note, I had to include the port number in the dburl (11211, which should be the default?).

    modparam("cachedb_memcached","cachedb_url","memcached:cache1://10.100.100.21:11211,10.100.100.22:11211/")

    Thanks for the help.

     
  • Ryan Bullock
    Ryan Bullock
    2011-11-04

    • status: open-accepted --> closed-accepted