Difference between revisions of "Repairing Poskey Errors"

From Zenoss Wiki
Jump to: navigation, search
(Added link for core version of script)
(Replaced existing content with links to the new KB articles)
Line 1: Line 1:
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.
+
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:
  
 +
[http://support.zenoss.com/ics/support/KBAnswer.asp?questionID=201= How do I Install and Use the zenoss.toolbox Package?]
  
The FindPosKeyErrors scripts can be found at:
+
[http://support.zenoss.com/ics/support/KBAnswer.asp?questionID=216= How do I use zencatalogscan to detect and fix unresolvable object references in catalogs?]
  
https://github.com/hackeys/zenoss.git  (Enterprise)
+
[http://support.zenoss.com/ics/support/KBAnswer.asp?questionID=217= How do I use zodbscan to Scan zodb for Dangling References?]
  
https://github.com/SteelHouseLabs/POSKey-Script.git (Core)
+
[http://support.zenoss.com/ics/support/KBAnswer.asp?questionID=213= How do I use findposkeyerror to detect and fix POSKeyErrors in zodb?]
 
+
 
+
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 13:41, 25 June 2014

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:

How do I Install and Use the zenoss.toolbox Package?

How do I use zencatalogscan to detect and fix unresolvable object references in catalogs?

How do I use zodbscan to Scan zodb for Dangling References?

How do I use findposkeyerror to detect and fix POSKeyErrors in zodb?