You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Guillaume Lhermenier (Jira)" <ji...@apache.org> on 2023/11/13 16:42:00 UTC
[jira] [Created] (NIFI-12358) NPE when configured network interfaces do not exist
Guillaume Lhermenier created NIFI-12358:
-------------------------------------------
Summary: NPE when configured network interfaces do not exist
Key: NIFI-12358
URL: https://issues.apache.org/jira/browse/NIFI-12358
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 1.20.0
Reporter: Guillaume Lhermenier
I recently had to switch our NiFi base AMIs in AWS from amazonlinux 2 to amazonlinux 2023.
This went pretty smoothly but I an issue about network interfaces.
For some reasons, I had the following configured in my nifi.properties :
{code:java}
nifi.web.https.host=nifi1.emea.qa.domain.io
nifi.web.https.port=8443
nifi.web.https.network.interface.eth0=eth0
nifi.web.https.network.interface.eth1=eth1{code}
And this worked for many years.
However, in amazon Linux, networks seems to have changed and naming too.
Instead of eth0/eth1, I had my network interfaces named ens5/ens6.
Of course, NiFi wasn't able to find them.
However, the log could be clearer than a NullPointerException
{code:java}
2023-11-13 14:35:28,644 WARN [main] o.a.nifi.web.server.HostHeaderHandler Failed to determine custom network interfaces.
java.lang.NullPointerException: null
at org.apache.nifi.web.server.HostHeaderHandler.extractIPsFromNetworkInterfaces(HostHeaderHandler.java:335)
at org.apache.nifi.web.server.HostHeaderHandler.generateDefaultHostnames(HostHeaderHandler.java:276)
at org.apache.nifi.web.server.HostHeaderHandler.<init>(HostHeaderHandler.java:100)
at org.apache.nifi.web.server.JettyServer.init(JettyServer.java:217)
at org.apache.nifi.web.server.JettyServer.initialize(JettyServer.java:1074)
at org.apache.nifi.NiFi.<init>(NiFi.java:164)
at org.apache.nifi.NiFi.<init>(NiFi.java:83)
at org.apache.nifi.NiFi.main(NiFi.java:332)
2023-11-13 14:35:28,649 INFO [main] o.a.nifi.web.server.HostHeaderHandler Determined 14 valid hostnames and IP addresses for incoming headers: 127.0.0.1, 127.0.0.1:8443, localhost, localhost:8443, [::1], [::1]:8443, ip-172-30-xx-xx.eu-west-1.compute.internal, ip-172-30-xx-xx.eu-west-1.compute.internal:8443, 172.30.xx.xx, 172.30.xx.xx:8443, nifi1.emea.qa.domain.io, nifi1.emea.qa.domain.io:8443, nifi.emea.qa.domain.io, {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)