Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Bug on retention module (memcache and redis) ?

  1. #1

    Bug on retention module (memcache and redis) ?

    Hi,

    I tried to enable retention through memcache or redis and I got an error for both.

    With memcache on schedulerd.log
    2011-10-16 17:38:18,743 [1318779498] I correctly loaded the modules : [MemcacheRetention]

    2011-10-16 17:38:18,753 [1318779498] [MemcacheRetention] asking me to load the retention objects

    2011-10-16 17:38:18,753 [1318779498] The instance MemcacheRetention raise an exception Keys must be str()'s, not unicode. Convert your unicode strings using mystring.encode(charset)!. I disable it and set it to restart it later

    2011-10-16 17:38:18,754 [1318779498] Back trace of this remove : Traceback (most recent call last):
    File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 265, in hook_point
    f(self)
    File "/usr/local/lib/python2.6/dist-packages/shinken/modules/memcache_retention_scheduler.py", line 104, in hook_load_retention
    val = self.mc.get(key)
    File "/usr/lib/pymodules/python2.6/memcache.py", line 779, in get
    return self._get('get', key)
    File "/usr/lib/pymodules/python2.6/memcache.py", line 747, in _get
    self.check_key(key)
    File "/usr/lib/pymodules/python2.6/memcache.py", line 931, in check_key
    "Keys must be str()'s, not unicode. Convert your unicode "
    MemcachedStringEncodingError: Keys must be str()'s, not unicode. Convert your unicode strings using mystring.encode(charset)!
    With redis on schedulerd.log
    2011-10-16 17:43:17,545 [1318779797] I correctly loaded the modules : [RedisRetention]

    2011-10-16 17:43:17,551 [1318779797] [RedisRetention] asking me to load the retention objects

    2011-10-16 17:43:17,579 [1318779797] The instance RedisRetention raise an exception 'ascii' codec can't decode byte 0xe9 in position 1675: ordinal not in range(128). I disable it and set it to restart it later

    2011-10-16 17:43:17,580 [1318779797] Back trace of this remove : Traceback (most recent call last):
    File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 265, in hook_point
    f(self)
    File "/usr/local/lib/python2.6/dist-packages/shinken/modules/redis_retention_scheduler.py", line 116, in hook_load_retention
    val = str(unicode(val))
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 1675: ordinal not in range(128)
    My config for memcache is:
    Code:
    #Memcache definition
    define module{
     module_name   MemcacheRetention
     module_type   memcache_retention
     server      127.0.0.1
     port       11211
    }
    Config for redis:
    Code:
    #Now the redisretention module
    define module{
     module_name   RedisRetention
     module_type   redis_retention
     server      127.0.0.1
    }
    My config on my schedulers (here with redis module)
    Code:
    define scheduler{
     scheduler_name scheduler-master
     address     isp-inf-03-vm
     port      7768
     spare      0   ;is not a spare
     realm      All
     weight     1    ;optionnal : 1
     modules     RedisRetention
    }
    
    #The second scheduler, the slave one
    define scheduler{
     scheduler_name scheduler-slave
     address     isp-inf-05-vm
     port      7768
     spare      1    ;is a spare
     realm      All
     weight     1 ;optionnal : 1
     modules     RedisRetention
    }
    Is there a bug or did I something wrong?

    Thank you,
    Gauthier

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Bug on retention module (memcache and redis) ?

    Hi,

    Does one of your host/service got "strange" characters in their names?

    I'll give it a try to see, but I think both are the same "source"
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3

    Re: Bug on retention module (memcache and redis) ?

    Hi,

    I don't know how but yesterday it disappeared after a certain number of reboot of shinken.
    I was modifiying my hosts/services, so it's maybe linked.. But I was quite surprised because the change I did just before were minimalist..

    Gauthier

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Bug on retention module (memcache and redis) ?

    It's strange, because for the memcache, it's the "key", so only names. Redis it can be a output value maybe, so this last one can change.

    I'll try to send "garbage" characters in theses modules
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5

    Re: Bug on retention module (memcache and redis) ?

    Hi,

    Hum that's very strange, the bug is back. Is there a way to see where could be the problem (host/service file or other)?

    Gauthier

  6. #6

    Re: Bug on retention module (memcache and redis) ?

    I isolated the problem and it's still strange..

    For this host:
    Code:
    define host{
     use       generic-host
     host_name    isp-mail-02-vm
     alias      Server SMTP2
     address     1.2.3.4
     hostgroups   isp-servers-data-grp
    }
    
    #define service {
    # use          generic-service-pnp
    # host_name       isp-mail-02-vm
    # service_description  Partition /
    # check_command     check_nrpe_args!check_disk!20%!10%!/dev/xvda2
    #}
    If I uncomment this service, I got the error.

    But for example, on this host which has exactly the same config, there is no error.
    Code:
    define host{
     use       generic-host
     host_name    isp-inf-03-vm
     alias      Server Monitoring1
     address     1.2.3.5
     hostgroups   isp-servers-data-grp
    }
    
    define service {
     use          generic-service-pnp
     host_name       isp-inf-03-vm
     service_description  Partition /
     check_command     check_nrpe_args!check_disk!20%!10%!/dev/xvda2
    }
    I hope it could help to resolve the problem...

    Gauthier

    EDIT: I'm not sure it's really a right way, because I tried to add this config and even if the section witch check_disk is commented, I got the error.
    I tried to comment all the services and just let the host, but I still got the error..

    Code:
    define host{
     use       generic-host
     host_name    isp-mail-01-vm
     alias      ISP Server SMTP1
     address     1.2.3.6
     hostgroups   isp-servers-data-grp
    }
    
    #define service {
    # use          generic-service-pnp
    # host_name       isp-mail-01-vm
    # service_description  Partition /
    # check_command     check_nrpe_args!check_disk!20%!10%!/dev/xvda2
    #}
    
    define service {
     use          generic-service-pnp
     host_name       isp-mail-01-vm
     service_description  SMTP Service
     check_command     check_nrpe!check_smtp
    }
    
    define service {
     use          generic-service-pnp
     host_name       isp-mail-01-vm
     service_description  SMTPS Service
     check_command     check_nrpe!check_smtps
    }
    
    define service {
     use          generic-service
     host_name       isp-mail-01-vm
     service_description  RBL Blacklisting
     check_command     check_bl
    }

  7. #7
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Bug on retention module (memcache and redis) ?

    What is the output of this host check? :
    No direct support by personal message. Please open a thread so everyone can see the solution

  8. #8

    Re: Bug on retention module (memcache and redis) ?

    The output of the host check is:
    rta=3.756000ms;3000.000000;5000.000000;0.000000 pl=0%;20;50;0
    And the output of the service check_disk is:
    DISK OK - free space: / 8833 MB (92% inode=96%);

  9. #9
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Bug on retention module (memcache and redis) ?

    Looks more as perfdata than output for the host. Strange. :
    No direct support by personal message. Please open a thread so everyone can see the solution

  10. #10

    Re: Bug on retention module (memcache and redis) ?

    Is there a way to do a verbose debug?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •