Solr 6.6.6 集合还原导致单节点问题
Solr 6.6.6 Collection Restore causing problems from single node
我有 2 个节点 SolrCloud 设置。版本为 6.6.6。我从其他有 4 个集合分片的实例中获取了 Solr 备份。
我已经使用以下命令取回,效果很好
http://10.11.31.11:8983/solr/admin/collections?action=BACKUP&name=hms&collection=collection1&location=/tmp/solr_backup&async=1001
之后我将备份复制到Solr Cloud的一个节点并执行以下命令进行恢复。
http://10.11.31.12:8983/solr/admin/collections?action=RESTORE&name=hms&location=/home/hduser/Documents/search/data&collection=newCollection&maxShardsPerNode=4&replicationFactor=2&autoAddReplicas=true
执行上述命令时出现以下异常
<response><lst name="responseHeader"><int name="status">500</int><int name="QTime">60</int></lst><str name="Operation restore caused exception:">org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms</str><lst name="exception"><str name="msg">Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms</str><int name="rspCode">500</int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">org.apache.solr.common.SolrException</str></lst><str name="msg">Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms</str><str name="trace">org.apache.solr.common.SolrException: Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms
at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:300)
at org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:237)
at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:215)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
at org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:749)
at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:730)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:510)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:534)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)
</str><int name="code">500</int></lst></response>
然后我将备份数据复制到第二个节点,路径也与第一个节点完全相同,然后重新执行恢复命令。作业成功。
这是否意味着对于每个备份,都必须使用完全相同的路径在 Solr 的所有节点上复制备份,或者这是一个错误?
我期待 Solr 应该允许从单个节点恢复集合,然后它应该自己复制碎片?不是吗?
您要从 has to be available on all the servers 还原的相同路径的目录。该路径被假定为在服务器上的公共位置可用的网络共享。
location
The location on the shared drive for the restore command to read from.
来自上面给出的文档中的示例:
..&name=myBackupName&location=/path/to/my/shared/drive&...
我有 2 个节点 SolrCloud 设置。版本为 6.6.6。我从其他有 4 个集合分片的实例中获取了 Solr 备份。
我已经使用以下命令取回,效果很好
http://10.11.31.11:8983/solr/admin/collections?action=BACKUP&name=hms&collection=collection1&location=/tmp/solr_backup&async=1001
之后我将备份复制到Solr Cloud的一个节点并执行以下命令进行恢复。
http://10.11.31.12:8983/solr/admin/collections?action=RESTORE&name=hms&location=/home/hduser/Documents/search/data&collection=newCollection&maxShardsPerNode=4&replicationFactor=2&autoAddReplicas=true
执行上述命令时出现以下异常
<response><lst name="responseHeader"><int name="status">500</int><int name="QTime">60</int></lst><str name="Operation restore caused exception:">org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms</str><lst name="exception"><str name="msg">Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms</str><int name="rspCode">500</int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">org.apache.solr.common.SolrException</str></lst><str name="msg">Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms</str><str name="trace">org.apache.solr.common.SolrException: Couldn't restore since doesn't exist: file:///home/user12/Documents/search/data/hms
at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:300)
at org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:237)
at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:215)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
at org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:749)
at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:730)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:510)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:534)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)
</str><int name="code">500</int></lst></response>
然后我将备份数据复制到第二个节点,路径也与第一个节点完全相同,然后重新执行恢复命令。作业成功。
这是否意味着对于每个备份,都必须使用完全相同的路径在 Solr 的所有节点上复制备份,或者这是一个错误?
我期待 Solr 应该允许从单个节点恢复集合,然后它应该自己复制碎片?不是吗?
您要从 has to be available on all the servers 还原的相同路径的目录。该路径被假定为在服务器上的公共位置可用的网络共享。
location
The location on the shared drive for the restore command to read from.
来自上面给出的文档中的示例:
..&name=myBackupName&location=/path/to/my/shared/drive&...