Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21118

Agent2 web.page.get incorrect data with chunked transfer encoding

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 5.0.23, 6.0.4
    • Agent2 plugin (N)
    • Ubuntu 20.04, zabbix-agent2=5.0.23-1+focal, zabbix-agent2=6.0.4-1+ubuntu20.04, nginx=1.21.3-1~focal

      After migration to zabbix-agent2 we are facing old web.page.get issue, already fixed for zabbix_agentd: ZBX-9892. If chunked transfer encoding is enabled on the webserver, web.page.get gets response with chunk size data.

      Steps to reproduce:

      zabbix_agentd: (works correctly)  

       zabbix_agentd -t 'web.page.get["localhost","ping","8085"]'

      web.page.get["localhost","ping","8085"]       [t|HTTP/1.1 200 OK
      Server: nginx
      Date: Thu, 26 May 2022 16:05:08 GMT
      Content-Type: text/plain;charset=UTF-8
      Transfer-Encoding: chunked
      Connection: keep-alive
      Vary: Accept-Encoding
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Cache-Control: no-cache, no-store, must-revalidate, max-age=0
      Content-Encoding: gzip
      
      pong]

      zabbix_agent2: (does not work correctly)

      zabbix_agent2 -t 'web.page.get["localhost","ping","8085"]'

       

      web.page.get["localhost","ping","8085"]       [s|HTTP/1.1 200 OK
      Connection: close
      Transfer-Encoding: chunked
      Cache-Control: no-cache, no-store, must-revalidate, max-age=0
      Content-Type: text/plain;charset=UTF-8
      Date: Thu, 26 May 2022 16:06:45 GMT
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Server: nginx
      Vary: Accept-Encoding
      4
      pong
      0]
      

       

      After disabling chunked transfer encoding on nginx with chunked_transfer_encoding off; web.page.get works correctly.

      zabbix_agent2 -t 'web.page.get["localhost","ping","8085"]'

      web.page.get["localhost","ping","8085"]       [s|HTTP/1.1 200 OK
      Connection: close
      Cache-Control: no-cache, no-store, must-revalidate, max-age=0
      Content-Type: text/plain;charset=UTF-8
      Date: Thu, 26 May 2022 16:12:10 GMT
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Server: nginx
      Vary: Accept-Encoding
      pong]
      

      You can also test with zabbix.com domain as zabbix_agent2 -t web.page.get[www.zabbix.com]/] .

      This report may also be considered as duplicate of ZBX-20144.

       

       

            rzvejs Rudolfs Zvejs (Inactive)
            kiwwi Lukas Sabla
            Team INT
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: