Difference between revisions of "Repairing Poskey Errors"

From Zenoss Wiki
Jump to: navigation, search
(PosKey Error Fixture)
 
Line 1: Line 1:
  
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.  The other tool to find POSKeyErrors is zodbscan.
+
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.
  
+
    
 
+
This is the locationof the zodbscan tool:
+
 
+
+
 
+
https://github.com/zenoss/zenoss.toolbox
+
 
+
https://github.com/wplu/zenoss.toolbox
+
 
+
+
 
+
Here are the commands toinstall and use the zodbscan script if connected to the internet:
+
 
+
   root # su - zenoss
+
 
+
  zenoss $easy_install zenoss.toolbox
+
 
+
  zenoss $ zodbscan |tee zodbscan.txt
+
 
+
+
 
+
Here are the commands toinstall and use the zodbscan script if not connected to the internet:
+
 
+
  # on a machineconnected to internet
+
 
+
  $ wget -Omaster.zip --no-check-certificate https://github.com/zenoss/zenoss.toolbox/archive/master.zip
+
 
+
  $ scp master.zipzenoss@zenoss-master:
+
 
+
+
 
+
  root atzenoss-master # su - zenoss
+
 
+
  zenoss $easy_install ./master.zip
+
 
+
  zenoss $ zodbscan |tee zodbscan.txt
+
 
+
+
 
Findposkeyerrors script
 
Findposkeyerrors script
 
Script can be found at  
 
Script can be found at  

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.