[ 
https://issues.apache.org/jira/browse/SOLR-11904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17338667#comment-17338667
 ] 

ASF subversion and git services commented on SOLR-11904:
--------------------------------------------------------

Commit d316946e6bef914b21e5d33c3b85ab52e1f84342 in solr's branch 
refs/heads/main from Timothy Potter
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=d316946 ]

SOLR-11904: Mark ReplicationHandler's polling thread as a Solr server thread so 
the PKI Interceptor is activated to   allow PULL replicas to replicate from 
security-enabled leaders (#110)



> IndexFetcher Http client requests are unauthenticated
> -----------------------------------------------------
>
>                 Key: SOLR-11904
>                 URL: https://issues.apache.org/jira/browse/SOLR-11904
>             Project: Solr
>          Issue Type: Bug
>          Components: Authentication, replication (java), SolrCloud
>    Affects Versions: 7.2
>         Environment: Three servers on solrcloud. One collection with 2 shards 
> and 3 tlog replicas on each shard.
>            Reporter: Kyriacos Christoudias
>            Assignee: Timothy Potter
>            Priority: Major
>              Labels: BasicAuth, Security
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Whenever the IndexFetcher class is called for recovery or replication the 
> HTTP requests are unauthenticated resulting in 401 errors:
>  
> {code:java}
> 2018-01-25 13:16:22.538 WARN  (indexFetcher-25-thread-1) [c:myCollection 
> s:shard1 r:core_node3 x:myCollection_shard1_replica_t1] o.a.s.h.IndexFetcher 
> Master at: http://server1:8983/solr/myCollection_shard1_replica_t4/ is not 
> available. Index fetch failed by exception: 
> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error 
> from server at http://server1:8983/solr/myCollection_shard1_replica_t4: 
> Expected mime type application/octet-stream but got text/html. <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
> <title>Error 401 Unauthorized request, Response code: 401</title>
> </head>
> <body><h2>HTTP ERROR 401</h2>
> <p>Problem accessing /solr/myCollection_shard1_replica_t4/replication. Reason:
> <pre>    Unauthorized request, Response code: 401</pre></p>
> </body>
> </html>
> {code}
>  
> I checked the source code and before creating a new HTTP client in 
> IndexFetcher it tries to get http auth user/password from initArgs but those 
> properties are always null, event if I set them in the replication handler 
> (under the slave tag).
>  
> {code:java}
>  <lst name="slave">
> <str name="masterUrl">http://remote_host:port/solr/core_name/replication</str>
>  <str name="httpBasicAuthUser">username</str>
> <str name="httpBasicAuthPassword">password</str>
> </lst>
> {code}
>   
> I downloaded the solr source code and entered the username and password 
> hardcoded, compiled the jar and everything was working fine. Before this I 
> used the logger to check the httpBasicAuthUser/httpBasicAuthPassword and 
> whenever IndexFetcher was called for recovery or replication these fields 
> were null.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to