You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2013/08/30 22:53:00 UTC

[jira] [Updated] (SOLR-3852) Admin UI - Cloud Tree with HTTP-Status 500 and an ArrayIndexOutOfBoundsException when using external ZK

     [ https://issues.apache.org/jira/browse/SOLR-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-3852:
---------------------------

    Attachment: SOLR-3852.patch

This has popped up on the mailing list again recently, so i took a look...

As Shikhar noted, the particular exception is happening in a bit of dead code which is easy enough to remove -- but that's only part of hte problem.

the dead code is part of the tree walk of every ZK node that happens anytime you load the tree view page at all -- so having any non utf8 files anywhere in your ZK tree is going to cause that exception as soon as you try to look at the Solr ZK UI -- to reproduce just copy favicon.ico into your collection1/conf dir for example.

but even if we purge that dead code, a similar bit of logic exists in the function for fetching the details about a node if someone clicks on it.

Looking through the history of the file, it seems like this problem was introduced back in r1298010 when the code was switched to use BytesRef -- the existing logic to hex escape anything that wasn't in unicode wasn't preserved  -- but from what i can tell, i don't think that ever worked (catching UnsupportedEncodingException from "new String(byte[],String)" doesn't seem right there according to the docs) and i'm not sure what use that would be anyway.

In the attached patch, i purged the dead code, added some error handling around the remaining attempt to serialize the "data" of any node the user clicks on, and in the event that the data can't be converted to String add a new "dataNote" property explaining why "data" is empty (even though dataLengh is non zero)

If no one sees any problems with this, i'll commit ASAP ... if we want to revist adding teh hex encoding output of bin conent we should probably hash that out in a new issue as an improvement, since i'm not convinced it's a good idea to just blindly do that in the same "data" field of the response ... could confuse people.
                
> Admin UI - Cloud Tree with HTTP-Status 500 and an ArrayIndexOutOfBoundsException when using external ZK
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3852
>                 URL: https://issues.apache.org/jira/browse/SOLR-3852
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0-BETA
>         Environment: Tomcat 6, external zookeeper-3.3.5 
>            Reporter: Vadim Kisselmann
>         Attachments: SOLR-3852.patch
>
>
> It works with embedded ZK.
> But when we use an external ZK(3.3.5), and this ZK has another nodes like (hbase, broker, etc. and child-nodes with not specified formats) we get this Error in Admin UI in the "Cloud-Tree" View: Loading of undefined failed with HTTP-Status 500 .
> Important(!): The cluster still works. Our external ZK see the Solr Servers (live-nodes) and has the solr config files from initial import. All the nodes like collections, configs, overseer-elect are here.
> Only the Admin UI has a problem to show the "Cloud-Tree". Cloud-Graph works!
> Catalina-LogFiles are free from Error messages, i have only this stack trace from Firebug:
> <html><head><title>Apache Tomcat/6.0.28 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.ArrayIndexOutOfBoundsException
> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/6.0.28 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.28</h3></body></html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org