You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Andrej van der Zee <an...@gmail.com> on 2015/12/17 10:32:44 UTC

Expected mime type application/octet-stream but got text/html

Hi,

I am having troubles getting data from a particular shard, even though I
follow the documentation:

https://cwiki.apache.org/confluence/display/solr/Distributed+Requests

This is OK:

 curl "
http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true"
{
   // returns correct result set
}

But this is NOT OK when I specify a particular shard:

curl "
http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&shards=54.93.121.54:8986/solr
"

{
  "responseHeader":{
    "status":404,
    "QTime":5,
    "params":{
      "q":"*:*",
      "shards":"54.93.121.54:8986/solr",
      "indent":"true",
      "rows":"1000",
      "wt":"json"}},
  "error":{
    "msg":"Error from server at http://54.93.121.54:8986/solr: Expected
mime type application/octet-stream but got text/html. <html>\n<head>\n<meta
http-equiv=\"Content-Type\" content=\"text/html;
charset=UTF-8\"/>\n<title>Error 404 Not
Found</title>\n</head>\n<body><h2>HTTP ERROR 404</h2>\n<p>Problem accessing
/solr/select. Reason:\n<pre>    Not Found</pre></p><hr><i><small>Powered by
Jetty://</small></i><hr/>\n\n</body>\n</html>\n",
    "code":404}}

Any idea?

Thanks,
Andrej

Re: Expected mime type application/octet-stream but got text/html

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,


> Fixed on erick's behalf because he had to run to a meeting...
>
> https://cwiki.apache.org/confluence/display/solr/Distributed+Requests
>
> ...i also wen't ahead to shift the examples to more emphasize using shard
> Ids since that's probably safer/cleaner for most people.
>

Thanks for the fast fix, that will help others newbies like me...

Cheers,
Andrej

Re: Expected mime type application/octet-stream but got text/html

Posted by Chris Hostetter <ho...@fucit.org>.
: 
: Indeed, it's a doc problem. A long time ago in a Solr far away, there
: was a bunch of effort to use the "default" collection (collection1).
: When that was changed, this documentation didn't get updated.
: 
: We'll update it in a few, thanks for reporting!

Fixed on erick's behalf because he had to run to a meeting...

https://cwiki.apache.org/confluence/display/solr/Distributed+Requests

...i also wen't ahead to shift the examples to more emphasize using shard 
Ids since that's probably safer/cleaner for most people.



-Hoss
http://www.lucidworks.com/

Re: Expected mime type application/octet-stream but got text/html

Posted by Erick Erickson <er...@gmail.com>.
Andrej:

Indeed, it's a doc problem. A long time ago in a Solr far away, there
was a bunch of effort to use the "default" collection (collection1).
When that was changed, this documentation didn't get updated.

We'll update it in a few, thanks for reporting!

Erick

On Thu, Dec 17, 2015 at 1:39 AM, Andrej van der Zee
<an...@gmail.com> wrote:
> It turns out that the documentation is not correct. If I specify the
> collection name after shards=, it does work as expected. So this works:
> curl "
> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&rows=1000&shards=54.93.121.54:8986/solr/connects
> "
>
> This does not work:
> curl "
> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&rows=1000&shards=54.93.121.54:8986/solr
> "
>
> So I guess the documentation needs an update?
>
> Cheers,
> Andrej
>
>
> On Thu, Dec 17, 2015 at 10:36 AM, Markus Jelsma <ma...@openindex.io>
> wrote:
>
>> Hi - looks like Solr did not start up correctly, got some errors and kept
>> Jetty running. You should find information in that node's logs.
>> M.
>>
>>
>> -----Original message-----
>> > From:Andrej van der Zee <an...@gmail.com>
>> > Sent: Thursday 17th December 2015 10:32
>> > To: solr-user@lucene.apache.org
>> > Subject: Expected mime type application/octet-stream but got text/html
>> >
>> > Hi,
>> >
>> > I am having troubles getting data from a particular shard, even though I
>> > follow the documentation:
>> >
>> > https://cwiki.apache.org/confluence/display/solr/Distributed+Requests
>> >
>> > This is OK:
>> >
>> >  curl "
>> >
>> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true"
>> > {
>> >    // returns correct result set
>> > }
>> >
>> > But this is NOT OK when I specify a particular shard:
>> >
>> > curl "
>> >
>> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&shards=54.93.121.54:8986/solr
>> > "
>> >
>> > {
>> >   "responseHeader":{
>> >     "status":404,
>> >     "QTime":5,
>> >     "params":{
>> >       "q":"*:*",
>> >       "shards":"54.93.121.54:8986/solr",
>> >       "indent":"true",
>> >       "rows":"1000",
>> >       "wt":"json"}},
>> >   "error":{
>> >     "msg":"Error from server at http://54.93.121.54:8986/solr: Expected
>> > mime type application/octet-stream but got text/html.
>> <html>\n<head>\n<meta
>> > http-equiv=\"Content-Type\" content=\"text/html;
>> > charset=UTF-8\"/>\n<title>Error 404 Not
>> > Found</title>\n</head>\n<body><h2>HTTP ERROR 404</h2>\n<p>Problem
>> accessing
>> > /solr/select. Reason:\n<pre>    Not Found</pre></p><hr><i><small>Powered
>> by
>> > Jetty://</small></i><hr/>\n\n</body>\n</html>\n",
>> >     "code":404}}
>> >
>> > Any idea?
>> >
>> > Thanks,
>> > Andrej
>> >
>>

