Ad Widget

Collapse

Zabbix using illegal cookies?!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spanky85
    Junior Member
    • Apr 2011
    • 3

    #1

    Zabbix using illegal cookies?!

    Hi, I've noticed something quite strange. I'm running Ubuntu 10.10, with Zabbix 1.8.2. I also have sabnzbd installed. If I go to the web interface of sabnzbd whilst I have Zabbix open in another tab, looking at any of the pages in 'configuration', I get this error:

    Code:
    500 Internal Server Error
    
    The server encountered an unexpected condition which prevented it from fulfilling the request.
    
    Traceback (most recent call last):
      File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 593, in respond
        self.process_headers()
      File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 661, in process_headers
        self.cookie.load(value)
      File "/usr/lib/python2.6/Cookie.py", line 627, in load
        self.__ParseString(rawdata)
      File "/usr/lib/python2.6/Cookie.py", line 660, in __ParseString
        self.__set(K, rval, cval)
      File "/usr/lib/python2.6/Cookie.py", line 580, in __set
        M.set(key, real_value, coded_value)
      File "/usr/lib/python2.6/Cookie.py", line 455, in set
        raise CookieError("Illegal key value: %s" % key)
    CookieError: Illegal key value: cb_/zabbix/hostgroups.php_parts
    In this case I was looking at the host groups page, and I see "cb_/zabbix/hostgroups.php_parts" at the bottom. If I'm on the items page, that hostgroups is replaced by 'items'. If I go back to the Zabbix dashboard and reload the sabnzbd page, it loads fine.

    Is this a problem with sabnzbd, or with Zabbix? I presume it's Zabbix setting cookies incorrectly. What can I do about this?
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    The error is not that you have an "illegal cookie" it's that you don't have a key in the hash/array you sabnzbd is looking at. First thing to consider is have you configured sabnzbd correctly. Second can sabnzbd understand how Zabbix requires an authorization cookie first before you can do anything else.

    Beyond that I can't help you much as this is the first time I have ever heard of sabnzb.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • spanky85
      Junior Member
      • Apr 2011
      • 3

      #3
      Ok, I guess it's probably a problem on sabnzbd's end then, I'll ask about it in their forums.

      Comment

      • spanky85
        Junior Member
        • Apr 2011
        • 3

        #4
        Turns out it's a problem in both Zabbix and sabnzbd; looks like there's a cookie naming conflict caused by both assuming they're the only running service. If I use the hostname for one and the IP for the other, they work fine!

        Here's the relevant thread on the sabnzbd forum:
        https://forums.sabnzbd.org/index.php?topic=6980.0

        Comment

        • nelsonab
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2006
          • 1233

          #5
          Zabbix does not assume it is the only service running. This is because Zabbix works very well in a virtual hosted environment. It is even possible to run two different zabbix environments (zabbix1.example.com, zabbix2.example.com) on the same Apache server.

          The cookie however I do not think has anything in it making it unique to the domain it's running on, but rather follows a consistent format across all Zabbix servers.
          RHCE, author of zbxapi
          Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
          Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

          Comment

          Working...