Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9197 Audit all solrconfig components and ensure that they work with the Config APIs
  3. SOLR-9354

ClusteringComponent added using Config API causes error when reloading the collection

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.0.1
    • 6.1
    • None
    • SolrCloud on Windows with ZooKeeper 3.4.8

    Description

      It is not possible to add a clustering search component when using the Config API.

      Command I used to add the clustering component:

      curl -k -u admin:admin https://solrserver:8443/solr/customer/config -H 'Content-type:application/json' -d '{ "add-searchcomponent": {"name":"clustering", "class": "solr.clustering.ClusteringComponent", "engine": [

      { "name":"lingo", "carrot.algorithm": "org.carrot2.clustering.lingo.LingoClusteringAlgorithm"}

      ,

      { "name":"stc", "carrot.algorithm": "org.carrot2.clustering.stc.STCClusteringAlgorithm"}

      ]} }'

      Error I received from the curl command:

      ==============

      {
      "responseHeader":

      { "status":500, "QTime":30026}

      ,
      "errorMessages":["1 out of 2 the property overlay to be of version 7 within 30 seconds! Failed cores: https://solrserver:8443/solr/customer_shard1_replica1/\n"],
      "WARNING":"This response format is experimental. It is likely to change in the future.",
      "error":{
      "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
      "msg":"1 out of 2 the property overlay to be of version 7 within 30 seconds! Failed cores: https://solrserver:8443/solr/customer_shard1_replica1/",
      "trace":"org.apache.solr.common.SolrException: 1 out of 2 the property overlay to be of version 7 within 30 seconds! Failed cores: https://solrserver:8443/solr/customer_shard1_replica1/\r\n\tat org.apache.solr.handler.SolrConfigHandler.waitForAllReplicasState(SolrConfigHandler.java:710)\r\n\tat org.apache.solr.handler.SolrConfigHandler.access$600(SolrConfigHandler.java:91)\r\n\tat org.apache.solr.handler.SolrConfigHandler$Command.handleCommands(SolrConfigHandler.java:426)\r\n\tat org.apache.solr.handler.SolrConfigHandler$Command.handlePOST(SolrConfigHandler.java:266)\r\n\tat org.apache.solr.handler.SolrConfigHandler$Command.access$100(SolrConfigHandler.java:143)\r\n\tat org.apache.solr.handler.SolrConfigHandler.handleRequestBody(SolrConfigHandler.java:121)\r\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)\r\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2053)\r\n\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652)\r\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:460)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:229)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)\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:1160)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)\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:1092)\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.server.Server.handle(Server.java:518)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)\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.ssl.SslConnection.onFillable(SslConnection.java:186)\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.produceAndRun(ExecuteProduceConsume.java:246)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n",
      "code":500}}

      ==============

      In my Solr logs I can see the following error related to the clustering component:

      Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.apache.solr.common.util.NamedList
      at org.apache.solr.handler.clustering.ClusteringComponent.inform(ClusteringComponent.java:110)
      at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:675)
      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:751)

      I should mention that I do not get any errors if I specify only one clustering engine instead of a list of engines.

      Attachments

        Issue Links

          Activity

            People

              dweiss Dawid Weiss
              alexandre.drouin Alex D
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: