Description
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 :
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
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
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,
NB : I hadn't tested this on newer versions than 1.20 and won't have time to in the coming weeks.
However, our migration to 1.23 should be done in the next months, I'll update the ticket if needed at that time.
Attachments
Issue Links
- links to