[ 
https://issues.apache.org/jira/browse/NIFI-10132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555637#comment-17555637
 ] 

David Handermann commented on NIFI-10132:
-----------------------------------------

Thanks for clarifying [~gregb], that would explain the abnormal error messages.

As mentioned, the XML Template format is very different from the compressed 
flow.xml.gz.

Instead of copying a file in, it would be best to delete the flow.xml.gz and 
flow.json.gz from the new NiFi installation, and allow NiFi to start up with an 
empty flow. At that point, you should be able to use the import process in the 
UI to create the flow.

It is also possible to upgrade between NiFi versions, but that generally 
requires migrating all of the files in the conf directory, otherwise NiFi will 
not be able to match up the flow configuration and policy configuration, among 
other things.

> New NiFi Installation Fails to Start
> ------------------------------------
>
>                 Key: NIFI-10132
>                 URL: https://issues.apache.org/jira/browse/NIFI-10132
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.16.2, 1.16.3
>         Environment: RHEL OS
>            Reporter: Greg Biddy
>            Priority: Blocker
>         Attachments: test_template_1.15.3.xml
>
>
> I am attempting to deploy a NiFi cluster running NiFi 1.16.3. In all cases, 
> the application fails to start. I have observed two errors in the nifi 
> application log during the start-up process. 
> One occurs if no flow.xml.gz is present in the conf directory when the nifi 
> service is started:
> {code:java}
> 2022-06-16 20:30:51,774 INFO [main] org.apache.nifi.io.socket.SocketListener 
> Now listening for connections from nodes on port 11443
> 2022-06-16 20:30:51,820 INFO [main] o.a.n.c.s.VersionedFlowSynchronizer 
> Synchronizing FlowController with proposed flow: Controller Already 
> Synchronized = false
> 2022-06-16 20:30:51,906 WARN [main] org.apache.nifi.web.server.JettyServer 
> Failed to start web server... shutting down.
> java.lang.NullPointerException: null
>         at 
> org.apache.nifi.registry.flow.diff.StandardFlowDifference.hashCode(StandardFlowDifference.java:92)
>         at java.util.HashMap.hash(HashMap.java:339)
>         at java.util.HashMap.put(HashMap.java:612)
>         at java.util.HashSet.add(HashSet.java:220)
>         at 
> org.apache.nifi.registry.flow.diff.StandardFlowComparator.addIfDifferent(StandardFlowComparator.java:567)
>         at 
> org.apache.nifi.registry.flow.diff.StandardFlowComparator.compare(StandardFlowComparator.java:456)
>         at 
> org.apache.nifi.registry.flow.diff.StandardFlowComparator.compare(StandardFlowComparator.java:94)
>         at 
> org.apache.nifi.registry.flow.diff.StandardFlowComparator.compare(StandardFlowComparator.java:79)
>         at 
> org.apache.nifi.controller.serialization.VersionedFlowSynchronizer.compareFlows(VersionedFlowSynchronizer.java:387)
>         at 
> org.apache.nifi.controller.serialization.VersionedFlowSynchronizer.sync(VersionedFlowSynchronizer.java:167)
>         at 
> org.apache.nifi.controller.serialization.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:43)
>         at 
> org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1524)
>         at 
> org.apache.nifi.persistence.StandardFlowConfigurationDAO.load(StandardFlowConfigurationDAO.java:107)
>         at 
> org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:819)
>         at 
> org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:461)
>         at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1086)
>         at org.apache.nifi.NiFi.<init>(NiFi.java:170)
>         at org.apache.nifi.NiFi.<init>(NiFi.java:82)
>         at org.apache.nifi.NiFi.main(NiFi.java:330) {code}
>  
> The second error occurs if there is a flow.xml.gz present when the nifi 
> service is started, where the flow is copied over from a cluster running 
> 1.15.3:
> {code:java}
> 2022-06-16 20:29:31,101 INFO [main] org.apache.nifi.web.server.JettyServer 
> Loading Flow...
> 2022-06-16 20:29:31,106 INFO [main] org.apache.nifi.io.socket.SocketListener 
> Now listening for connections from nodes on port 11443
> 2022-06-16 20:29:31,130 WARN [main] org.apache.nifi.web.server.JettyServer 
> Failed to start web server... shutting down.
> java.lang.NullPointerException: null
>         at 
> org.apache.nifi.util.DomUtils.getChildElementsByTagName(DomUtils.java:53)
>         at 
> org.apache.nifi.controller.serialization.FlowFromDOMFactory.getChildrenByTagName(FlowFromDOMFactory.java:635)
>         at 
> org.apache.nifi.controller.serialization.FlowFromDOMFactory.getString(FlowFromDOMFactory.java:582)
>         at 
> org.apache.nifi.controller.serialization.FlowFromDOMFactory.getProcessGroup(FlowFromDOMFactory.java:187)
>         at 
> org.apache.nifi.controller.XmlFlowSynchronizer.isFlowEmpty(XmlFlowSynchronizer.java:660)
>         at 
> org.apache.nifi.controller.XmlFlowSynchronizer.sync(XmlFlowSynchronizer.java:179)
>         at 
> org.apache.nifi.controller.serialization.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:43)
>         at 
> org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1524)
>         at 
> org.apache.nifi.persistence.StandardFlowConfigurationDAO.load(StandardFlowConfigurationDAO.java:107)
>         at 
> org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:819)
>         at 
> org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:461)
>         at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1086)
>         at org.apache.nifi.NiFi.<init>(NiFi.java:170)
>         at org.apache.nifi.NiFi.<init>(NiFi.java:82)
>         at org.apache.nifi.NiFi.main(NiFi.java:330)
> 2022-06-16 20:29:31,131 INFO [Thread-1] org.apache.nifi.NiFi Application 
> Server shutdown started {code}
> Any guidance would be much appreciated.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to