使用共享文件夹时,solrcloud备份问题

时间:2018-07-16 19:04:06

标签: solr backup solrcloud

亲爱的需要您的帮助, 我有3个分片的solr服务器 我要求使用以下请求进行备份

http://prod-01:8983/solr/admin/collections?action=BACKUP&name=SourcesIndexBackup&collection=SourcesIndex&location=file:////prod-01//f//solr//backup//&async=66

服务器:

prod-01具有Shard2副本

prod-02具有shard1副本

prod-03具有shard3复制副本

当我使用:p检查状态时

http://10.0.1.4:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=67

结果如下:

 {
  "responseHeader":{
    "status":0,
    "QTime":1},
  "success":{
    "10.0.1.4:8983_solr":{
      "responseHeader":{
        "status":0,
        "QTime":0}},
    "10.0.1.5:8983_solr":{
      "responseHeader":{
        "status":0,
        "QTime":0}},
    "10.0.1.7:8983_solr":{
      "responseHeader":{
        "status":0,
        "QTime":0}}},
  "6734175562642099":{
    "responseHeader":{
      "status":0,
      "QTime":0},
    "STATUS":"failed",
    "Response":"Failed to backup core=SourcesIndex_shard1_replica_n1 because org.apache.solr.common.SolrException: Directory to contain snapshots doesn't exist: file://sabr-prod-01/f/solr/backup/SourcesIndexBackup"},
  "6734175562231000":{
    "responseHeader":{
      "status":0,
      "QTime":0},
    "STATUS":"completed",
    "Response":"TaskId: 6734175562231000 webapp=null path=/admin/cores params={core=SourcesIndex_shard2_replica_n1&async=6734175562231000&qt=/admin/cores&name=shard2&action=BACKUPCORE&location=file://sabr-prod-01/f/solr/backup/SourcesIndexBackup&wt=javabin&version=2} status=0 QTime=0"},
  "6734175562508700":{
    "responseHeader":{
      "status":0,
      "QTime":0},
    "STATUS":"failed",
    "Response":"Failed to backup core=SourcesIndex_shard3_replica_n1 because org.apache.solr.common.SolrException: Directory to contain snapshots doesn't exist: file://sabr-prod-01/f/solr/backup/SourcesIndexBackup"},
  "status":{
    "state":"completed",
    "msg":"found [67] in completed tasks"}}

仅备份服务器prod-01上的shared2,

当我删除备份文件夹并通过prod-02运行命令

http://prod-02:8983/solr/admin/collections?action=BACKUP&name=SourcesIndexBackup&collection=SourcesIndex&location=file:////prod-01//f//solr//backup//&async=66

然后我得到以下结果

{
  "responseHeader":{
    "status":500,
    "QTime":6},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"specified location file:////sabr-prod-01//f//solr//backup// does not exist.",
    "trace":"org.apache.solr.common.SolrException: specified location file:////sabr-prod-01//f//solr//backup// does not exist.\r\n\tat org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.lambda$static$90(CollectionsHandler.java:767)\r\n\tat org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.execute(CollectionsHandler.java:936)\r\n\tat org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:223)\r\n\tat org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:210)\r\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177)\r\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:745)\r\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:726)\r\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:507)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:378)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:322)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\r\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\r\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:534)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\r\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\r\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\r\n\tat org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\r\n\tat java.base/java.lang.Thread.run(Thread.java:844)\r\n",
    "code":500}}

这意味着它无法访问共享文件夹。

注意:

1-我禁用了防火墙

2-我向所有人共享文件夹授予“完全控制”权限。

请帮助我完成这个任务。

我还能做什么

1 个答案:

答案 0 :(得分:0)

您正在尝试将三个分片备份到相同的(共享目录),请不要这样做。如果您对每个主机使用本地目录,它应该可以工作。所以:

  1. 在每个主机中创建一个备份目标,命名为相同
  2. 现在使用该目标(将寻址每个主机的本地目录)
  3. 我记得在将备份用于Solr 6之前我遇到了一些问题,这些文档并不完美。但是我认为应该在较新的版本中解决问题。