You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by "Ammunnikutty, Shameer" <Sh...@autozone.com> on 2021/10/01 07:00:10 UTC
Solr 8.9.0 GCSBackupRepository Options throwing
ClassNotFoundException
Hi,
We are using Solr 8.9.0 in cloud mode . We are trying to backing up the collection to GCS bucket using GCSRepository Option . We have configured Solr.xml and solrconfig.xml as below.
We are getting below Error:
{
"responseHeader":{
"status":500,
"QTime":5},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","java.lang.ClassNotFoundException"],
"msg":"Error loading class 'org.apache.solr.gcs.GCSBackupRepository'",
"trace":"org.apache.solr.common.SolrException: Error loading class 'org.apache.solr.gcs.GCSBackupRepository'\n\tat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:554)\n\tat org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:612)\n\tat org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:607)\n\tat org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:599)\n\tat org.apache.solr.core.backup.repository.BackupRepositoryFactory.newInstance(BackupRepositoryFactory.java:75)\n\tat org.apache.solr.core.CoreContainer.newBackupRepository(CoreContainer.java:281)\n\tat org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.lambda$static$33(CollectionsHandler.java:1115)\n\tat org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.execute(CollectionsHandler.java:1453)\n\tat org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:285)\n\tat org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:257)\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:216)\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:836)\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:800)\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:545)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:357)\n\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)\n\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)\n\tat org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:516)\n\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)\n\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)\n\tat org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: java.lang.ClassNotFoundException: org.apache.solr.gcs.GCSBackupRepository\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:382)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:418)\n\tat java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:351)\n\tat java.lang.Class.forName0(Native Method)\n\tat java.lang.Class.forName(Class.java:348)\n\tat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:538)\n\t... 52 more\n",
"code":500}}
Back up command:
https://<IP>:<Port>/solr/admin/collections?action=BACKUP&name=non-app-backup&repository=gcs_backup&collection=non-app<https://%3cIP%3e:%3cPort%3e/solr/admin/collections?action=BACKUP&name=non-app-backup&repository=gcs_backup&collection=non-app>
Added Solr.xml below code snippet.
<backup>
<repository name="gcs_backup" class="org.apache.solr.gcs.GCSBackupRepository" default="false">
<str name="gcsBucket">solrBackups</str>
<str name="gcsCredentialPath">/local/path/to/credential/file</str>
<str name="location">/default/gcs/backup/location</str>
<int name="gcsClientMaxRetries">5</int>
<int name="gcsClientHttpInitialHttpDelayMillis">1500</int>
<double name="gcsClientHttpRetryDelayMultiplier">1.5</double>
<int name="gcsClientMaxHttpRetryDelayMillis">10000</int>
</repository>
</backup>
Added in our collection config Solrconfig.xml Below library path:
<lib dir="${solr.install.dir:../../../..}/contrib/gcs-repository/lib" regex=".*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-gcs-repository-\d.*\.jar" />
-Shameer
Re: Solr 8.9.0 GCSBackupRepository Options throwing ClassNotFoundException
Posted by Houston Putman <ho...@gmail.com>.
try using the following instead for your libs in solr.xml:
<str name="sharedLib">${solr.install.dir}/contrib/gcs-repository/lib,${solr.install.dir}/dist</str>
You can also replace ${solr.install.dir} with the actual location.
On Fri, Oct 1, 2021 at 12:50 PM Ammunnikutty, Shameer <
Shameer.anthupar@autozone.com> wrote:
> Hi,
>
> We are using Solr 8.9.0 in cloud mode . We are trying to backing up the
> collection to GCS bucket using GCSRepository Option . We have configured
> Solr.xml and solrconfig.xml as below.
>
> We are getting below Error:
>
>
> {
> "responseHeader":{
> "status":500,
> "QTime":5},
> "error":{
> "metadata":[
> "error-class","org.apache.solr.common.SolrException",
> "root-error-class","java.lang.ClassNotFoundException"],
> "msg":"Error loading class 'org.apache.solr.gcs.GCSBackupRepository'",
> "trace":"org.apache.solr.common.SolrException: Error loading class
> 'org.apache.solr.gcs.GCSBackupRepository'\n\tat
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:554)\n\tat
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:612)\n\tat
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:607)\n\tat
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:599)\n\tat
> org.apache.solr.core.backup.repository.BackupRepositoryFactory.newInstance(BackupRepositoryFactory.java:75)\n\tat
> org.apache.solr.core.CoreContainer.newBackupRepository(CoreContainer.java:281)\n\tat
> org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.lambda$static$33(CollectionsHandler.java:1115)\n\tat
> org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.execute(CollectionsHandler.java:1453)\n\tat
> org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:285)\n\tat
> org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:257)\n\tat
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:216)\n\tat
> org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:836)\n\tat
> org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:800)\n\tat
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:545)\n\tat
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)\n\tat
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:357)\n\tat
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)\n\tat
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)\n\tat
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)\n\tat
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\n\tat
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n\tat
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\n\tat
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n\tat
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)\n\tat
> org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)\n\tat
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)\n\tat
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)\n\tat
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat
> org.eclipse.jetty.server.Server.handle(Server.java:516)\n\tat
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)\n\tat
> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)\n\tat
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)\n\tat
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)\n\tat
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\n\tat
> org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)\n\tat
> org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)\n\tat
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)\n\tat
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)\n\tat
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)\n\tat
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135)\n\tat
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)\n\tat
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)\n\tat
> java.lang.Thread.run(Thread.java:748)\nCaused by:
> java.lang.ClassNotFoundException:
> org.apache.solr.gcs.GCSBackupRepository\n\tat
> java.net.URLClassLoader.findClass(URLClassLoader.java:382)\n\tat
> java.lang.ClassLoader.loadClass(ClassLoader.java:418)\n\tat java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)\n\tat
> java.lang.ClassLoader.loadClass(ClassLoader.java:351)\n\tat
> java.lang.Class.forName0(Native Method)\n\tat
> java.lang.Class.forName(Class.java:348)\n\tat
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:538)\n\t...
> 52 more\n",
> "code":500}}
>
>
>
>
>
> Back up command:
>
> https://
> <IP>:<Port>/solr/admin/collections?action=BACKUP&name=non-app-backup&repository=gcs_backup&collection=non-app<https://
> %3cIP%3e:%3cPort%3e/solr/admin/collections?action=BACKUP&name=non-app-backup&repository=gcs_backup&collection=non-app>
>
>
> Added Solr.xml below code snippet.
>
> <backup>
> <repository name="gcs_backup"
> class="org.apache.solr.gcs.GCSBackupRepository" default="false">
> <str name="gcsBucket">solrBackups</str>
> <str name="gcsCredentialPath">/local/path/to/credential/file</str>
> <str name="location">/default/gcs/backup/location</str>
>
> <int name="gcsClientMaxRetries">5</int>
> <int name="gcsClientHttpInitialHttpDelayMillis">1500</int>
> <double name="gcsClientHttpRetryDelayMultiplier">1.5</double>
> <int name="gcsClientMaxHttpRetryDelayMillis">10000</int>
> </repository>
> </backup>
>
> Added in our collection config Solrconfig.xml Below library path:
>
>
> <lib dir="${solr.install.dir:../../../..}/contrib/gcs-repository/lib"
> regex=".*\.jar" />
> <lib dir="${solr.install.dir:../../../..}/dist/"
> regex="solr-gcs-repository-\d.*\.jar" />
>
>
> -Shameer
>