Hi,

when trying to install a new version of an existing package via the
Solr-CLI (Solr 9.5.0) we get the following error:

org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException:
Error from server at
http://localhost:8983/api/collections/my_collection/config/params/PKG_VERSIONS?omitHeader=true&wt=json&version=2.2:
Expected mime type in [application/json] but got text/plain. {
\"response\":{
\"znodeVersion\":1,
\"params\":{\"PKG_VERSIONS\":{
\"my_package\":\"0.8.4\",
\"\":{\"v\":4}}}}}

    at
org.apache.solr.client.solrj.impl.Http2SolrClient.checkContentType(Http2SolrClient.java:1012)
    at
org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:901)
    at
org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:614)
    at
org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:571)
    at
org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1194)
    at
org.apache.solr.packagemanager.PackageUtils.getJsonStringFromUrl(PackageUtils.java:162)
    at
org.apache.solr.packagemanager.PackageManager.getDeployedCollections(PackageManager.java:1101)
    at
org.apache.solr.packagemanager.RepositoryManager.install(RepositoryManager.java:354)
    at org.apache.solr.cli.PackageTool.runImpl(PackageTool.java:166)
    at org.apache.solr.cli.ToolBase.runTool(ToolBase.java:52)
    at org.apache.solr.cli.SolrCLI.main(SolrCLI.java:154)
   

The call to
http://localhost:8983/api/collections/my_collection/config/params/PKG_VERSIONS?omitHeader=true&wt=json&version=2.2
results in a JSON formatted reponse with the Content-Type: text/plain.
With older Solr versions (< 9.0), we have been able to install packages
this way.

Is the MIME type checked more rigorously in recent Solr versions,
leading to the error above? Or is the MIME type for the package API
something we can configure?

Thank you in advance for any help you can provide,
Katharina

Reply via email to