[ZBX-6798] Unreadable errors from UnixODBC library for Database Monitor items Created: 2013 Jul 16  Updated: 2017 May 30  Resolved: 2013 Jul 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.0.7rc1, 2.2.0
Fix Version/s: 2.0.8rc1, 2.1.2

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: odbc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

Sometimes unixodbc returns unreadable errors:

7890:20130715:234714.093 Cannot execute ODBC query: (1427).
7863:20130715:234714.103 Cannot execute ODBC query: 7 (1756).
7890:20130715:234715.644 Cannot execute ODBC query: 7 (1756).
7873:20130715:234715.662 Cannot execute ODBC query: 7 (1756).
7873:20130715:234717.036 Cannot execute ODBC query: ? (904).
7889:20130715:234717.394 Cannot execute ODBC query: 7 (1756).
7877:20130715:234717.493 Cannot execute ODBC query: 7 (1756).
7860:20130715:234718.812 Cannot execute ODBC query: 7 (1756).
7855:20130715:234719.906 Cannot execute ODBC query: 7 (1756).
7877:20130715:234720.510 Cannot execute ODBC query: 7 (1756).
7890:20130715:234723.460 Cannot execute ODBC query: ลก (1427).
7882:20130715:234744.222 Cannot execute ODBC query: 7 (1756).
7857:20130715:234744.794 Cannot execute ODBC query: 7 (1756).
7855:20130715:234744.857 Cannot execute ODBC query: 7 (1756).

Zabbix does not log an information which can help to determine item, hosts...



 Comments   
Comment by Andris Mednis [ 2013 Jul 29 ]

Available in svn://svn.zabbix.com/branches/dev/ZBX-6797 r37396.
It could be not the final version because work on ZBX-6797 continues in the same development branch.

Comment by Andris Mednis [ 2013 Jul 30 ]

Available in svn://svn.zabbix.com/branches/dev/ZBX-6797 r37410. Fixed together with ZBX-6797.
I tried to provide more information from ODBC diagnostics but the 128-character limit in database for error messages may cause truncation of text.
Examples of (truncated) error messages and how to read them:

Cannot execute ODBC query:[SQL_ERRORorSQL_NULL_DATA]:[42601][7][ERROR: syntax error at or near ";"; Error while executing the
-------------------------  ------------------------   -----  |  --------------------------------------------------------------
        \- Zabbix msg          \- ODBC return code      |    \- Native error code           \- error message.
                                                        \-SQLState 
Cannot connect to ODBC DSN:[SQL_ERRORorSQL_NULL_DATA]:[08001][101][[unixODBC]Could not connect to the server;Could not connect 
--------------------------  ------------------------   -----   |    ----------------------------------------------------------
        \- Zabbix msg          \- ODBC return code      |      \- Native error code           \- error message.
                                                        \-SQLState 
Comment by Andris Mednis [ 2013 Jul 30 ]

I deleted SQL_NULL_DATA and SQL_DATA_AT_EXEC from error messages. These values cannot be returned from ODBC functions. Fixed in r37422.
Now an error message looks a bit better:

Cannot connect to ODBC DSN:[SQL_ERROR]:[08001][101][[unixODBC]Could not connect to the server;Could not connect .. timeout occu
Comment by Andris Mednis [ 2013 Jul 31 ]

ODBC calling macro rewritten in 37438.

Comment by Andris Zeila [ 2013 Jul 31 ]

Successfully tested

Comment by Andris Mednis [ 2013 Jul 31 ]

Fixed in versions pre-2.0.8 rev. 37450 and pre-2.1.2 rev.37500.

Comment by richlv [ 2013 Aug 01 ]

(1) sounds like a good chance to advertise odbc in whatsnew

andris Added to Zabbix 2.0 documentation:
https://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew208?&#odbc_monitoring_improvements
https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/odbc_checks?&#error_messages
Added to Zabbix 2.2 documentation:
https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/odbc_checks?&#error_messages
RESOLVED

wiper review and CLOSED

Generated at Sat Apr 20 06:21:07 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.