Fix ZenCatalog Issues

From Zenoss Wiki
Jump to: navigation, search

Zenoss has a catalog service called as zencatalog which takes of indexed content. Following would be the issue seen with zencatalog when broken . We can resolve it , if we have proper tool available with us.

Login to the zenoss master server
Become the zenoss user:su - zenoss
Download the latest zenoss.toolbox:

wget -O master.zip --no-check-certificate https://github.com/hackeys/zenoss.toolbox/archive/master.zip

Use python's easy_install to install the zenoss.toolbox:

easy_install ./master.zip

5: Validate the installation

zencatalogscan run -f


Zencatlog Broken Error Message:


2014-03-18 03:55:08 ERROR :zen.ZenModeler Traceback (most recent call last): :File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 87, in inner :return callable(*args, **kw) :File "/opt/zenoss/Products/ZenHub/zenhubworker.py", line 173, in remote_execute :return runOnce() :File "/opt/zenoss/Products/ZenHub/zenhubworker.py", line 160, in runOnce :res = m(*args, **kw) :File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 95, in inner :traceback.format_exc()) :RemoteException: Remote exception: : 15a.53.2Traceback (most recent call last): :File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 87, in inner :return callable(*args, **kw) :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 136, in remote_applyDataMaps :result = inner(map) :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 132, in inner :return self._do_with_retries(action) :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 153, in _do_with_retries :return action() :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 123, in action :completed= bool(adm._applyDataMap(device, map)) :File "/opt/zenoss/lib/python/ZODB/transact.py", line 44, in g :r = f(*args, **kwargs) :File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 208, in _applyDataMap :changed = self._updateRelationship(tobj, datamap) :File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 262, in _updateRelationship :objchange = self._updateObject(obj, objmap) :File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 380, in _updateObject :setter(*args) :File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.NetAppMonitor-3.0.4-py2.7.egg/ZenPacks/zenoss/NetAppMonitor/RAIDGroup.py", line 88, in setDiskIds :ids=ids) :File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.NetAppMonitor-3.0.4-py2.7.egg/ZenPacks/zenoss/NetAppMonitor/utils.py", line 235, in updateToMany :obj_map[result.id] = result.getObject() :File "/opt/zenoss/lib/python/Products/ZCatalog/CatalogBrains.py", line 69, in getObject :return parent.restrictedTraverse(path[-1]) :File "/opt/zenoss/lib/python/OFS/Traversable.py", line 315, in restrictedTraverse :return self.unrestrictedTraverse(path, default, restricted=True) :File "/opt/zenoss/lib/python/OFS/Traversable.py", line 298, in unrestrictedTraverse :raise e :NotFound: 15a.53.2 :Traceback (most recent call last): :File "/opt/zenoss/Products/DataCollector/zenmodeler.py", line 671, in processClient :if driver.next(): :File "/opt/zenoss/Products/ZenUtils/Driver.py", line 64, in result :raise ex :RemoteException: Traceback (most recent call last): :File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 87, in inner :return callable(*args, **kw) :File "/opt/zenoss/Products/ZenHub/zenhubworker.py", line 173, in remote_execute :return runOnce() :File "/opt/zenoss/Products/ZenHub/zenhubworker.py", line 160, in runOnce :res = m(*args, **kw) :File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 95, in inner :traceback.format_exc()) :RemoteException: Remote exception: : 15a.53.2Traceback (most recent call last): :File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 87, in inner :return callable(*args, **kw) :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 136, in remote_applyDataMaps :result = inner(map) :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 132, in inner :return self._do_with_retries(action) :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 153, in _do_with_retries :return action() :File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 123, in action :completed= bool(adm._applyDataMap(device, map)) :File "/opt/zenoss/lib/python/ZODB/transact.py", line 44, in g :r = f(*args, **kwargs) :File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 208, in _applyDataMap :changed = self._updateRelationship(tobj, datamap) :File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 262, in _updateRelationship :objchange = self._updateObject(obj, objmap) :File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 380, in _updateObject :setter(*args) :File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.NetAppMonitor-3.0.4-py2.7.egg/ZenPacks/zenoss/NetAppMonitor/RAIDGroup.py", line 88, in setDiskIds :ids=ids) :File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.NetAppMonitor-3.0.4-py2.7.egg/ZenPacks/zenoss/NetAppMonitor/utils.py", line 235, in updateToMany :obj_map[result.id] = result.getObject() :File "/opt/zenoss/lib/python/Products/ZCatalog/CatalogBrains.py", line 69, in getObject :return parent.restrictedTraverse(path[-1]) :File "/opt/zenoss/lib/python/OFS/Traversable.py", line 315, in restrictedTraverse :return self.unrestrictedTraverse(path, default, restricted=True) :File "/opt/zenoss/lib/python/OFS/Traversable.py", line 298, in unrestrictedTraverse :raise e :


Resolution Steps:

Store the result of the zodbscan and observe for any conflicts

zodbscan | tee zodbscan.txt

Run zencatalogscan and observe for any discprepancy:

zencatalogscan run &> zencatalogscan.txt


Try to fix the issues with zencatalog using below script .

https://github.com/hackeys/zenoss/blob/master/fixZenCataLog.py
chmod u+x fixCatalogs.py
./fixCatalogs.py