nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Payne (Jira)" <j...@apache.org>
Subject [jira] [Updated] (NIFI-7414) NiFi fails to startup if it encounters some unicode characters in the flow.xml.gz
Date Thu, 30 Apr 2020 17:15:00 GMT

     [ https://issues.apache.org/jira/browse/NIFI-7414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Payne updated NIFI-7414:
-----------------------------
    Description: 
There are some elements where NiFi does not strip out invalid XML characters when writing
out the flow.xml.gz. For example, if a variable is created and the variable's value has a
unicode 0x0001 character in it, NiFi will accept the input but then will fail to restart with
the following stack trace:
{quote}
2020-04-30 13:06:16,834 WARN [main] org.apache.nifi.web.server.JettyServer Failed to start
web server... shutting down.
org.apache.nifi.controller.serialization.FlowSerializationException: org.xml.sax.SAXParseException;
lineNumber: 51; columnNumber: 30; Character reference "&#
	at org.apache.nifi.cluster.protocol.StandardDataFlow.parseFlowBytes(StandardDataFlow.java:140)
	at org.apache.nifi.cluster.protocol.StandardDataFlow.getFlowDocument(StandardDataFlow.java:97)
	at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:183)
	at org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1426)
	at org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:89)
	at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:792)
	at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:537)
	at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:72)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:930)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:889)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:425)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.server.Server.start(Server.java:407)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.server.Server.doStart(Server.java:371)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:995)
	at org.apache.nifi.NiFi.<init>(NiFi.java:158)
	at org.apache.nifi.NiFi.<init>(NiFi.java:72)
	at org.apache.nifi.NiFi.main(NiFi.java:301)
Caused by: org.xml.sax.SAXParseException: Character reference "&#
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanCharReferenceValue(XMLScanner.java:1345)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3053)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
	at org.apache.nifi.cluster.protocol.StandardDataFlow.parseFlowBytes(StandardDataFlow.java:138)
	... 44 common frames omitted
{quote}

  was:
There are some elements where NiFi does not strip out invalid XML characters when writing
out the flow.xml.gz. For example, if a variable is created and the variable's value has a
unicode 0x0001 character in it, NiFi will accept the input but then will fail to restart with
the following stack trace:
{code:java}
2020-04-30 13:06:16,834 WARN [main] org.apache.nifi.web.server.JettyServer Failed to start
web server... shutting down.2020-04-30 13:06:16,834 WARN [main] org.apache.nifi.web.server.JettyServer
Failed to start web server... shutting down.org.apache.nifi.controller.serialization.FlowSerializationException:
org.xml.sax.SAXParseException; lineNumber: 51; columnNumber: 30; Character reference "&#
at org.apache.nifi.cluster.protocol.StandardDataFlow.parseFlowBytes(StandardDataFlow.java:140)
at org.apache.nifi.cluster.protocol.StandardDataFlow.getFlowDocument(StandardDataFlow.java:97)
at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:183)
at org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1426) at org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:89)
at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:792)
at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:537) at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:72)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:930)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:889) at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:425)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) at
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) at
org.apache.nifi.web.server.JettyServer.start(JettyServer.java:995) at org.apache.nifi.NiFi.<init>(NiFi.java:158)
at org.apache.nifi.NiFi.<init>(NiFi.java:72) at org.apache.nifi.NiFi.main(NiFi.java:301)Caused
by: org.xml.sax.SAXParseException: Character reference "&# at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanCharReferenceValue(XMLScanner.java:1345)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3053)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) at org.apache.nifi.cluster.protocol.StandardDataFlow.parseFlowBytes(StandardDataFlow.java:138)
... 44 common frames omitted {code}


> NiFi fails to startup if it encounters some unicode characters in the flow.xml.gz
> ---------------------------------------------------------------------------------
>
>                 Key: NIFI-7414
>                 URL: https://issues.apache.org/jira/browse/NIFI-7414
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>
> There are some elements where NiFi does not strip out invalid XML characters when writing
out the flow.xml.gz. For example, if a variable is created and the variable's value has a
unicode 0x0001 character in it, NiFi will accept the input but then will fail to restart with
the following stack trace:
> {quote}
> 2020-04-30 13:06:16,834 WARN [main] org.apache.nifi.web.server.JettyServer Failed to
start web server... shutting down.
> org.apache.nifi.controller.serialization.FlowSerializationException: org.xml.sax.SAXParseException;
lineNumber: 51; columnNumber: 30; Character reference "&#
> 	at org.apache.nifi.cluster.protocol.StandardDataFlow.parseFlowBytes(StandardDataFlow.java:140)
> 	at org.apache.nifi.cluster.protocol.StandardDataFlow.getFlowDocument(StandardDataFlow.java:97)
> 	at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:183)
> 	at org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1426)
> 	at org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:89)
> 	at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:792)
> 	at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:537)
> 	at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:72)
> 	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:930)
> 	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
> 	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:889)
> 	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356)
> 	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
> 	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)
> 	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
> 	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
> 	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
> 	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
> 	at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:425)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
> 	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
> 	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> 	at org.eclipse.jetty.server.Server.start(Server.java:407)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
> 	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
> 	at org.eclipse.jetty.server.Server.doStart(Server.java:371)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> 	at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:995)
> 	at org.apache.nifi.NiFi.<init>(NiFi.java:158)
> 	at org.apache.nifi.NiFi.<init>(NiFi.java:72)
> 	at org.apache.nifi.NiFi.main(NiFi.java:301)
> Caused by: org.xml.sax.SAXParseException: Character reference "&#
> 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
> 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
> 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
> 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
> 	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
> 	at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanCharReferenceValue(XMLScanner.java:1345)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3053)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
> 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
> 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
> 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
> 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
> 	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
> 	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
> 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
> 	at org.apache.nifi.cluster.protocol.StandardDataFlow.parseFlowBytes(StandardDataFlow.java:138)
> 	... 44 common frames omitted
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message