小编J.A*_*lex的帖子

设置“solr.allowPaths”时,Apache Solr 云备份出现路径问题

我正在尝试备份 solr 云集合。Solr 和 Zookeeper 在 Docker 容器中运行。有3个solr(使用端口:8981,8982,8983)和3个ZKs容器正在运行。我将 docker 卷传递给 solr 容器

volumes:
    - solr_backups:/solr-backups/storage
Run Code Online (Sandbox Code Playgroud)

在 Dockerfile 中,构建并给出了文件夹chmod 777。因此,所有 solr 容器都会将该文件夹视为网络共享(我假设)。

执行中

$ curl "localhost:8981/solr/admin/collections?action=BACKUP&name=test1&collection=myColl&location=/solr-backups/storage"
Run Code Online (Sandbox Code Playgroud)

返回以下内容

...
 "failure":{
    "172.19.0.22:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
Error from server at http://172.19.0.22:8983/solr: 
Failed to backup core=myColl_shard1_replica_n1 because org.apache.solr.common.SolrException: 
Path /solr-backups/storage/test1 must be relative to SOLR_HOME, SOLR_DATA_HOME coreRootDirectory. 
Set system property 'solr.allowPaths' to add other allowed paths."},
  "Operation backup caused exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: 
Could not backup all shards",
  "exception":{
    "msg":"Could not backup all shards",
    "rspCode":500},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"], …
Run Code Online (Sandbox Code Playgroud)

solr backups solrcloud docker docker-volume

5
推荐指数
1
解决办法
2529
查看次数

标签 统计

backups ×1

docker ×1

docker-volume ×1

solr ×1

solrcloud ×1