You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Tomas Eduardo Fernandez Lobbe (Jira)" <ji...@apache.org> on 2023/04/26 17:47:00 UTC
[jira] [Updated] (SOLR-16737) SOLR 9.2.0 cluster basic authentication with http2 solr client
[ https://issues.apache.org/jira/browse/SOLR-16737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomas Eduardo Fernandez Lobbe updated SOLR-16737:
-------------------------------------------------
Affects Version/s: (was: 9.2)
> SOLR 9.2.0 cluster basic authentication with http2 solr client
> --------------------------------------------------------------
>
> Key: SOLR-16737
> URL: https://issues.apache.org/jira/browse/SOLR-16737
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrJ
> Reporter: Andrei Minin
> Assignee: Tomas Eduardo Fernandez Lobbe
> Priority: Major
> Fix For: main (10.0), 9.3
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> 401 (not authorized) error thrown when connecting to SOLR 9 cluster using SolrJ with basic authentication.
> {code:java}
> Caused
> by:
> org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException:
> Error from server at http://solr3:8983/solr: Expected mime type in
> [application/octet-stream, application/vnd.apache.solr.javabin] but got
> text/html. <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
> <title>Error 401 require authentication</title>
> </head>
> <body><h2>HTTP ERROR 401 require authentication</h2>
> <table>
> <tr><th>URI:</th><td>/solr/admin/collections</td></tr>
> <tr><th>STATUS:</th><td>401</td></tr>
> <tr><th>MESSAGE:</th><td>require authentication</td></tr>
> <tr><th>SERVLET:</th><td>default</td></tr>
> </table>
>
> </body>
> </html>
>
> at org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:835)
> at org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:548)
> at org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:507)
> at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1193)
> at org.apache.solr.client.solrj.impl.BaseHttpClusterStateProvider.fetchLiveNodes(BaseHttpClusterStateProvider.java:227)
> at org.apache.solr.client.solrj.impl.BaseHttpClusterStateProvider.init(BaseHttpClusterStateProvider.java:63)
> at org.apache.solr.client.solrj.impl.Http2ClusterStateProvider.<init>(Http2ClusterStateProvider.java:32)
> at org.apache.solr.client.solrj.impl.CloudHttp2SolrClient$Builder.build(CloudHttp2SolrClient.java:392) ... 113 common frames omitted {code}
> when Http2ClusterStateProvider is trying to get live nodes, builder build() method that creates initialClient instanse to get list of nodes, ignores base authentication string provided in httpClient instance:
> protected SolrClient getSolrClient(String baseUrl) {
> return new Http2SolrClient.Builder(baseUrl).withHttpClient(httpClient).build();
> }
> httpClient basicAuthAuthorizationStr lost here - field is not used in build() method.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org