-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Environment:
- Zabbix server 8.0.0rc3 (revision 090f06dc325), packages 2:8.0.0~rc3-1+debian13
- Debian 13 (trixie), amd64
- PostgreSQL 15.19 (pgdg13) + TimescaleDB 2.28.3
- Database encoding UTF8, collation en_US.UTF-8
- Upgraded from 7.2.15 (DB upgrade completed successfully)
Steps to reproduce:
1. Have an HTTP agent master item returning a JSON device list (UniFi Network API, stat/device-basic).
2. Dependent LLD rule with LLD macro {#NAME} = $.name and a host prototype "Unifi UAP {#NAME}" (same value for technical and visible name).
3. Let the discovered value for {#NAME} contain Czech diacritics, e.g. "Přízemí" (later "Prizemi").
4. Run the master item (Execute now).
Expected result:
Host is created, or – if the technical host name is invalid because of non-ASCII characters – the LLD rule shows a readable error such as "Cannot create host: invalid host name".
Actual result:
- No host is created.
- Server log shows a failed SQL query; the byte after the first byte of the UTF-8 sequence is a single quote, i.e. the string was cut in the middle of a multibyte character before being put into the SQL statement:
[Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: invalid byte sequence for encoding "UTF8": 0xc5 0x27 (name "Přízemí", 0xC5 = first byte of "ř")
[Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: invalid byte sequence for encoding "UTF8": 0xc3 0x27 (name "Prizemí", 0xC3 = first byte of "í")
- The LLD rule state/error is not updated at all and keeps an old, unrelated error message ("Cannot perform request: Connection timed out..."), so the user gets no hint in the frontend.
- After renaming the device to ASCII only ("Prizemi") the host is created correctly.
Notes:
It looks like some string derived from the discovered name (host name or LLD error message) is truncated by bytes rather than by UTF-8 characters before the DB insert/update.