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

sender.pl fragments header, so it's not robust enough to communicate with zabbix processes


      We have a script for troubleshooting in misc/debug folder (in SVN only).
      If for example use it (for integration with 3rd applications etc) to get queue on a zabbix server you will see that in command line in random cases a result returned is empty or looks like a line wrap.

      If turn on debug log for trappers and capture traffic by wiresharc it get's clear that a ZBXDx01XXXXXXXX header for request is fragmented and on edge cases it became a problem.
      For example after 2 PSH packets received from the script (ZBXBx01 and x65) - zabbix trapper closes connections by sending FIN packet.
      In debug log we can see:

        8207:20151211:105204.701 trapper #1 [processing data]
        8207:20151211:105204.703 trapper #1 [processed data in 0.001576 sec, waiting for connection]

      But sometimes the header is split to 5 PSH packets (data in 6th PSH packet) and it was successfully
      proceed by zabbix trapper.

      I guess we should improve the script to perform only one push after constructing the header.

      Queue protocol is here http://zabbix.org/wiki/Docs/protocols/queue/2.2

      Debug log of a successful request:

        8207:20151211:105205.665 trapper #1 [processing data]
        8207:20151211:105205.667 trapper got '{
          "request": "queue.get",
          "sid": "b5a5f54c05a066a02cefc71cf0f3543f",
          "type": "overview"
        8207:20151211:105205.667 In recv_getqueue()
        8207:20151211:105205.667 query [txnlev:0] [select null from users u,sessions s where u.userid=s.userid and s.status=0 and s.sessionid='b5a5f54c05a066a02cefc71cf0f3543f' and u.type>=
        8207:20151211:105205.667 recv_getqueue() json.buffer:'{"response":"success","data":[{"itemtype":5,"delay5":0,"delay10":0,"delay30":0,"delay60":0,"delay300":0,"delay600":32}]}'
        8207:20151211:105205.667 End of recv_getqueue()
        8207:20151211:105205.667 trapper #1 [processed data in 0.002147 sec, waiting for connection]

      Mentioned 2 session captures can be seen on a screenshot.

            Unassigned Unassigned
            zalex_ua Oleksii Zagorskyi
            0 Vote for this issue
            3 Start watching this issue