Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
9.0
-
None
Description
SOLR-15451 introduced a change where the exception message included by the SolrStream can sometimes be the encoded (javabin) string representation of the remote exception.
Just reading through SOLR-15451 I don't believe this was the intended result here. I think the original change was aiming at providing the 403 auth repose as string because that is a raw html response. and accidentally caused the response format change across all possible streaming exceptions.
I think this might be due to consuming the stream response as string instead of using a reader. See 'consumeStreamAsErrorMessage' method https://github.com/apache/solr/blob/main/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java#L335C18-L335C45
example based on existing test in Solr that is currently disabled https://github.com/apache/solr/blob/main/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java#L631
- /select as json format (default)
java.util.concurrent.ExecutionException: java.io.IOException: Query to '/streams_shard2_replica_n2/select?q=*:*&fl=a_s,a_i,a_f,blah&sort=blah+asc&distrib=false' failed due to: (400) { "responseHeader":{ "zkConnected":true, "status":400, "QTime":1 }, "error":{ "metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"], "msg":"sort param field can't be found: blah", "code":400 } }
- /select as javabin format
java.util.concurrent.ExecutionException: java.io.IOException: Query to '/streams_shard2_replica_n2/select?q=*:*&fl=a_s,a_i,a_f,blah&sort=blah+asc&wt=javabin&distrib=false' failed due to: (400) ��.responseHeader��+zkConnected�&statusP�%QTime�%error��(metadata��+error-class?org.apache.solr.common.SolrException�0root-error-class?org.apache.solr.common.SolrException�#msg?sort param field can't be found: blah�$codeP
- /export as json format
java.util.concurrent.ExecutionException: java.io.IOException: Query to '/streams_collection_shard2_replica_n2/export?q=*:*&fl=a_s,a_i,a_f,blah&sort=blah+asc&distrib=false&indent=off' failed due to: (400) {"responseHeader":{"status":400},"response":{"numFound":0,"docs":[{"EXCEPTION":"sort param field can't be found: blah"}]}}
- /export as javabin format
java.util.concurrent.ExecutionException: java.io.IOException: Query to '/streams_collection_shard2_replica_n2/export?q=*:*&fl=a_s,a_i,a_f,blah&sort=blah+asc&wt=javabin&distrib=false&indent=off' failed due to: (400) �.responseHeader �&statusP�(response �(numFound�$docs� �)EXCEPTION?sort param field can't be found: blah
error messages before this change:
java.util.concurrent.ExecutionException: java.io.IOException: --> http://127.0.0.1:65079/solr:sort param field can't be found: blah
Attachments
Issue Links
- is caused by
-
SOLR-15451 SQL endpoint returns the wrong error when authenticated user doesn't have read access /admin/luke
- Closed
- links to