I setup Solr 5.4.1 (standard Solr, no SolrCloud/Zookeeper) with SSL following the Solr manual at EnablingSSL under Linux.
I can successfully connect through a browser and https to the Solr admin page.
However, using Solrs bin/post tool is not possible anymore. For instance, below is my small script to delete all documents from a Solr collection called "mycollection":
bin/post -url https://localhost:8983/solr/mycollection/update -d "<delete><query>*:*</query></delete>"
I am getting the following Exception:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The question is: How can I use the bin/post tool of Solr with SSL enabled?
EDIT: I can get the above operation done with curl, the command below succeeds. However, this question is about getting the post tool from Solr to work with ssl.
curl -k https://localhost:8983/solr/mycollection/update?commit=true -H Content-Type: text/xml --data-binary '<delete><query>*:*</query></delete>'
The tool uses a cURL using "http://.." and not the desired "https://.." - even though you specify HTTPS in the URL-parameter. As of the current version, 6.1.0, it is still not possible to do anything about it - as far as I know.
As Solr doesn't allow to run both HTTP and HTTPS, it is not possible to use the bin/post-tool with SSL.
Possible work-arounds is to use cURL or by using the post.jar, as shown in https://cwiki.apache.org/confluence/display/solr/Enabling+SSL
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.