Difference between revisions of "Repairing Poskey Errors"

From Zenoss Wiki
Jump to: navigation, search
(9 intermediate revisions by 6 users 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:
 
  
[https://support.zenoss.com/hc/en-us/articles/203117595 How do I Install and Use the zenoss.toolbox Package?]
+
POSKeyError tracebacks occur when objects have references tonon-existing objects. When this occurs for relationships, thefindposkeyerror script can be used to locate objects that are the causes of thePOSKeyError tracebacks.
  
[https://support.zenoss.com/hc/en-us/articles/203118075 How do I use zencatalogscan to detect and fix unresolvable object references in catalogs?]
+
 
 +
Findposkeyerrors script
 +
Script can be found at
 +
https://github.com/hackeys/zenoss.git
 +
instructions for findposkeyerror script
  
[https://support.zenoss.com/hc/en-us/articles/203118175 How do I use zodbscan to Scan zodb for Dangling References?]
+
Here are the commands toinstall the findposkeyerror script:
  
[https://support.zenoss.com/hc/en-us/articles/203117795 How do I use findposkeyerror to detect and fix POSKeyErrors in zodb?]
+
  root # chown zenoss:zenossfindposkeyerror
  
[https://support.zenoss.com/hc/en-us/articles/203121165 How do I use zenrelationscan to scan/fix ZenRelations]
+
  root # su - zenoss
 +
 
 +
  zenoss $ chmod u+xfindposkeyerror
 +
 
 +
 +
 
 +
Here are a few sample runsof the script:
 +
 
 +
  zenoss $./findposkeyerror /zport/dmd/Monitors
 +
 
 +
  zenoss $./findposkeyerror --fixrels /zport/dmd/Monitors
 +
 
 +
  zenoss $./findposkeyerror /zport/dmd/ZenUsers
 +
 
 +
  zenoss $./findposkeyerror --fixrels /zport/dmd/ZenUsers
 +
 
 +
  zenoss $./findposkeyerror /zport/dmd/Devices
 +
 
 +
  zenoss $./findposkeyerror --fixrels /zport/dmd/Devices
 +
 
 +
 +
 
 +
For ZenRelationshipobjects, there's a high likelihood that it is the _objects attribute that iscorrupted.  When findposkeyerror is run with the '--fixrels' flag, it willfix most ZenRelationship objects.

Revision as of 14:14, 18 July 2013

POSKeyError tracebacks occur when objects have references tonon-existing objects. When this occurs for relationships, thefindposkeyerror script can be used to locate objects that are the causes of thePOSKeyError tracebacks.


Findposkeyerrors script Script can be found at https://github.com/hackeys/zenoss.git instructions for findposkeyerror script

Here are the commands toinstall the findposkeyerror script:

 root # chown zenoss:zenossfindposkeyerror
 root # su - zenoss
 zenoss $ chmod u+xfindposkeyerror


Here are a few sample runsof the script:

 zenoss $./findposkeyerror /zport/dmd/Monitors
 zenoss $./findposkeyerror --fixrels /zport/dmd/Monitors
 zenoss $./findposkeyerror /zport/dmd/ZenUsers
 zenoss $./findposkeyerror --fixrels /zport/dmd/ZenUsers
 zenoss $./findposkeyerror /zport/dmd/Devices
 zenoss $./findposkeyerror --fixrels /zport/dmd/Devices


For ZenRelationshipobjects, there's a high likelihood that it is the _objects attribute that iscorrupted. When findposkeyerror is run with the '--fixrels' flag, it willfix most ZenRelationship objects.