You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Paul Blanchaert (Jira)" <ji...@apache.org> on 2024/12/10 22:16:00 UTC
[jira] [Comment Edited] (SOLR-17589) First use of PUT/POST request with HttpJdkSolrClient generates error log entry on solr server due to initial HEAD request
[ https://issues.apache.org/jira/browse/SOLR-17589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17904634#comment-17904634 ]
Paul Blanchaert edited comment on SOLR-17589 at 12/10/24 10:15 PM:
-------------------------------------------------------------------
[~jdyer]
If we can modify the HEAD request to send an empty json object as payload, the problem should be solved...
We can reproduce with curl:
{{curl -X HEAD --location "http://localhost:8983/solr/collection1/update"}}
--> raises error
While
{{curl -X HEAD --location "http://localhost:8983/solr/collection1/update"}}
{{ -H "Content-Type: application/json" }}
{{{{ -d '{}'}}}}
--> doesn't raise error
This goes for --http2, --http2-prior-knowledge and --http1.1
Content-Type should be one of: [application/xml, application/csv, application/json, text/json, text/csv, text/xml, application/javabin, application/cbor]
Could this bring us closer to a solution?
was (Author: paul@search-solutions.net):
[~jdyer]
If we can modify the HEAD request to send an empty json object as payload, the problem should be solved...
We can reproduce with curl:
{{curl -X HEAD --location "http://localhost:8983/solr/collection1/update"}}
--> raises error
While
{{curl -X HEAD --location "http://localhost:8983/solr/collection1/update" \}}
{{ -H "Content-Type: application/json" \}}
{{ -d '{}'}}
--> doesn't raise error
Content-Type should be one of: [application/xml, application/csv, application/json, text/json, text/csv, text/xml, application/javabin, application/cbor]
Could this bring us closer to a solution?
> First use of PUT/POST request with HttpJdkSolrClient generates error log entry on solr server due to initial HEAD request
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-17589
> URL: https://issues.apache.org/jira/browse/SOLR-17589
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: clients - java
> Affects Versions: 9.7
> Reporter: Paul Blanchaert
> Priority: Minor
>
> The first call of the maybeTryHeadRequest of the HttpJdkSolrClient (used in the preparePutOrPost) causes an ERROR log entry in the solr server log even while the "HEAD" request is considered successful in the client.
> The client only performs this request once.
> The error on server side is due to the "empty" request: "missing content stream"
> 2024-12-10 08:31:48 2024-12-10 07:31:48.877 INFO (qtp1380924218-23-solr-123) [c:collection1 s:shard1 r:core_node2 x:collection1_shard1_replica_n1 t:solr-123] o.a.s.u.p.LogUpdateProcessorFactory webapp=/solr path=/update params={}{} 0 0
> 2024-12-10 08:31:48 2024-12-10 07:31:48.877 ERROR (qtp1380924218-23-solr-123) [c:collection1 s:shard1 r:core_node2 x:collection1_shard1_replica_n1 t:solr-123] o.a.s.h.RequestHandlerBase Client exception => org.apache.solr.common.SolrException: missing content stream
> 2024-12-10 08:31:48 at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:93)
> 2024-12-10 08:31:48 org.apache.solr.common.SolrException: missing content stream
> 2024-12-10 08:31:48 at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:93) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:226) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.core.SolrCore.execute(SolrCore.java:2880) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.HttpSolrCall.executeCoreRequest(HttpSolrCall.java:890) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:576) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:251) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:208) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:243) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:213) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202) ~[?:?]
> 2024-12-10 08:31:48 at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184) ~[?:?]
> 2024-12-10 08:31:48 at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210) ~[jetty-servlet-10.0.22.jar:10.0.22]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org