Active proxy configuration sync truncates httptest.name to 64 characters in Zabbix 7.0.x

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.27
    • Component/s: Frontend (F), Proxy (P)
    • None

      Bug Summary

      In Zabbix 7.0.27 & earlier version (7.0.x) on RPM-based installations, web scenario names longer than 64 characters are accepted in the frontend and stored correctly in the server database, but during active proxy configuration sync the proxy receives an httptest.name value truncated to 64 characters. This causes proxy-side updates to fail with a duplicate key violation on the (hostid, name) unique constraint.

      Impact

      • Server UI allows creating and updating long web scenario names.
      • Server database schema and frontend validation were updated to support longer values.
      • Proxy configuration sync still sends a truncated httptest.name.
      • Proxy DB update fails and the proxy cannot process the received configuration data.
      • This breaks active proxy synchronization for web scenarios with long names.

      Evidence

      Proxy debug log shows the server sending truncated values during sync:

       
      text
      In proxyconfig_update_rows() 'httptest'update httptest set name='https://example.com/this-is-a-very-long-url-name-that' where httptestid=3;update httptest set name='https://example.com/this-is-a-very-long-url-name-that' where httptestid=4;
        5122:20260629:194000.270 cannot process received configuration data from server at "192.168.56.138": cannot update rows in table "httptest"
        5122:20260629:194010.311 received configuration data from server at "192.168.56.138", datalen 29869
        5122:20260629:194010.343 [Z3008] query failed due to primary key constraint: [0] PGRES_FATAL_ERROR:ERROR:  duplicate key value violates unique constraint "httptest_2"
      DETAIL:  Key (hostid, name)=(10683, https://example.com/this-is-a-very-long-url-name-that-contains-m) already exists.

        5122:20260629:194010.344 cannot process received configuration data from server at "192.168.56.138": cannot update rows in table "httptest"

      What was checked

      • httptest.name and httpstep.name columns were increased to varchar(1024) in both server and proxy databases.
      • schema.inc.php was updated to 1024.
      • configuration.httpconf.edit.php already uses DB::getFieldLength('httptest', 'name').
      • app/views/webscenario.step.edit.php already uses DB::getFieldLength('httpstep', 'name').
      • configuration.httpconf.edit.js.php contains no truncation logic.
      • CHttpTestManager.php also appears to use schema-driven lengths and does not show a hardcoded 64-character UI limit.

      Expected Behavior

      When web scenario names longer than 64 characters are configured on the server, active proxies should receive and apply the full name without truncation, and configuration sync should succeed.

      Actual Behavior

      The proxy receives a truncated httptest.name value of 64 characters, causing duplicate key failures during proxy config sync.

      Suggested Report Title

      Active proxy configuration sync truncates httptest.name to 64 characters in Zabbix 7.0.27 or earlier versions

      Suggested Reproduction Steps

      1. Use Zabbix 7.0.27 with active proxy mode.
      1. Configure a web scenario name longer than 64 characters.
      1. Confirm the server database stores the full value.
      1. Trigger proxy configuration sync.
      1. Observe proxy log showing truncated httptest.name and duplicate key failure.

      Notes for Triage

      This does not appear to be a frontend form limit. The UI and schema changes already allow long values. The failure occurs in the server-to-proxy configuration sync path, which likely still uses an internal fixed-length handling for httptest.name.

      Steps to reproduce:

      1. Changes in configuration...
      2. Navigate to screen title...
      3. Click on screen element...
      4. ...

      Result:
      See screenshot...
      See log file...
      See memory dump...
      Expected:
      See screenshot....
      See attached patch file...


      Server's Database

      Proxy's Database

      Log files (full debug) is attached

        1. image-2026-06-29-19-19-28-330.png
          26 kB
          Saumyajit Pramanik
        2. image-2026-06-29-19-19-36-141.png
          26 kB
          Saumyajit Pramanik
        3. image-2026-06-29-19-20-12-846.png
          21 kB
          Saumyajit Pramanik
        4. image-2026-06-29-19-21-08-046.png
          19 kB
          Saumyajit Pramanik
        5. zabbix_proxy_sected.log
          1.23 MB
          Saumyajit Pramanik

            Assignee:
            Unassigned
            Reporter:
            Saumyajit Pramanik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: