Monit 5.16 regression - cannot parse response

Issue #327 resolved
Anonymous created an issue

Operating System: CentOS 6 Monit version: 5.16

Error details:

# monit monitor all
cannot parse response

... and the action fails.

I suspect that this is due to the changes in src/util.c between 5.15 and 5.16.

Comments (10)

  1. Tildeslash repo owner

    We're not able to reproduce the issue. Please can you check the monit version of the active monit daemon?:

    monit status | head -1
    

    and the monit CLI:

    monit -V
    

    If the daemon is not 5.16, please restart monit.

  2. Lin Song

    Thanks for the quick response!

    # monit status | head -1
    The Monit daemon 5.16 uptime: 1d 0h 0m
    
    # monit -V
    This is Monit version 5.16
    Copyright (C) 2001-2015 Tildeslash Ltd. All Rights Reserved.
    

    Operating system is CentOS 6.7. Note: This bug does NOT occur on Ubuntu or Debian.
    I double checked and Monit 5.15 also has this bug. Monit 5.14 works fine.

  3. Tildeslash repo owner

    Not reproducible and more important this does not look like Monit 5.16. The copyright should be 2001-2016 and there should be a Built with .. line, like so

    # monit --version
    This is Monit version 5.16
    Built with ssl, with pam and with large files
    Copyright (C) 2001-2016 Tildeslash Ltd. All Rights Reserved.
    

    Please investigate how and where you got this version and try the official version from https://mmonit.com/monit/#download

  4. Lin Song

    Pardon my laziness - I am indeed using the official version of Monit 5.16. Because I reverted to 5.14 I just copied the output and changed the version number.

    Now I will try to reproduce the error again and reply shortly.

  5. Lin Song

    OK I managed to reproduce this again and looked into it a bit more. Here's what I observed:

    When I have more than 55 items in my monitrc (including Processes, Files, Directories, etc.), the monit monitor all command would generate error cannot parse response. If I delete some items so that the total number of items monitored is less than 54, the command no longer returns any error.

    This behavior has been observed on CentOS 6.7. Not sure about Ubuntu/Debian now.

  6. Lin Song

    Here's more info for debugging:

    # monit -vv monitor all
    ... ...
    -------------------------------------------------------------------------------
    cannot parse response
    -------------------------------------------------------------------------------
        monit() [0x41dd73]
        monit(LogError+0x9f) [0x41e4ff]
        monit(control_service_daemon+0x2d4) [0x419a84]
        monit(main+0x265) [0x417495]
        /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f9008b60d5d]
        monit() [0x40bed9]
    -------------------------------------------------------------------------------
    
  7. Tildeslash repo owner

    Fix Issue #327 : The monit CLI action or M/Monit action for group of services larger then ~50 may fail.

    The request content-length was limited to 1kB, where the action contains list of services. The limit was present in monit <= 5.14 too, but monit CLI passed action for each service in separate request, thus "monit monitor all" with 50 services did 50 HTTP requests. Monit >= 5.15 uses one request with list of services similarly to M/Monit, which did hit the 1kB limit when there were ca. more then 50 services (the count depends on total of service names length).

    The request limit is now driven by the "set limits" statement's httpContentBuffer option (by default 1MB).

    → <<cset 85e96097bc77>>

  8. Log in to comment