ZABBIX BUGS AND ISSUES

Sometimes connection parameters are not passed to odbc_DBconnect procedure

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8.3, 1.9.0 (alpha)
  • Component/s: Server (S)
  • Labels:
    None
  • Zabbix ID:
    NA

Description

After upgrading from 1.6.4 to 1.8 some of my database checks fails with following error:
 24677:20100106:121519.358 Failed to connect to DSN '' : Error: failed connection [[unixODBC][Driver Manager]Can't initiate unicode conversion] (0)
 24677:20100106:121519.358 Item [edocsp2.uk.db.com:db.odbc.select[e-DOCS Database Invalid Objects count]] error: failed connection [[unixODBC][Driver Manager]
Can't initiate unicode conversion] (0)
 24677:20100106:121519.358 In zabbix_log()
 24677:20100106:121519.358 In DCconfig_get_items() hostid:0 key:'zabbix[log]'
 24677:20100106:121519.358 End of DCconfig_get_items():0
 24677:20100106:121519.358 End of zabbix_log()
 24677:20100106:121519.358 End of get_value():NOTSUPPORTED
 24677:20100106:121519.358 Parameter [edocsp2.uk.db.com:db.odbc.select[e-DOCS Database Invalid Objects count]] is not supported by agent Old status [0]


Further investigations showed that this error occurs when empty DSN, User and Pass parameters were passed to odbc_DBconnect procedure.

All parameters in front end are set correctly and nothing was changed since it was working in Z 1.6.4.

I tried to re-enable the item, but the next time it fails as well.

edocsp2.uk.db.com:db.odbc.select[e-DOCS Database Invalid Objects count] set as below:

DSN=EDOCS
user=user
password=password
sql=select count(*) from user_objects where status <> 'VALID'

(not as DSN=EDOCS\nuser=user\npassword=password\nsql=select count(*) from user_objects where status <> 'VALID' )

Activity

richlv made changes -
Field Original Value New Value
Assignee Alexander Vladishev [ sasha ]
Hide
Lucas Wolenczak added a comment -

FYI, tried with "DSN=EDOCS\nuser=user\npassword=password\nsql=select count from user_objects where status <> 'VALID' " as well and got the same result. Furthermore this issue concerns only some of DB checks, others are seems to be working fine (or at least they receive input parameters)

Show
Lucas Wolenczak added a comment - FYI, tried with "DSN=EDOCS\nuser=user\npassword=password\nsql=select count from user_objects where status <> 'VALID' " as well and got the same result. Furthermore this issue concerns only some of DB checks, others are seems to be working fine (or at least they receive input parameters)
Alexei Vladishev made changes -
Assignee Alexander Vladishev [ sasha ]
Kirill Fateev made changes -
Comment [ Root of the problem lies in DCsync_items() function and get_nearestindex() function.
In DCsync_items() dbitems falls into config cache not in hostid order, and get_nearestindex returns wrong index -> params parsing works incorrectly -> database monitor item gets empty or incorrect parameters -> items falls into NOTSUPPORTED status :(
The cause of this behavior is the mistake in DCsync_items() function in section /* db items */ :
                i = get_nearestindex(config->dbitems, sizeof(ZBX_DC_LOGITEM),
                                config->dbitems_num, itemid);

Replace "sizeof(ZBX_DC_LOGITEM)" with "sizeof(ZBX_DC_DBITEM)" and ODBC will work.

Пожалуйста, внесите это в следующий релиз ;)
]
Alexei Vladishev made changes -
Fix Version/s 1.8.3 [ 10063 ]
Hide
Alexei Vladishev added a comment -

See also ZBX-2300.

Show
Alexei Vladishev added a comment - See also ZBX-2300.
Alexei Vladishev made changes -
Assignee Alexander Vladishev [ sasha ]
Hide
Aleksandrs Saveljevs added a comment -

Fixed in ZBX-2300.

Show
Aleksandrs Saveljevs added a comment - Fixed in ZBX-2300.
Aleksandrs Saveljevs made changes -
Status Open [ 1 ] Closed [ 6 ]
Fix Version/s 1.9 (trunk) [ 10046 ]
Resolution Fixed [ 1 ]

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: