Oct 9, 2012 5:14 PM
Event Detail - Server Exception
-
Like (0)
Hi Guys,
I've got a few events that won't load event details. When double clicking on the event, the event details pane slides over from the right, but is blank. After a couple seconds, I get the error:
The server reported the following error:
Unable to connect to the server.
The system has encountered an error. Please reload the page
Reload Page | Dismiss
This only happens on a select few events. Other events from the same device appear just fine.
Can anyone help to point me in the right direction with this?
I'm running Zenoss Core v3.0.3.
Thanks,
z3r0day
I've been doing more research and digging. I found a similar issue, message/41995#41995, which lead me to this ticket http://dev.zenoss.com/trac/ticket/5883 which ultimate points to this ticket http://dev.zenoss.org/trac/ticket/5795.
It seems that the issue relates to non-standard characters that Zenoss cannot interpret. I found that all the traps that error out contain the following character: Ð
All of the events that contain this character will not open in event details and will generate the Server Exception error, where the 1 event that doesn't contain this character opens just fine. There are also logged errors in /opt/zenoss/log/error.log that reference the issue; "
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-2: invalid data".
It seems that in the referenced tickets above, the issue would take down the entire event console, whereas now it is only present when trying to view an event containing the non-standard character.
My only idea at this time is to write a transform for each event oid to get rid of the strange character. The issue with that is I have never written transforms as of yet, and have no prior python expierence.
Can anyone assist me with this, and/or offer an alternate solution?
Thanks!
z3r0day
While waiting for my e-mail attempt to show up, I'll just give you what I would do which is indeed a transform.
Try using
evt.summary = evt.summary.replace('Dthingy','Something else')
Rinse and repeat for evt.whatever fields have the problem character.
--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
Brian:
Seems like these events are corrupted. Do other events on the same device exhibit the same problem?
Best,
--Shane Scott (Hackman238)
Hi Guys,
Thanks for your responses!
jmp242 - I tried your suggestion. I'm still new with the transforms, but this is how I set it up. The Event Class for these events by default are /unknown. So, I created an EventClass mapping for the problematic event, such as hnOamContComNotification. In the transform section of the EventClass mapping, I changed it slightly, as I'm not trying to change the summary field, but the hnEventHistoryTimeValue field (according to the record in the database). So the I made the transform as:
evt.hnEventHistoryTimeValue = evt.hnEventHistoryTimeValue.replace('Ð','')
Basically, I don't care what the value is, because I don't know what it should be, so I left it blank. Did I do this wrong, or can I use the "evt." with any valid field? Anyway, the transform did not work. I checked the database when the event reappeared, and that revealed that the transform did not change the hnEventHistoryTimeValue field value in any way.
Shane - yes, this same device produces other events that also give the error. However, it does produce events that DON'T give the error. Looking at the raw event data in the status table, it seems to be the Ð character that is causing the issue.
Thanks,
z3r0day
Is the end event getting mapped to your event class? I'm not sure what you mean by in the transform section of the mapping, but in the event class is where the transform should go. However, I'm not sure if you can access all fields or not in a transform, usually I can access any that show up in event details though, so it seems like it should work, assuming it's actually where Zenoss is going to try and apply a transform.
--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
z3r0day:
What's your 'default-zpublisher-encoding' set to in $ZENHOME/etc/zope.conf? It should be utf-8.
In a worst case scenario you could drop the events db, update the mysql conf with the following parameters then recreate the events db.
[mysqld]
default-character-set=utf8
collation_server=utf8_unicode_ci
Best,
--Shane Scott (Hackman238)
Hi James, I believe the event is being mapped because when the event is present, it shows an alarm within this class. I've attached a screenshot of what I mean by the "transform within the class". Again, I'm new with this part of zenoss, so I don't have my linguo down very well.
I've attached another screen shot of what the event looks like in the database. Take note of the hnEventHistoryTimeValue field. The value in this field is what is causing the issue.
Shane, I checked and default-zpublisher-encoding value is indeed utf-8. After all I went through with my last discussion on cleaning up the events database, particularly the history table, I'd hate to go and just drop the database now...lol.
Thanks for everyone's help!
z3r0day
Your screenshot shows a subclass of /Unknown. That may be the issue, you need to map events *out* of /unknown. /Unknown treats everything a bit weird in my experiance.
So delete that mapping and class. Create a class outside of /Unknown... Then set the transform for that class (like what your screen shot shows) and lets see if that then works.
--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
Hi James,
I've created a class /Overture (they're Overture network devices) and I have moved the subclasses as displayed in the screen shot above to the /Overture class. I think this is what you advised that I do.
I'll update what happens when the event occurs again today.
Thanks!
z3r0day
Hi James,
The event occurred again, and it seems it was mapped successfully, as the event class for the event shows /Overture. However, it doesn't seem that the transform worked, because I get the same error when trying to view the event details. Looking in the database, it shows the same as in the screenshot above, meaning that strange character wasn't changed.
Any ideas? Is there a log for attempted transforms anywhere that might give more information?
I appreciate your help!
Thanks,
z3r0day
Brian:
I'm thinking it's too late to do a transform once the event arrives since the character is incompatible with something in the event manager in general. You could dump the db, clear the problem events, drop the db, recreate with those options and then dump it back in. Do a backup first- I dont' know how smooth that will all go. In theory it should work.
Best,
--Shane Scott (Hackman238)
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||