Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr running on Https - SolrJ Connection issue

Tags:

https

solr

solrj

Am running Solr in Https(8443) port on top of tomcat, How can i access that solr using solrj client, I can see only CommonsHttpSolrServer is availble,

Please suggest is there any way to access the https port enabled solr using SolrJ?.

like image 469
Kalidoss.M Avatar asked Jan 30 '12 18:01

Kalidoss.M


1 Answers

Solrj internally uses Apache Http Client. When using CommonsHttpSolrServer it will create one & use it, if you are not providing it with one.

In this case since you need support for SSL you could provide your own SSL configured HttpClient to CommonsHttpSolrServer constructor. Check its API that accepts HttpClient.

CommonsHttpSolrServer(String solrServerUrl, HttpClient sslHttpClient, ...

You can see the following guide, on how to create SSL enabled http client SSL Guide.

This should help.

like image 136
mailboat Avatar answered Oct 14 '22 10:10

mailboat