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 Scott Carlson <sc...@gmail.com> on 2013/03/06 15:54:10 UTC

How to configure SolrCloud over HTTPS. Did I find a bug?

It looks like to configure my SolrCloud server as an HTTPS endpoint, I need
to update the solr.xml as such:
host="https://${jboss.node.name:}" hostPort="8443"

When I try this, it fails registering with the zookeeper.
ERROR [SolrCore] null:java.lang.IllegalArgumentException: Invalid path
string "/live_nodes/https://mynode:8443_solr"

I tracked it down to this method in ZkController.
    private String getHostAddress(String host) throws IOException {
        if (host == null) {
...
          host = "http://" + hostaddress;
        } else {
          Matcher m = URL_PREFIX.matcher(host);
          if (m.matches()) {
            String prefix = m.group(1);
            host = prefix + host;
          } else {
            host = "http://" + host;
          }
        }

        return host;
      }

The returned value from getHostAddress() is https://https://mynode.
I think the correct code should just be:
          if (!m.matches()) {
            host = "http://" + host;
          }


Am I on the right track and I should log this issue as bug, or is there a
different way to configure this that I'm not seeing.

Thanks

Re: How to configure SolrCloud over HTTPS. Did I find a bug?

Posted by Mark Miller <ma...@gmail.com>.
On Mar 6, 2013, at 6:54 AM, Scott Carlson <sc...@gmail.com> wrote:

> Am I on the right track and I should log this issue as bug,

Might as well - seems like it could be improved.

> or is there a
> different way to configure this that I'm not seeing.

I think there might be - I remember someone saying they set this up before. Don't remember the details at the moment though.

- Mark