Robert,

Thanks for reporting this issue, and for following up about the resolution.

Based on the description, it sounds like the probe is making the HTTP
request to the public hostname, but using the private port number
8443. Since the nifi.web.https.host property is blank, NiFi listens on
all available addresses, but the error indicates that NiFi does not
recognize the public hostname as one of its internal addresses. Adding
the public hostname with port 8443 to nifi.web.proxy.host should
resolve that particular issue.

The error message indicates a problem with the HostHeaderHandler being
unable to write a message to the response stream, which looks like
something that should be addressed. I plan to take a closer look at
that error behavior soon.

Regards,
David Handermann

On Tue, Jan 28, 2025 at 10:16 PM Robert Cohen
<robert.co...@anu.edu.au.invalid> wrote:
>
> OK, I think you can ignore this report, its being triggered by a nagios
> probe of the server.
>
>
> On 29/1/2025 2:25 pm, Robert Cohen wrote:
> > Since upgrading from nifi 2.1.0 to nifi 2.2.0 I have noticed the
> > following stack dump appearing in my logs.
> >
> > It isnt fatal, nifi appears to be working correctly.
> >
> >
> > 2025-01-29 14:14:05,218 WARN [NiFi Web Server-127]
> > o.a.nifi.web.server.HostHeaderHandler Request URI
> > [https://odc-nifi-dev.nci.org.au:8443/]
> > Host Header [odc-nifi-dev.nci.org.au:8443] not valid
> > 2025-01-29 14:14:05,218 WARN [NiFi Web Server-127]
> > org.eclipse.jetty.server.Response writeError: status=500,
> > message=java.lang.NullPointerException: Cannot invoke
> > "java.io.PrintWriter.println(String)" because "out" is null,
> > response=ErrorResponse@1abe7e68{500,GET@2bf25610
> > https://odc-nifi-dev.nci.org.au:8443/
> > HTTP/1.1}
> > java.lang.NullPointerException: Cannot invoke
> > "java.io.PrintWriter.println(String)" because "out" is null
> >     at
> > org.apache.nifi.web.server.HostHeaderHandler.handle(HostHeaderHandler.java:192)
> >     at org.eclipse.jetty.server.Handler$Sequence.handle(Handler.java:805)
> >     at org.eclipse.jetty.server.Server.handle(Server.java:182)
> >     at
> > org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:662)
> >
> >
> > What I believe to be the relevant part of my nifi.properties is as
> > follows. I'll attach the full conf.
> >
> > But this is the only part that specifies port 8443.
> >
> > nifi is running in a container. I have a proxy on the host that is
> > listening on ports 443/444 and relayiing to 8443 in the container.
> >
> >
> > nifi.web.http.host=
> > nifi.web.http.port=
> > nifi.web.http.network.interface.default=
> >
> > nifi.web.https.host=
> > nifi.web.https.port=8443
> > nifi.web.https.network.interface.default=
> > nifi.web.https.application.protocols=h2 http/1.1
> > nifi.web.jetty.working.directory=./work/jetty
> > nifi.web.jetty.threads=200
> > nifi.web.max.header.size=16 KB
> > nifi.web.proxy.context.path=
> > nifi.web.proxy.host=odc-nifi-dev.nci.org.au:443,odc-nifi-dev.nci.org.au:444
> >
> > nifi.web.max.content.size=
> > nifi.web.max.requests.per.second=30000
> > nifi.web.max.access.token.requests.per.second=25
> > nifi.web.request.timeout=60 secs
> > nifi.web.request.ip.whitelist=
> > nifi.web.should.send.server.version=true
> > nifi.web.request.log.format=%{client}a - %u %t "%r" %s %O
> > "%{Referer}i" "%{User-Agent}i"

Reply via email to