You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexey Serba (JIRA)" <ji...@apache.org> on 2013/01/23 21:39:12 UTC
[jira] [Commented] (SOLR-3854) SolrCloud does not work with https
[ https://issues.apache.org/jira/browse/SOLR-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561070#comment-13561070 ]
Alexey Serba commented on SOLR-3854:
------------------------------------
I've uploaded another patch that I believe is less intrusive.
It touches only two places:
# host property parsing in ZkController
host property supports passing a scheme/protocol already, it just has a tiny bug in the parsing code
{code:title="ZkController"}
Matcher m = URL_PREFIX.matcher(host);
- if (m.matches()) {
- String prefix = m.group(1);
- host = prefix + host;
- } else {
+ if (!m.matches()) {
host = "http://" + host;
}
{code}
# I think Solr's distributed _shard_ paramater should support handling scheme/protocol as part of a shard address
{code:title="HttpShardHandler"}
for (int i=0; i<urls.size(); i++) {
- urls.set(i, httpShardHandlerFactory.scheme + urls.get(i));
+ String url = urls.get(i);
+ if (!URL_PREFIX.matcher(url).matches()) {
+ url = httpShardHandlerFactory.scheme + url;
+ }
+ urls.set(i, url);
}
{code}
With these two tiny fixes I've been able to run SolrCloud in SSL mode. When you start a node you should pass "-Dhost=https://localhost" parameter. Correct https addresses are saved in the Zk's cluster state, used in indexing in SolrCmdDistributor and passed to search handlers as a shard parameter. Am I missing something?
> SolrCloud does not work with https
> ----------------------------------
>
> Key: SOLR-3854
> URL: https://issues.apache.org/jira/browse/SOLR-3854
> Project: Solr
> Issue Type: Bug
> Reporter: Sami Siren
> Assignee: Sami Siren
> Fix For: 4.2, 5.0
>
> Attachments: SOLR-3854.patch, SOLR-3854.patch, SOLR-3854.patch
>
>
> There are a few places in current codebase that assume http is used. This prevents using https when running solr in cloud mode.
--
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