Difference between revisions of "Fix ZenCatalog Issues"

From Zenoss Wiki
Jump to: navigation, search
(Final Edit)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Sometimes, the Zope Object Database that stores all your devices and components will have a data integrity issue. This can manifest itself in a number of ways, but the end result is that Zenoss will have trouble dealing with certain devices in your system, and you may not be able to remove the device in the UI. The zenoss.toolbox can be used to troubleshoot ZODB issues. The following Zenoss Knowledge Base articles details use of the zenoss.toolbox:
+
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.
  
[https://support.zenoss.com/hc/en-us/articles/203117595 How do I Install and Use the zenoss.toolbox Package?]
+
Login to the zenoss master server<br />
 +
Become the zenoss user:su - zenoss<br />
 +
Download the latest zenoss.toolbox:<br />
 +
:wget -O master.zip --no-check-certificate https://github.com/hackeys/zenoss.toolbox/archive/master.zip <br />
 +
Use python's easy_install to install the zenoss.toolbox:<br /><br />
  
[https://support.zenoss.com/hc/en-us/articles/203118075 How do I use zencatalogscan to detect and fix unresolvable object references in catalogs?]
+
:easy_install ./master.zip<br />
 +
<big>5: Validate the installation <br />
 +
:</big>zencatalogscan run -f<br />
  
[https://support.zenoss.com/hc/en-us/articles/203118175 How do I use zodbscan to Scan zodb for Dangling References?]
 
  
[https://support.zenoss.com/hc/en-us/articles/203117795 How do I use findposkeyerror to detect and fix POSKeyErrors in zodb?]
+
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 :
 +
<br />
 +
Resolution Steps:<br />
 +
 
 +
Store the result of the zodbscan and observe for any conflicts<br />
 +
: zodbscan | tee zodbscan.txt<br />
 +
Run zencatalogscan and observe for any discprepancy:<br />
 +
 
 +
:zencatalogscan run &> zencatalogscan.txt<br />
 +
 
 +
 
 +
Try to fix the issues with zencatalog using below script .<br />
 +
 
 +
:https://github.com/hackeys/zenoss/blob/master/fixZenCataLog.py
 +
:
 +
:chmod u+x fixCatalogs.py
 +
:./fixCatalogs.py

Revision as of 15:21, 20 March 2014

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