AnatolyUss/nmig

Make error message more clear

DRVTiny opened this issue · 2 comments

I've got this error when trying to replicate Zabbix database from MySQL to PostgreSQL:

        --[populateTableWorker] Error loading table data:
SELECT `itemid` AS `itemid`,`type` AS `type`,`snmp_community` AS `snmp_community`,`snmp_oid` AS `snmp_oid`,`hostid` AS `hostid`,`name` AS `name`,`key_` AS `key_`,`delay` AS `delay`,`history` AS `history`,`trends` AS `trends`,`status` AS `status`,`value_type` 
AS `value_type`,`trapper_hosts` AS `trapper_hosts`,`units` AS `units`,`snmpv3_securityname` AS `snmpv3_securityname`,`snmpv3_securitylevel` AS `snmpv3_securitylevel`,`snmpv3_authpassphrase` AS `snmpv3_authpassphrase`,`snmpv3_privpassphrase` AS `snmpv3_privpas
sphrase`,`formula` AS `formula`,`error` AS `error`,`lastlogsize` AS `lastlogsize`,`logtimefmt` AS `logtimefmt`,`templateid` AS `templateid`,`valuemapid` AS `valuemapid`,`params` AS `params`,`ipmi_sensor` AS `ipmi_sensor`,`authtype` AS `authtype`,`username` AS
 `username`,`password` AS `password`,`publickey` AS `publickey`,`privatekey` AS `privatekey`,`mtime` AS `mtime`,`flags` AS `flags`,`interfaceid` AS `interfaceid`,`port` AS `port`,`description` AS `description`,`inventory_link` AS `inventory_link`,`lifetime` A
S `lifetime`,`snmpv3_authprotocol` AS `snmpv3_authprotocol`,`snmpv3_privprotocol` AS `snmpv3_privprotocol`,`state` AS `state`,`snmpv3_contextname` AS `snmpv3_contextname`,`evaltype` AS `evaltype`,`jmx_endpoint` AS `jmx_endpoint`,`master_itemid` AS `master_ite
mid` FROM `items` LIMIT 88767,29589;

        --[loadData] Loading the data...
        --[populateTableWorker] Error loading table data:
SELECT `itemid` AS `itemid`,`type` AS `type`,`snmp_community` AS `snmp_community`,`snmp_oid` AS `snmp_oid`,`hostid` AS `hostid`,`name` AS `name`,`key_` AS `key_`,`delay` AS `delay`,`history` AS `history`,`trends` AS `trends`,`status` AS `status`,`value_type` 
AS `value_type`,`trapper_hosts` AS `trapper_hosts`,`units` AS `units`,`snmpv3_securityname` AS `snmpv3_securityname`,`snmpv3_securitylevel` AS `snmpv3_securitylevel`,`snmpv3_authpassphrase` AS `snmpv3_authpassphrase`,`snmpv3_privpassphrase` AS `snmpv3_privpas
sphrase`,`formula` AS `formula`,`error` AS `error`,`lastlogsize` AS `lastlogsize`,`logtimefmt` AS `logtimefmt`,`templateid` AS `templateid`,`valuemapid` AS `valuemapid`,`params` AS `params`,`ipmi_sensor` AS `ipmi_sensor`,`authtype` AS `authtype`,`username` AS
 `username`,`password` AS `password`,`publickey` AS `publickey`,`privatekey` AS `privatekey`,`mtime` AS `mtime`,`flags` AS `flags`,`interfaceid` AS `interfaceid`,`port` AS `port`,`description` AS `description`,`inventory_link` AS `inventory_link`,`lifetime` A
S `lifetime`,`snmpv3_authprotocol` AS `snmpv3_authprotocol`,`snmpv3_privprotocol` AS `snmpv3_privprotocol`,`state` AS `state`,`snmpv3_contextname` AS `snmpv3_contextname`,`evaltype` AS `evaltype`,`jmx_endpoint` AS `jmx_endpoint`,`master_itemid` AS `master_ite
mid` FROM `items` LIMIT 0,29589;

It looks like error, but error message does not contain any useful information, so i cant fix anything to avoid this problem, because i dont know WHAT and where to fix.
Please, add the text describing error reasons returned from SQL server in your app error messages, so users can understand whats going on whithout tricks like tcpdump'ing or coding.

Thank you!

Done.
Thanks for the suggestion!