You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Timothy Potter (Jira)" <ji...@apache.org> on 2022/02/08 00:35:00 UTC

[jira] [Resolved] (SOLR-15587) Replicas end up with base_url as http on client side even if cluster state says https when using the HttpClusterStateProvider

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

Timothy Potter resolved SOLR-15587.
-----------------------------------
    Resolution: Fixed

> Replicas end up with base_url as http on client side even if cluster state says https when using the HttpClusterStateProvider
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-15587
>                 URL: https://issues.apache.org/jira/browse/SOLR-15587
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 8.8, 8.8.1, 8.8.2, 8.9, 8.10, 8.11, 8.10.1, 8.11.1
>            Reporter: Timothy Potter
>            Assignee: Timothy Potter
>            Priority: Blocker
>             Fix For: 9.0, 8.11.2
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> Assuming you have a SolrCloud cluster with TLS enabled and are instantiating a CloudSolrClient using a Solr URL vs. ZK connection string, then the changes made for SOLR-12182 in 8.8.0 have introduced a bug where the {{base_url}} for replicas in the {{ClusterState}} returned by the {{HttpClusterStateProvider}} have url scheme {{http}} instead of {{https}} when the global singleton {{UrlScheme.INSTANCE}} is not set to {{https}}. This does NOT impact {{ClusterState}} returned by the {{ZkClusterStateProvider}} because the {{ZkStateReader}} calls {{UrlScheme.INSTANCE.setUrlScheme("https")}}.
> The easiest work-around for now is for client applications to call:
> {code}
> UrlScheme.INSTANCE.setUrlScheme(UrlScheme.HTTPS);
> {code}
> Before creating SolrJ client objects such as CloudSolrClient.
> I think the proper fix would be to call putIfAbsent in Replica ctor:
> {code}
>     propMap.putIfAbsent(BASE_URL_PROP, UrlScheme.INSTANCE.getBaseUrlForNodeName(this.nodeName));
> {code}
> but need to run all existing tests and create a new unit test for this situation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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