May 26, 2017

A Zenoss error has occurred

I had a bit of a scare the other day after a simple reboot of my Zenoss 4.2.4 monitoring server. When the Zenoss server came back up, I went to login like usual and I received the dreaded "A Zenoss error has occurred" message! Below it was the following:
Type: <type 'exceptions.KeyError'>
Value: 1495826580
Traceback (most recent call last):
File "/usr/local/zenoss/lib/python/ZPublisher/", line 126, in publish
request, bind=1)
File "/usr/local/zenoss/lib/python/ZPublisher/", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "/usr/local/zenoss/lib/python/ZPublisher/", line 46, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "/usr/local/zenoss/Products/ZenUtils/patches/", line 153, in login
pas_instance.updateCredentials(request, response, login, password)
File "/usr/local/zenoss/lib/python/Products/PluggableAuthService/", line 1100, in updateCredentials
updater.updateCredentials(request, response, login, new_password)
File "/usr/local/zenoss/lib/python/Products/PluggableAuthService/plugins/", line 102, in updateCredentials
request.SESSION.set('__ac_name', login)
File "/usr/local/zenoss/lib/python/ZPublisher/", line 1379, in __getattr__
v = self.get(key, default, returnTaints=returnTaints)
File "/usr/local/zenoss/lib/python/ZPublisher/", line 1336, in get
v = v()
File "/usr/local/zenoss/lib/python/Products/Sessions/", line 101, in getSessionData
return self._getSessionDataObject(key)
File "/usr/local/zenoss/lib/python/Products/Sessions/", line 188, in _getSessionDataObject
ob = container.new_or_existing(key)
File "/usr/local/zenoss/lib/python/Products/Transience/", line 842, in new_or_existing
self[key] = item
File "/usr/local/zenoss/lib/python/Products/Transience/", line 454, in __setitem__
current_bucket = self._data[current_ts]
KeyError: 1495826580
Doesn't look pretty does it? Everything seemed to be working still, I was still getting alert emails, but I could not login to the user interface to save my life!

Well, I found a solution in an archived community support thread. To fix it I did the following to fix it by SSH'ing into the Zenoss server:
  • su zenoss
  • zendmd
  • from Products.ZenUtils.Security import activateCookieBasedAuthentication
  • activateCookieBasedAuthentication(zport)
  • activateCookieBasedAuthentication(app)
  • commit()
  • zport.acl_users._delObject('sessionAuthHelper')
  • app.acl_users._delObject('sessionAuthHelper')
  • commit()
  • exit()
  • zopectl restart
After that, I was able to login fine! Each of the above are one line commands in the terminal. 

I hope it helps you out!

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam