簡體   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