Troubleshooting Zenoss PosKey Errors

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

Troubleshooting Zenoss PosKey Errors

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.
Swearing.jpg

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, the list of subjects can be found on the left side of the web site.


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. In this article, I’ll show you how to use the KB to solve PosKey errors!


Using the Zenoss Toolbox to Solve PosKey Errors

Bulbgraph.png Note: 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 Errors 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!