You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tali Finelt <TA...@il.ibm.com> on 2015/01/08 14:25:58 UTC

Solr with Tomcat - enabling SSL problem

Hi,

I am using Solr 4.10.2 with tomcat and embedded Zookeeper.
I followed 
https://cwiki.apache.org/confluence/display/solr/Enabling+SSL#EnablingSSL-SolrCloud 
to enable SSL.

I am currently doing the following:

Starting tomcat
Running:
../scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd put 
/clusterprops.json '{"urlScheme":"https"}' 
Restarting tomcat
Accessing Solr from my client using 
org.apache.solr.client.solrj.impl.CloudSolrServer.

And this works. 
If I don't restart tomcat again after running zkcli.sh, I get the 
following error:
        "IOException occured when talking to server at: 
http://<ip>:<port>/solr/...." (http, not https).

Is it possible to do this without the second restart?
Thanks,
Tali

Re: Solr with Tomcat - enabling SSL problem

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/8/2015 8:50 AM, Tali Finelt wrote:
> Thanks for clarifying this. 
> Is there a different way to set the embedded Zookeeper urlScheme parameter 
> before ever starting tomcat? (some configuration file etc.)
> This way I won't need to start tomcat twice.

Most of the cloud options can be specified with system properties on the
java commandline.  I believe you would use this:

|-DurlScheme=https

I had thought maybe urlScheme could be specified in solr.xml, but I
can't find any examples, so it might not be possible.

Thanks,
Shawn

|

Re: Solr with Tomcat - enabling SSL problem

Posted by Tali Finelt <TA...@il.ibm.com>.
Hi Shawn,

Thanks for clarifying this. 
Is there a different way to set the embedded Zookeeper urlScheme parameter 
before ever starting tomcat? (some configuration file etc.)
This way I won't need to start tomcat twice.

Thanks,
Tali





From:   Shawn Heisey <ap...@elyograg.org>
To:     solr-user@lucene.apache.org
Date:   08/01/2015 05:14 PM
Subject:        Re: Solr with Tomcat - enabling SSL problem



On 1/8/2015 6:25 AM, Tali Finelt wrote:
> I am using Solr 4.10.2 with tomcat and embedded Zookeeper.
> I followed 
> 
https://cwiki.apache.org/confluence/display/solr/Enabling+SSL#EnablingSSL-SolrCloud 

> to enable SSL.
> 
> I am currently doing the following:
> 
> Starting tomcat
> Running:
> ../scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd put 
> /clusterprops.json '{"urlScheme":"https"}' 
> Restarting tomcat
> Accessing Solr from my client using 
> org.apache.solr.client.solrj.impl.CloudSolrServer.
> 
> And this works. 
> If I don't restart tomcat again after running zkcli.sh, I get the 
> following error:
>         "IOException occured when talking to server at: 
> http://<ip>:<port>/solr/...." (http, not https).
> 
> Is it possible to do this without the second restart?

Solr will only read parameters like the urlScheme at startup.  Once it's
running, that information is never accessed again, so in order to get it
to change those parameters, a restart is required.

It might be possible to change the code so a re-read of these parameters
takes place ... but writing code to make fundamental changes to program
operation can be risky.  Restarting the program is much safer.

Thanks,
Shawn



Re: Solr with Tomcat - enabling SSL problem

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/8/2015 6:25 AM, Tali Finelt wrote:
> I am using Solr 4.10.2 with tomcat and embedded Zookeeper.
> I followed 
> https://cwiki.apache.org/confluence/display/solr/Enabling+SSL#EnablingSSL-SolrCloud 
> to enable SSL.
> 
> I am currently doing the following:
> 
> Starting tomcat
> Running:
> ../scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd put 
> /clusterprops.json '{"urlScheme":"https"}' 
> Restarting tomcat
> Accessing Solr from my client using 
> org.apache.solr.client.solrj.impl.CloudSolrServer.
> 
> And this works. 
> If I don't restart tomcat again after running zkcli.sh, I get the 
> following error:
>         "IOException occured when talking to server at: 
> http://<ip>:<port>/solr/...." (http, not https).
> 
> Is it possible to do this without the second restart?

Solr will only read parameters like the urlScheme at startup.  Once it's
running, that information is never accessed again, so in order to get it
to change those parameters, a restart is required.

It might be possible to change the code so a re-read of these parameters
takes place ... but writing code to make fundamental changes to program
operation can be risky.  Restarting the program is much safer.

Thanks,
Shawn