Re: Expected mime type application/octet-stream but got text/html

Posted by Andrej van der Zee <an...@gmail.com>.
It turns out that the documentation is not correct. If I specify the
collection name after shards=, it does work as expected. So this works:
curl "
http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&rows=1000&shards=54.93.121.54:8986/solr/connects
"

This does not work:
curl "
http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&rows=1000&shards=54.93.121.54:8986/solr
"

So I guess the documentation needs an update?

Cheers,
Andrej


On Thu, Dec 17, 2015 at 10:36 AM, Markus Jelsma <ma...@openindex.io>
wrote:

> Hi - looks like Solr did not start up correctly, got some errors and kept
> Jetty running. You should find information in that node's logs.
> M.
>
>
> -----Original message-----
> > From:Andrej van der Zee <an...@gmail.com>
> > Sent: Thursday 17th December 2015 10:32
> > To: solr-user@lucene.apache.org
> > Subject: Expected mime type application/octet-stream but got text/html
> >
> > Hi,
> >
> > I am having troubles getting data from a particular shard, even though I
> > follow the documentation:
> >
> > https://cwiki.apache.org/confluence/display/solr/Distributed+Requests
> >
> > This is OK:
> >
> >  curl "
> >
> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true"
> > {
> >    // returns correct result set
> > }
> >
> > But this is NOT OK when I specify a particular shard:
> >
> > curl "
> >
> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&shards=54.93.121.54:8986/solr
> > "
> >
> > {
> >   "responseHeader":{
> >     "status":404,
> >     "QTime":5,
> >     "params":{
> >       "q":"*:*",
> >       "shards":"54.93.121.54:8986/solr",
> >       "indent":"true",
> >       "rows":"1000",
> >       "wt":"json"}},
> >   "error":{
> >     "msg":"Error from server at http://54.93.121.54:8986/solr: Expected
> > mime type application/octet-stream but got text/html.
> <html>\n<head>\n<meta
> > http-equiv=\"Content-Type\" content=\"text/html;
> > charset=UTF-8\"/>\n<title>Error 404 Not
> > Found</title>\n</head>\n<body><h2>HTTP ERROR 404</h2>\n<p>Problem
> accessing
> > /solr/select. Reason:\n<pre>    Not Found</pre></p><hr><i><small>Powered
> by
> > Jetty://</small></i><hr/>\n\n</body>\n</html>\n",
> >     "code":404}}
> >
> > Any idea?
> >
> > Thanks,
> > Andrej
> >
>

RE: Expected mime type application/octet-stream but got text/html

Posted by Markus Jelsma <ma...@openindex.io>.
Hi - looks like Solr did not start up correctly, got some errors and kept Jetty running. You should find information in that node's logs.
M.
 
 
-----Original message-----
> From:Andrej van der Zee <an...@gmail.com>
> Sent: Thursday 17th December 2015 10:32
> To: solr-user@lucene.apache.org
> Subject: Expected mime type application/octet-stream but got text/html
> 
> Hi,
> 
> I am having troubles getting data from a particular shard, even though I
> follow the documentation:
> 
> https://cwiki.apache.org/confluence/display/solr/Distributed+Requests
> 
> This is OK:
> 
>  curl "
> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true"
> {
>    // returns correct result set
> }
> 
> But this is NOT OK when I specify a particular shard:
> 
> curl "
> http://54.93.121.54:8986/solr/connects/select?q=*%3A*&wt=json&indent=true&shards=54.93.121.54:8986/solr
> "
> 
> {
>   "responseHeader":{
>     "status":404,
>     "QTime":5,
>     "params":{
>       "q":"*:*",
>       "shards":"54.93.121.54:8986/solr",
>       "indent":"true",
>       "rows":"1000",
>       "wt":"json"}},
>   "error":{
>     "msg":"Error from server at http://54.93.121.54:8986/solr: Expected
> mime type application/octet-stream but got text/html. <html>\n<head>\n<meta
> http-equiv=\"Content-Type\" content=\"text/html;
> charset=UTF-8\"/>\n<title>Error 404 Not
> Found</title>\n</head>\n<body><h2>HTTP ERROR 404</h2>\n<p>Problem accessing
> /solr/select. Reason:\n<pre>    Not Found</pre></p><hr><i><small>Powered by
> Jetty://</small></i><hr/>\n\n</body>\n</html>\n",
>     "code":404}}
> 
> Any idea?
> 
> Thanks,
> Andrej
>