The wrong mime type comes from the response parsing. It returns a 404 HTML
page (text/html), and the client you are using probably expects a JSON or
XML response. I am not sure if this can be solved by providing the correct
accept header, or if this is a general bug in error responses.

Based on the response (404) document I assume you forgot to create the
collection named "mysearchindex". Can you double-check that the collection
exists?

On Tue, Sep 24, 2024 at 2:18 PM Ehrenleitner Robert Harald <
robert.ehrenleit...@plus.ac.at> wrote:

> Hi,
>
> even with 9.4 I get a strange error:
>
> $ bin/solr config -c mysearchindex -solrUrl http://localhost:8983 -action
> set-user-property -property update.autoCreateFields -value false
>
> POSTing request to Config API: http://localhost:8983/mysearchindex/config
> {"set-user-property":{"update.autoCreateFields":"false"}}
>
> ERROR: Error from server at
> http://localhost:8983/mysearchindex/config?wt=javabin&version=2: Expected
> mime type in [application/octet-stream,
> application/vnd.apache.solr.javabin] but got text/html. <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
> <title>Error 404 Not Found</title>
> </head>
> <body><h2>HTTP ERROR 404 Not Found</h2>
> <table>
> <tr><th>URI:</th><td>/mysearchindex/config</td></tr>
> <tr><th>STATUS:</th><td>404</td></tr>
> <tr><th>MESSAGE:</th><td>Not Found</td></tr>
> <tr><th>SERVLET:</th><td>-</td></tr>
> </table>
>
> </body>
> </html>
>
> Why is it setting a wrong MIME type now?
>
> *Mag.phil. Robert Ehrenleitner, B.Eng.*
>
> Webdeveloper
>
> IT-Services
>
>
>
> *Paris-Lodron-Universität Salzburg*
>
> Hellbrunner Straße 34, 5020 Salzburg, Österreich
>
> https://www.plus.ac.at
>
>
>
>
> ------------------------------
> *Von:* Christos Malliaridis <c.malliari...@gmail.com>
> *Gesendet:* Dienstag, 24. September 2024 13:42
> *An:* users@solr.apache.org <users@solr.apache.org>
> *Betreff:* Re: Weird error message with solr config
>
> [Sie erhalten nicht häufig E-Mails von c.malliari...@gmail.com. Weitere
> Informationen, warum dies wichtig ist, finden Sie unter
> https://aka.ms/LearnAboutSenderIdentification ]
>
> I will review the authorization issue as well, because it may be another
> bug related to the CLI migration. I'll let you know if that's the case. A
> PR has also been created for the scheme argument (see
>
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fsolr%2Fpull%2F2722&data=05%7C02%7Crobert.ehrenleitner%40plus.ac.at%7Cf40ed74eb5b749ce3e3808dcdc8e1218%7C158a941a576e4e87993db2eab8526e50%7C1%7C0%7C638627749960074861%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=tYw2PbmjxQ8CKsklQfnZMp6nRaVrybcG7%2Bhllw%2BhMSo%3D&reserved=0)
> <https://github.com/apache/solr/pull/2722>.
>
> > I will install 9.4.0 on my local machine, which is our current productive
> version.
>
> Going with the version from production is a good decision if that covers
> your needs. Alternatively, you may try Solr 9.6.1. The CLI migration
> started in version 9.7 as far as I know.
>
> Best,
> Christos
>
> On Tue, Sep 24, 2024 at 12:49 PM Ehrenleitner Robert Harald <
> robert.ehrenleit...@plus.ac.at> wrote:
>
> > Hi,
> >
> > thanks for the fast reply. I didn't consider that bin/solr could be a
> bash
> > script. I removed (commented out) the offending "if"-block in lines
> > 990-992. Now, it does not throw this error anymore, but now it claims
> that
> > I did not pass authorisation. The enviroment variables for authorisation
> > are properly set, I can even run "bin/solr create" successfully.
> >
> > That's frustrating. I will install 9.4.0 on my local machine, which is
> our
> > current productive version.
> >
> > *Mag.phil. Robert Ehrenleitner, B.Eng.*
> >
> > Webdeveloper
> >
> > IT-Services
> >
> >
> >
> > *Paris-Lodron-Universität Salzburg*
> >
> > Hellbrunner Straße 34, 5020 Salzburg, Österreich
> >
> > https://www.plus.ac.at
> >
> >
> >
> >
> > ------------------------------
> > *Von:* Christos Malliaridis <c.malliari...@gmail.com>
> > *Gesendet:* Dienstag, 24. September 2024 11:50
> > *An:* users@solr.apache.org <users@solr.apache.org>
> > *Betreff:* Re: Weird error message with solr config
> >
> > [Sie erhalten nicht häufig E-Mails von c.malliari...@gmail.com. Weitere
> > Informationen, warum dies wichtig ist, finden Sie unter
> > https://aka.ms/LearnAboutSenderIdentification ]
> >
> > Hi Robert,
> >
> > This issue seems very similar to
> >
> >
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSOLR-17457&data=05%7C02%7Crobert.ehrenleitner%40plus.ac.at%7Cf40ed74eb5b749ce3e3808dcdc8e1218%7C158a941a576e4e87993db2eab8526e50%7C1%7C0%7C638627749960108058%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=pD0lw3FZl7f%2Fgojyog6v%2BsG9CL0HJXPQKVpQed4Y0A4%3D&reserved=0
> <https://issues.apache.org/jira/browse/SOLR-17457>
> > <
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSOLR-17457&data=05%7C02%7Crobert.ehrenleitner%40plus.ac.at%7Cf40ed74eb5b749ce3e3808dcdc8e1218%7C158a941a576e4e87993db2eab8526e50%7C1%7C0%7C638627749960127177%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=N8OH%2F6pn607p5OnF08H3nIExnljJ4ZqqPUVWTTO2NeQ%3D&reserved=0
> <https://issues.apache.org/jira/browse/SOLR-17457>>. Are you using Solr
> 9.7
> > perhaps?
> >
> > Looking into the code of 9.7, it seems that the script does add the
> -scheme
> > flag in the background for you. The help output does not print this
> option
> > because it was not migrated correctly. There is an ongoing migration of
> the
> > CLI options, which is probably the root cause. I filed an issue where you
> > can track its progress at
> >
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSOLR-17459&data=05%7C02%7Crobert.ehrenleitner%40plus.ac.at%7Cf40ed74eb5b749ce3e3808dcdc8e1218%7C158a941a576e4e87993db2eab8526e50%7C1%7C0%7C638627749960145526%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ZRTsKPgtSQe%2FfT1%2FGlT%2F%2B380E29y28JkvyLYtjB63Hs%3D&reserved=0
> <https://issues.apache.org/jira/browse/SOLR-17459>
> > <
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSOLR-17459&data=05%7C02%7Crobert.ehrenleitner%40plus.ac.at%7Cf40ed74eb5b749ce3e3808dcdc8e1218%7C158a941a576e4e87993db2eab8526e50%7C1%7C0%7C638627749960164947%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=l%2B9%2BcV2zKNmv%2BNJA1kYgtYnsghuKByG5kbl1MVV9gFM%3D&reserved=0
> <https://issues.apache.org/jira/browse/SOLR-17459>>.
> >
> > Best regards,
> > Christos
> >
> > On Tue, Sep 24, 2024 at 11:23 AM Ehrenleitner Robert Harald <
> > robert.ehrenleit...@plus.ac.at> wrote:
> >
> > > I have set up a new instance of Solr (it is really not the first time I
> > do
> > > this), and right after bin/solr create, I am completely stuck:
> > >
> > > $ bin/solr config --name mysearchindex --solr-url
> http://localhost:8983<
> > > http://localhost:8983/> --action set-user-property --property
> > > update.autoCreateFields --value false
> > > Failed to parse command-line arguments due to: Unrecognized option:
> > -scheme
> > >
> > > usage: bin/solr config [-a <ACTION>] -c <NAME> -p <PROP> [-url <HOST>]
> > [-v
> > > <VALUE>] [-z <HOST>]
> > >
> > > List of options:
> > >  -a,--action <ACTION>     Config API action, one of: set-property,
> > > unset-property, set-user-property,
> > >                           unset-user-property; default is
> 'set-property'.
> > >  -c,--name <NAME>         Name of the collection.
> > >  -p,--property <PROP>     Name of the Config API property to apply the
> > > action to, such as:
> > >                           'updateHandler.autoSoftCommit.maxTime'.
> > >  -url,--solr-url <HOST>   Base Solr URL, which can be used to determine
> > > the zk-host if that's not known; defaults to:
> > >
> http://localhost:8983<http://localhost:8983/>.
> > >  -v,--value <VALUE>       Set the property to this value; accepts JSON
> > > objects and strings.
> > >  -z,--zk-host <HOST>      Zookeeper connection string; unnecessary if
> > > ZK_HOST is defined in solr.in.sh; otherwise,
> > >                           defaults to localhost:9983.
> > >
> > > Please see the Reference Guide for more tools documentation:
> > >
> > >
> >
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsolr.apache.org%2Fguide%2Fsolr%2Flatest%2Fdeployment-guide%2Fsolr-control-script-reference.html&data=05%7C02%7Crobert.ehrenleitner%40plus.ac.at%7Cf40ed74eb5b749ce3e3808dcdc8e1218%7C158a941a576e4e87993db2eab8526e50%7C1%7C0%7C638627749960182586%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=CxlfNiy3mJx1JPE20e2lWP9l6NqUvFhxn4WeUwLF9Ao%3D&reserved=0
> <https://solr.apache.org/guide/solr/latest/deployment-guide/solr-control-script-reference.html>
> > <
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsolr.apache.org%2Fguide%2Fsolr%2Flatest%2Fdeployment-guide%2Fsolr-control-script-reference.html&data=05%7C02%7Crobert.ehrenleitner%40plus.ac.at%7Cf40ed74eb5b749ce3e3808dcdc8e1218%7C158a941a576e4e87993db2eab8526e50%7C1%7C0%7C638627749960200566%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=7SoiB5eal31eMfMB7WKRPXh3b5dXELzW2JI%2FERz6PFQ%3D&reserved=0
> <https://solr.apache.org/guide/solr/latest/deployment-guide/solr-control-script-reference.html>
> >
> > >
> > > Huh? I did not pass an option "-scheme", so what is the error message
> > > about? Even if this line was an erronous error message, I do not see
> > where
> > > I did anything wrong.
> > >
> > > I have also tried many variations of the CLI parameters (like also
> > exactly
> > > obeying the "usage" line), but all of them lead to the same error
> > message.
> > >
> > > What am I missing?
> > > Kind regards.
> > >
> > >
> > >
> >
>

Reply via email to