Troubleshooting Zenoss PosKey Errors

From Zenoss Wiki
Revision as of 00:50, 23 October 2014 by Trelane (Talk | contribs)$7

Jump to: navigation, search

Troubleshooting Zenoss PosKey Errors


One of the most frequently asked questions we get is around PosKey Errors. PosKey Errors can cripple a Zenoss instance, but most PosKey errors can easily be fixed.

This article provides some guidance around troubleshooting PosKey Errors. It includes information about how you can use Zenoss Knowledge Base (KB) articles to help resolve POSKey errors, as well as other errors you may encounter while working with Zenoss.

Using Zenoss KBs to Help You Solve PosKey Errors

The Zenoss KB is part of the Zenoss Enterprise Support Portal. While official Zenoss product support requires a support contract with Zenoss, KB articles are available to everyone. KB articles are sorted by subject and can be found on the right side of the screen.

[insert screen shot here]

KB articles are produced by the Zenoss Customer Enablement Team and address common problems our commercial users have. However, most KB articles are relevant to Community members as well.

Using the Zenoss Toolbox to Solve PosKey Errors

(if you are encountering a PosKey Error when trying to log into the Zenoss Web Interface referencing zodb_session skip to the end)

One of the first steps when encountering a PosKey Error is to download the Zenoss Toolbox. Inside the Zenoss Toolbox are several scripts, each of which addresses different problems which result in displayed PosKey Errors.

The Zenoss Toolbox is available for free via Github, and the installation process is documented in Zenoss KB #201.

Rather than spending time on diagnosing exactly which POSKey Error you are experiencing, you’re better off running all three scripts:

After you run these scripts, next run zenchkrels to detect and fix broken ZODB relationships. Although zenchkrels is not in the Zenoss Toolbox, you can find additional information about how to run this script in Zenoss KB #223.

Fixing PosKey Error Which Occur On Login

There’s another PosKey Error which can bite you on login.

Fortunately, fixing PosKey Errors on logon is easy! To fix this Error, simply stop Zenoss, delete and recreate the zodb_session database, and restart Zenoss. Zenoss will populate the database appropriately.

Note that the zodb database can also get very large, and deleting it from time to time will save disk, and help to prevent errors.

 $ zenoss stop
 $ mysql -u zenoss -p
 mysql> drop database zodb_session;
 Query OK, 8 rows affected (0.47 sec)

 mysql> create database zodb_session;
 Query OK, 1 row affected (0.00 sec)

 mysql> show databases;
 | Database           |
 | information_schema |
 | mysql              |
 | test               |
 | zenoss_zep         |
 | zodb               |
 | zodb_session       |
 6 rows in set (0.00 sec)

 mysql> exit
 $ zenoss start

Life Without PosKey Errors

Now that you know how to fix PosKey Errors, it’s time to use these simple tools to make sure that your databases are in good health, and make sure that zodb_session isn’t taking up too much space! You can also sleep better knowing that POSKey Errors will never intimidate you again!