[ https://issues.apache.org/jira/browse/SOLR-14575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17213455#comment-17213455 ]
Jan Høydahl edited comment on SOLR-14575 at 10/13/20, 10:17 PM: ---------------------------------------------------------------- {quote}You can help us reproducing by downloading a fresh version of Solr (e.g. 8.6.0), and trying to reproduce on a minimal collection with minimal security.json config. If you are able to provide a step by step reproduction instruction from scratch, then others may be able to debug and see what is happening. {quote} This is what I wrote June 14th, and you have still not provided such information. Here is a template that, using Docker, restores a collection in a cluster with BasicAuth enabled. It works fine here. Are you able to modify the example in a way that triggers the behavior your're seeing? {noformat} # Create a network docker network create sn # Start node 1 docker run --rm --name solr1 -v $(pwd):/var/solr/data/v -d --network sn -p 8983:8983 solr:8.6 -p 8983 -h solr1 -c # Start node 2 docker run --rm --name solr2 -v $(pwd):/var/solr/data/v -d --network sn -p 8984:8984 solr:8.6 -p 8984 -h solr2 -z solr1:9983 # Create a collection docker exec solr1 solr create -c c -replicationFactor 2 # Backup collection docker exec solr1 curl http://localhost:8983/solr/admin/collections?action=BACKUP&name=b&collection=c&location=/var/solr/data/v ls -l b # Delete collection docker exec solr1 solr delete -c c # Upload security.json cat <<EOF >security.json { "authentication":{ "blockUnknown": true, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="} }, "authorization":{ "class":"solr.RuleBasedAuthorizationPlugin", "permissions":[{"name":"security-edit","role":"admin"}], "user-role":{"solr":"admin"} } } EOF docker exec solr1 solr zk cp /var/solr/data/v/security.json zk:/security.json -z localhost:9983 # Restore collection docker exec solr1 curl -u solr:SolrRocks http://localhost:8983/solr/admin/collections?action=RESTORE&name=b&collection=c&location=/var/solr/data/v # Verify restore docker exec solr1 curl -u solr:SolrRocks http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS # Cleanup docker stop solr1 solr2 docker network rm sn {noformat} was (Author: janhoy): {quote}You can help us reproducing by downloading a fresh version of Solr (e.g. 8.6.0), and trying to reproduce on a minimal collection with minimal security.json config. If you are able to provide a step by step reproduction instruction from scratch, then others may be able to debug and see what is happening. {quote} This is what I wrote June 14th, and you have still not provided such information. Here is a template that, using Docker, restores a collection in a cluster with BasicAuth enabled. It works fine here. Are you able to modify the example in a way that triggers the behavior your're seeing? {noformat} # Create a network docker network create sn # Start node 1 docker run --rm --name solr1 -v $(pwd):/var/solr/data/v -d --network sn -p 8983:8983 solr:8.6 -p 8983 -h solr1 -c # Start node 2 docker run --rm --name solr2 -v $(pwd):/var/solr/data/v -d --network sn -p 8984:8984 solr:8.6 -p 8984 -h solr2 -z solr1:9983 # Create a collection docker exec solr1 solr create -c c -replicationFactor 2 # Backup collection docker exec solr1 curl http://localhost:8983/solr/admin/collections?action=BACKUP&name=b&collection=c&location=/var/solr/data/v ls -l b # Delete collection docker exec solr1 solr delete -c c # Upload security.json cat <<EOF >security.json { "authentication":{ "blockUnknown": true, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="} }, "authorization":{ "class":"solr.RuleBasedAuthorizationPlugin", "permissions":[{"name":"security-edit","role":"admin"}], "user-role":{"solr":"admin"} } } EOF docker exec solr1 solr zk cp /var/solr/data/v/security.json zk:/security.json -z localhost:9983 # Restore collection docker exec solr1 curl -u solr:SolrRocks http://localhost:8983/solr/admin/collections?action=RESTORE&name=b&collection=c&location=/var/solr/data/v # Verify restore docker exec solr1 curl -u solr:SolrRocks http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS {noformat} > Solr restore is failing when basic authentication is enabled > ------------------------------------------------------------ > > Key: SOLR-14575 > URL: https://issues.apache.org/jira/browse/SOLR-14575 > Project: Solr > Issue Type: Bug > Components: Backup/Restore > Affects Versions: 8.2 > Reporter: Yaswanth > Priority: Major > > Hi Team, > I was testing backup / restore for solrcloud and its failing exactly when I > am trying to restore a successfully backed up collection. > I am using solr 8.2 with basic authentication enabled and then creating a 2 > replica collection. When I run the backup like > curl -u xxx:xxx -k > '[https://x.x.x.x:8080/solr/admin/collections?action=BACKUP&name=test&collection=test&location=/solrdatabkup'|https://x.x.x.x:8080/solr/admin/collections?action=BACKUP&name=test&collection=test&location=/solrdatabkup%27] > it worked fine and I do see a folder was created with the collection name > under /solrdatabackup > But now when I deleted the existing collection and then try running restore > api like > curl -u xxx:xxx -k > '[https://x.x.x.x:8080/solr/admin/collections?action=RESTORE&name=test&collection=test&location=/solrdatabkup'|https://x.x.x.x:8080/solr/admin/collections?action=BACKUP&name=test&collection=test&location=/solrdatabkup%27] > its throwing an error like > { > "responseHeader":{ > "status":500, > "QTime":457}, > "Operation restore caused > *exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: > ADDREPLICA failed to create replica",* > "exception":{ > "msg":"ADDREPLICA failed to create replica", > "rspCode":500}, > "error":{ > "metadata":[ > "error-class","org.apache.solr.common.SolrException", > "root-error-class","org.apache.solr.common.SolrException"], > "msg":"ADDREPLICA failed to create replica", > "trace":"org.apache.solr.common.SolrException: ADDREPLICA failed to create > replica\n\tat > org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:53)\n\tat > > org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:280)\n\tat > > org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:252)\n\tat > > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)\n\tat > > org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:820)\n\tat > org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:786)\n\tat > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:546)\n\tat > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:423)\n\tat > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:350)\n\tat > > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)\n\tat > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)\n\tat > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)\n\tat > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1678)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)\n\tat > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)\n\tat > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:152)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat > > org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat > org.eclipse.jetty.server.Server.handle(Server.java:505)\n\tat > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)\n\tat > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)\n\tat > > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)\n\tat > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat > org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:427)\n\tat > > org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:321)\n\tat > > org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:159)\n\tat > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat > org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)\n\tat > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\n\tat > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\n\tat > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\n\tat > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)\n\tat > > org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:781)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917)\n\tat > java.base/java.lang.Thread.run(Thread.java:834)\n", > "code":500}} > I believe this might be a bug, can someone please confirm the same? > Note: I already posted the same to solr-user and haven't got any response. > Thanks, -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org