-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
6.0.40
-
None
-
S25-W22/23, S25-W24/25, S25-W26/27
Description:
Zabbix Proxy incorrectly truncates long ODBC error messages in UTF-8 encoding, replacing valid multibyte sequences (e.g., 0xD0 0xB8 = "и") with corrupted bytes (0xD0 0x5D = "Ð]").
Affected Version:
Zabbix Proxy 6.0.40
Environment:
PostgreSQL 14.0
PG encoding UTF8
Oracle driver with env NLS_LANG=RUSSIAN_RUSSIA.AL32UTF8
Steps to Reproduce:
Trigger an Oracle ODBC error with Cyrillic text:
Logs proxy:
578107:20250604:234910.529 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: invalid byte sequence for encoding "UTF8": 0xd0 0x5d [insert into task_result (taskid,status,parent_taskid,info) values (11833,-1,89852,'Cannot connect to ODBC DSN: [SQL_ERROR]:[08004][1033][[unixODBC][Oracle][ODBC][Ora]ORA-01033: сейчас идет либо запуск, либо останов ORACLE ИдентÐ]'); ]
3083677:20250603:214033.185 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: invalid byte sequence for encoding "UTF8": 0xd0 0x5d [insert into proxy_history (itemid,clock,ns,value,state,write_clock) values (20862442,1748976032,456252825,'Cannot connect to ODBC DSN: [SQL_ERROR]:[08004][1033][[unixODBC][Oracle][ODBC][Ora]ORA-01033: сейчас идет либо запуск, либо останов ORACLE ИдентÐ]',1,1748976033),(20960852,1748976032,672682810,'Cannot find information for this network interface in /proc/net/dev.',1,1748976033),(20960792,1748976032,673484461,'Cannot find information for this network interface in /proc/net/dev.',1 ,1748976033),(20313452,1748976032,692409105,'Invalid second parameter.',1,1748976033),(16013912,1748976032,692514484,'Invalid second parameter.',1,1748976033),(15357005,1748976032,730911682,'Value "-50063" of type "string" is not suitable for value type "Numeric (unsigned)"',1,1748976033),(20949092,1748976032,874192278,'Cannot find information for this network interface in /proc/net/dev.',1,1748976033); ]
Original answer (from isql -v):
[root@xxx ~]# isql yyy -vv [08004][unixODBC][Oracle][ODBC][Ora]ORA-01033: сейчас идет либо запуск, либо останов ORACLE Идентификатор процесса: 0 Идентификатор сеанса: 0 Порядковый номер: 0
Corrupted Message in Proxy:
ИдентÐ]
Root Cause:
Proxy truncates strings mid-UTF-8 sequence:
- Original: Идентификатор → UTF-8 bytes: ... 0xD0 0xB8 ... ("и")
- After truncation: Идент + leftover 0xD0
- Proxy appends 0x5D (]), creating invalid 0xD0 0x5D.