Is this package a public one that I could try the steps to reproduce this?   I 
*do* recall that there was some issues around mime types.   

Would you mind trying with a public available package and sharing all the steps 
and let me know how it goes?

An example of a public package, and it’s steps, is documented in this 
integration test:

https://github.com/apache/solr/blob/main/solr/packaging/test/test_packages.bats#L69
solr/solr/packaging/test/test_packages.bats at main · apache/solr
github.com


Eric

> On Jul 18, 2024, at 4:14 PM, Katharina Schmid 
> <katharina.sch...@bsb-muenchen.de> wrote:
> 
> 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
> 

_______________________
Eric Pugh | Founder | OpenSource Connections, LLC | 434.466.1467 | 
http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | 
My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed 
<https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
    
This e-mail and all contents, including attachments, is considered to be 
Company Confidential unless explicitly stated otherwise, regardless of whether 
attachments are marked as such.

Reply via email to