Difference between revisions of "Repairing Poskey Errors"

From Zenoss Wiki
Jump to: navigation, search
(Added link for core version of script)
(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:
+
POSKeyError tracebacks occur when objects have references to non-existing objects. When this occurs for relationships, the FindPosKeyError script can be used to locate objects that are the causes of the POSKeyError tracebacks.
  
[https://support.zenoss.com/hc/en-us/articles/203117595 How do I Install and Use the zenoss.toolbox Package?]
 
  
[https://support.zenoss.com/hc/en-us/articles/203118075 How do I use zencatalogscan to detect and fix unresolvable object references in catalogs?]
+
The FindPosKeyErrors scripts can be found at:
  
[https://support.zenoss.com/hc/en-us/articles/203118175 How do I use zodbscan to Scan zodb for Dangling References?]
+
https://github.com/hackeys/zenoss.git  (Enterprise)
  
[https://support.zenoss.com/hc/en-us/articles/203117795 How do I use findposkeyerror to detect and fix POSKeyErrors in zodb?]
+
https://github.com/SteelHouseLabs/POSKey-Script.git (Core)
  
[https://support.zenoss.com/hc/en-us/articles/203121165 How do I use zenrelationscan to scan/fix ZenRelations]
+
 
 +
Instructions for FindPosKeyError script installation and usage:
 +
 
 +
Here are the commands to install the FindPosKeyError script:
 +
<console>
 +
# ##i##chown zenoss:zenoss FindPosKeyError
 +
# ##i##su - zenoss
 +
$ ##i##chmod u+x FindPosKeyError
 +
</console>
 +
 +
Here are a few sample runs of the script:
 +
<console>
 +
$ ##i##./FindPosKeyError /zport/dmd/Monitors
 +
$ ##i##./FindPosKeyError --fixrels /zport/dmd/Monitors
 +
$ ##i##./FindPosKeyError /zport/dmd/ZenUsers
 +
$ ##i##./FindPosKeyError --fixrels /zport/dmd/ZenUsers
 +
$ ##i##./FindPosKeyError /zport/dmd/Devices
 +
$ ##i##./FindPosKeyError --fixrels /zport/dmd/Devices
 +
</console>
 +
 
 +
For ZenRelationship objects, there's a high likelihood that it is the _objects attribute that is corrupted.  When FindPosKeyError is run with the '--fixrels' flag, it will fix most ZenRelationship objects.
 +
 
 +
[[Category:Troubleshooting]]

Revision as of 19:06, 15 April 2014

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


The FindPosKeyErrors scripts can be found at:

https://github.com/hackeys/zenoss.git (Enterprise)

https://github.com/SteelHouseLabs/POSKey-Script.git (Core)


Instructions for FindPosKeyError script installation and usage:

Here are the commands to install the FindPosKeyError script:

# chown zenoss:zenoss FindPosKeyError
# su - zenoss
$ chmod u+x FindPosKeyError

Here are a few sample runs of the script:

$ ./FindPosKeyError /zport/dmd/Monitors
$ ./FindPosKeyError --fixrels /zport/dmd/Monitors
$ ./FindPosKeyError /zport/dmd/ZenUsers
$ ./FindPosKeyError --fixrels /zport/dmd/ZenUsers
$ ./FindPosKeyError /zport/dmd/Devices
$ ./FindPosKeyError --fixrels /zport/dmd/Devices

For ZenRelationship objects, there's a high likelihood that it is the _objects attribute that is corrupted. When FindPosKeyError is run with the '--fixrels' flag, it will fix most ZenRelationship objects.