[ https://issues.apache.org/jira/browse/NIFI-12358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Payne updated NIFI-12358: ------------------------------ Fix Version/s: 2.latest Assignee: Mark Payne Status: Patch Available (was: Open) > 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 > Assignee: Mark Payne > Priority: Major > Fix For: 2.latest > > Time Spent: 10m > Remaining Estimate: 0h > > 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} > > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)