[
https://issues.apache.org/jira/browse/NIFI-11766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849791#comment-17849791
]
Chris Sampson commented on NIFI-11766:
--------------------------------------
This appears to be a warning logged by the difference between what the
Elasticsearch REST client's use of Apache HttpClient expects with Cookie
Headers vs. what the AWS ALB is sending. See
https://github.com/elastic/support-diagnostics/issues/233, for example.
This appears to be ignorable and could be excluded from the NiFi logs by
changing one's {{logback.xml}} configuration, but that comes at the expense of
also removing logs for these classes/packages that may well be relevant for
other issues.
A suggested approach is to change the unerlying Cookie Handler, e.g.
{code:java}
builder.setRequestConfigCallback(
requestConfigBuilder ->
requestConfigBuilder.setCookieSpec(CookieSpecs.STANDARD));
{code}
which could be done in the {{ElasticSearchClientServiceImpl#setupClient}},
**but** that's likely to cause problems with some of the available
Elasticsearch authentication strategies/functionality, so is probably not the
right answer here.
Instead, this is maybe something that would be handled without warning by the
AWS OpenSearch Client library equivalent, if NiFi implements such an
alternative in the future.
> ElasticSearchClientServiceImpl malformed (nonstandard?) expires attribute
> when connecting through AWS LoadBalancer
> ------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-11766
> URL: https://issues.apache.org/jira/browse/NIFI-11766
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.19.1
> Environment: Ubuntu 22.04, EC2 machine in AWS,
> Java: 11.0.18, AWS
> Reporter: Marek RadwaĆski
> Priority: Minor
>
> Each request to elasticsearch from a processor that utilizes
> ElasticSearchClientServiceImpl to connect to the cluster results in a logged
> Warning entry of:
> 2023-06-30 11:11:42,194 WARN [I/O dispatcher 2]
> o.a.h.c.protocol.ResponseProcessCookies Invalid cookie header: "Set-Cookie:
> AWSALBCORS=m0NDYBGa0v2NsPURJUVvx<REDACTED>tso3AQ4Zatbj8EQDO2qLpAYRcHoG4oLoOQkQNhzXAuSxoJhTUD944olr/wNhfszNBS5ENVkivErGMFyys2EfL;
> Expires=Fri, 07 Jul 2023 11:11:42 GMT; Path=/; SameSite=None". Invalid
> 'expires' attribute: Fri, 07 Jul 2023 11:11:42 GMT
> Resulting in millions of those entries accumulating over time on a large
> cluster.
> This seems like a mismatch of cookie standards the underlying HTTP client
> uses and what AWS ALB expects.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)