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 marotosg <ma...@gmail.com> on 2015/05/05 10:39:42 UTC

Solr Exception "The remote server returned an error: (400) Bad Request."

Hi,

I am having some difficulties knowing which one is the exception I am having
on my client for some queries. Queries malformed are always coming back to
my solrNet client as "The remote server returned an error: (400) Bad
Request.". Internally Solr is actually printing the log issues like
"undefined field fieldName".

Do your have any idea about getting more detailed info into the http
response?

Thanks,
Sergio



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Exception-The-remote-server-returned-an-error-400-Bad-Request-tp4203889.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: New article on ZK "Poison Packet"

Posted by Siegfried Goeschl <sg...@gmx.at>.
Cool stuff - thanks for sharing

Siegfried Goeschl

> On 09 May 2015, at 08:43, steve <sc...@hotmail.com> wrote:
> 
> While very technical and unusual, a very interesting view of the world of Linux and ZooKeeper Clusters...
> http://www.pagerduty.com/blog/the-discovery-of-apache-zookeepers-poison-packet/ 		 	   		  


New article on ZK "Poison Packet"

Posted by steve <sc...@hotmail.com>.
While very technical and unusual, a very interesting view of the world of Linux and ZooKeeper Clusters...
http://www.pagerduty.com/blog/the-discovery-of-apache-zookeepers-poison-packet/ 		 	   		  

Re: Solr Exception "The remote server returned an error: (400) Bad Request."

Posted by Tomasz Borek <to...@gmail.com>.
Short answer: wget skips body on 400 assuming you didn't want error page
stored.
Long answer: get your error page with additional wget params, like so:

✗ wget -Sd http://10.0.3.113:8080/solr/collection1/vitas\?q\=coreD%3A25
DEBUG output created by Wget 1.15 on linux-gnu.

URI encoding = `UTF-8'
--2015-05-08 21:56:55--
http://10.0.3.113:8080/solr/collection1/vitas?q=coreD%3A25
Łączenie się z 10.0.3.113:8080... połączono.
Created socket 3.
Releasing 0x0000000000aa35d0 (new refcount 0).
Deleting unused 0x0000000000aa35d0.

---request begin---
GET /solr/collection1/vitas?q=coreD%3A25 HTTP/1.1
User-Agent: Wget/1.15 (linux-gnu)
Accept: */*
Host: 10.0.3.113:8080
Connection: Keep-Alive

---request end---
Żądanie HTTP wysłano, oczekiwanie na odpowiedź...
---response begin---
HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: Sat, 01 Jan 2000 01:00:00 GMT
Last-Modified: Fri, 08 May 2015 19:56:55 GMT
ETag: "14d351a25a9"
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 08 May 2015 19:56:55 GMT
Connection: close

---response end---

  HTTP/1.1 400 Bad Request
  Server: Apache-Coyote/1.1
  Cache-Control: no-cache, no-store
  Pragma: no-cache
  Expires: Sat, 01 Jan 2000 01:00:00 GMT
  Last-Modified: Fri, 08 May 2015 19:56:55 GMT
  ETag: "14d351a25a9"
  Content-Type: application/json;charset=UTF-8
  Transfer-Encoding: chunked
  Date: Fri, 08 May 2015 19:56:55 GMT
  Connection: close
Registered socket 3 for persistent reuse.
URI content encoding = `UTF-8'
Skipping 95 bytes of body:
[{"responseHeader":{"status":400,"QTime":2},"error":{"msg":"undefined field
coreD","code":400}}
] done.
2015-05-08 21:56:55 BŁĄD 400: Bad Request.



pozdrawiam,
LAFK

2015-05-05 17:44 GMT+02:00 marotosg <ma...@gmail.com>:

> Thanks for the answer but i don't think that's going to solve my
> problem.For
> instance if I copy this query in the chrome
> browserhttp://localhost:8080/solr48/person/select?q=CoreD:25I get this
> error.4001CoreD:25undefined field CoreD400If I use wget  from linux wget
> http://localhost:8080/solr48/person/select?q=CoreD:25I get ERROR:400 Bad
> Request.Is any reason why I am not getting same error?Thanks
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-Exception-The-remote-server-returned-an-error-400-Bad-Request-tp4203889p4203949.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr Exception "The remote server returned an error: (400) Bad Request."

Posted by marotosg <ma...@gmail.com>.
Thanks for the answer but i don't think that's going to solve my problem.For
instance if I copy this query in the chrome
browserhttp://localhost:8080/solr48/person/select?q=CoreD:25I get this
error.4001CoreD:25undefined field CoreD400If I use wget  from linux wget
http://localhost:8080/solr48/person/select?q=CoreD:25I get ERROR:400 Bad
Request.Is any reason why I am not getting same error?Thanks



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Exception-The-remote-server-returned-an-error-400-Bad-Request-tp4203889p4203949.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Exception "The remote server returned an error: (400) Bad Request."

Posted by Tomasz Borek <to...@gmail.com>.
Take a look at query parameters and use debug and/or explain.

https://wiki.apache.org/solr/CommonQueryParameters

Also, perhaps change parser from default one to less stringent dismax.

Hard to say what fits your case as I don't know it, but those two are best
starting points I know of.

pozdrawiam,
LAFK

2015-05-05 10:39 GMT+02:00 marotosg <ma...@gmail.com>:

> Hi,
>
> I am having some difficulties knowing which one is the exception I am
> having
> on my client for some queries. Queries malformed are always coming back to
> my solrNet client as "The remote server returned an error: (400) Bad
> Request.". Internally Solr is actually printing the log issues like
> "undefined field fieldName".
>
> Do your have any idea about getting more detailed info into the http
> response?
>
> Thanks,
> Sergio
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-Exception-The-remote-server-returned-an-error-400-Bad-Request-tp4203889.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>