Ad Widget

Collapse

zabbix_proxy: Vmware XML Parsing issue.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gleepwurp
    Senior Member
    • Mar 2014
    • 119

    #1

    zabbix_proxy: Vmware XML Parsing issue.

    Hi Folks,

    I've got an issue with Zabbix Proxy 2.4.4 that started a couple of days ago. I believe that the vCenter XML downloaded by the proxy to do VMWare monitoring has gotten too big, and I'm starting getting the following error message in the Zabbix Proxy log:

    Code:
    noname.xml:7: parser error : Excessive depth in document: 256 use XML_PARSE_HUGE option
    285dd4c75d</uuid><contentId>048d0b67135f856287a02ac32b569a4b</contentId><parent>
                                                                                   ^
    noname.xml:7: parser error : Extra content at the end of the document
    285dd4c75d</uuid><contentId>048d0b67135f856287a02ac32b569a4b</contentId><parent>
                                                                                   ^
    noname.xml:7: parser error : Excessive depth in document: 256 use XML_PARSE_HUGE option
    285dd4c75d</uuid><contentId>048d0b67135f856287a02ac32b569a4b</contentId><parent>
                                                                                   ^
    noname.xml:7: parser error : Extra content at the end of the document
    285dd4c75d</uuid><contentId>048d0b67135f856287a02ac32b569a4b</contentId><parent>
                                                                                   ^
    Can someone point me where to look in the Zabbix code to see where I might add this "XML_PARSE_HUGE" option?

    I've looked at what I thought would be the place for it, in either "proxy.c" or "vmware.c", but there's nothing really indicative that tells me this is where the option should be coded, and I'm wondering if I'm even looking in the right place.

    If anyone has a clue as where I should look, please let me know!

    Thanks!

    Gleepwurp.
  • gleepwurp
    Senior Member
    • Mar 2014
    • 119

    #2
    Ok, I think it could be in "vmware;c" file, around "zbx_xml_read_value" function...

    If anyone has ever encountered the same issue before, please let me know.

    In the meantime, I'm looking at the code.

    G.

    Comment

    • gleepwurp
      Senior Member
      • Mar 2014
      • 119

      #3
      Ok,

      so far so good...

      I've modified vmware.c and modified the 6 calls to functions xmlReadMemory to include the XML_PARSE_HUGE option:

      from:
      Code:
      xmlReadMemory(page.data, page.offset, ZBX_VM_NONAME_XML, NULL, 0)
      to:
      Code:
      xmlReadMemory(page.data, page.offset, ZBX_VM_NONAME_XML, NULL, XML_PARSE_HUGE)
      I recompiled and replaced the zabbix_proxy_mysql binary and so far this is working.

      Will keep you posted on any changes after the weekend.

      Gleepwurp.

      Comment

      • gleepwurp
        Senior Member
        • Mar 2014
        • 119

        #4
        FYI,

        the new option "XML_PARSE_HUGE" seems to be working ok, after one week in the field... I didn't get any further issues with the large XML for the proxies that were patched, and VMware monitoring kept on running ok.

        I'll deploy to the rest of my environment, will report back if any issues are encountered.

        G.

        Comment

        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #5
          This issue will be fixed in ZBX-10366:

          Comment

          • gleepwurp
            Senior Member
            • Mar 2014
            • 119

            #6
            Thanks Dimir!

            G.

            Comment

            Working...