繁体   English   中英

Solr 5 SSL和bin / post

[英]Solr 5 SSL and bin/post

我遵循Linux下EnablingSSL上的Solr手册,使用SSL设置了Solr 5.4.1(标准Solr,无SolrCloud / Zookeeper)。

我可以通过浏览器和https成功连接到Solr管理员页面。

但是,无法再使用Solrs装箱/张贴工具。 例如,下面是我的小脚本,该脚本用于删除名为“ mycollection”的Solr集合中的所有文档:

bin/post -url https://localhost:8983/solr/mycollection/update -d "<delete><query>*:*</query></delete>"

我收到以下异常:

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

问题是:如何在启用SSL的情况下使用Solr的bin / post工具?

编辑:我可以用curl完成上述操作,下面的命令成功。 但是,这个问题是关于从Solr获得post工具与ssl一起使用的。

curl -k https://localhost:8983/solr/mycollection/update?commit=true -H Content-Type: text/xml --data-binary '<delete><query>*:*</query></delete>'

即使您在URL参数中指定了HTTPS,该工具也会使用使用“ http:// ..”而不是所需的“ https:// ..”的cURL。 就目前的版本6.1.0而言,就我所知,仍然无法对其进行任何处理。

由于Solr不允许同时运行HTTP和HTTPS,因此无法将bin / post-tool与SSL一起使用。

可能的解决方法是使用cURL或使用post.jar,如https://cwiki.apache.org/confluence/display/solr/Enabling+SSL中所示

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM