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/Publish.py", line 126, in publish
request, bind=1)
File "/usr/local/zenoss/lib/python/ZPublisher/mapply.py", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "/usr/local/zenoss/lib/python/ZPublisher/Publish.py", line 46, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "/usr/local/zenoss/Products/ZenUtils/patches/pasmonkey.py", line 153, in login
pas_instance.updateCredentials(request, response, login, password)
File "/usr/local/zenoss/lib/python/Products/PluggableAuthService/PluggableAuthService.py", line 1100, in updateCredentials
updater.updateCredentials(request, response, login, new_password)
File "/usr/local/zenoss/lib/python/Products/PluggableAuthService/plugins/SessionAuthHelper.py", line 102, in updateCredentials
request.SESSION.set('__ac_name', login)
File "/usr/local/zenoss/lib/python/ZPublisher/HTTPRequest.py", line 1379, in __getattr__
v = self.get(key, default, returnTaints=returnTaints)
File "/usr/local/zenoss/lib/python/ZPublisher/HTTPRequest.py", line 1336, in get
v = v()
File "/usr/local/zenoss/lib/python/Products/Sessions/SessionDataManager.py", line 101, in getSessionData
return self._getSessionDataObject(key)
File "/usr/local/zenoss/lib/python/Products/Sessions/SessionDataManager.py", line 188, in _getSessionDataObject
ob = container.new_or_existing(key)
File "/usr/local/zenoss/lib/python/Products/Transience/Transience.py", line 842, in new_or_existing
self[key] = item
File "/usr/local/zenoss/lib/python/Products/Transience/Transience.py", 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