Discussion:
Event Detail - Server Exception
Brian S
2012-10-09 21:14:27 UTC
Permalink
Brian S [http://community.zenoss.org/people/z3r0day] created the discussion

"Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/68961#68961

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68961#68961]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Brian S
2012-10-15 21:13:35 UTC
Permalink
Brian S [http://community.zenoss.org/people/z3r0day] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69214#69214

--------------------------------------------------------------
I've been doing more research and digging.  I found a similar issue, http://community.zenoss.org/message/41995#41995 http://community.zenoss.org/message/41995#41995, which lead me to this ticket http://dev.zenoss.com/trac/ticket/5883 http://dev.zenoss.com/trac/ticket/5883 which ultimate points to this ticket http://dev.zenoss.org/trac/ticket/5795 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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69214#69214]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-10-16 12:57:49 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69241#69241

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69241#69241]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-16 13:50:05 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69245#69245

--------------------------------------------------------------
Brian:

Seems like these events are corrupted. Do other events on the same device exhibit the same problem?

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69245#69245]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Brian S
2012-10-17 00:24:10 UTC
Permalink
Brian S [http://community.zenoss.org/people/z3r0day] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69272#69272

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69272#69272]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-10-17 12:27:34 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69278#69278

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69278#69278]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-17 13:11:01 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69297#69297

--------------------------------------------------------------
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)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69297#69297]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Brian S
2012-10-17 20:53:05 UTC
Permalink
Brian S [http://community.zenoss.org/people/z3r0day] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69331#69331

--------------------------------------------------------------
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.
http://community.zenoss.org/servlet/JiveServlet/showImage/2-69331-13702/pic2.bmp http://community.zenoss.org/servlet/JiveServlet/downloadImage/2-69331-13702/450-159/pic2.bmp

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.
http://community.zenoss.org/servlet/JiveServlet/showImage/2-69331-13706/pic1.bmp http://community.zenoss.org/servlet/JiveServlet/downloadImage/2-69331-13706/450-197/pic1.bmp

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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69331#69331]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-10-18 12:12:02 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69334#69334

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69334#69334]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Brian S
2012-10-18 15:47:53 UTC
Permalink
Brian S [http://community.zenoss.org/people/z3r0day] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69356#69356

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69356#69356]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Brian S
2012-10-18 16:22:09 UTC
Permalink
Brian S [http://community.zenoss.org/people/z3r0day] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69358#69358

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69358#69358]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-18 16:41:27 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event Detail - Server Exception"

To view the discussion, visit: http://community.zenoss.org/message/69360#69360

--------------------------------------------------------------
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)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69360#69360]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...