Support Questions

Find answers, ask questions, and share your expertise

NiFi-1.5 not starting and showing error org.apache.nifi.bootstrap.RunNiFi NiFi never started Will not restart NiFi and Caused by: java.io.EOFException: Unexpected end of ZLIB input stream

avatar

nifi-bootstrap.log:-

2018-04-03 18:11:38,628 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: []
2018-04-03 18:11:38,636 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED
2018-04-03 18:11:38,636 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED
2018-04-03 18:11:38,636 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED
2018-04-03 18:11:39,764 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2018-04-03 18:11:39,766 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0
2018-04-03 18:11:39,772 INFO [main] org.apache.nifi.bootstrap.Command Command: java -classpath C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\conf;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\javax.servlet-api-3.1.0.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\jcl-over-slf4j-1.7.25.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\jetty-schemas-3.1.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\jul-to-slf4j-1.7.25.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\log4j-over-slf4j-1.7.25.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\logback-classic-1.2.3.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\logback-core-1.2.3.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-api-1.5.0.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-framework-api-1.5.0.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-nar-utils-1.5.0.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-properties-1.5.0.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-runtime-1.5.0.jar;C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\slf4j-api-1.7.25.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx5120m -Xms5120m -Djavax.security.auth.useSubjectCredsOnly=true -Djava.security.egd=file:/dev/urandom -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -XX:+UseG1GC -Dnifi.properties.file.path=C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=55486 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\bin\..\\logs org.apache.nifi.NiFi 
2018-04-03 18:11:40,274 WARN [main] org.apache.nifi.bootstrap.Command Failed to set permissions so that only the owner can read pid file C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2018-04-03 18:11:40,292 WARN [main] org.apache.nifi.bootstrap.Command Failed to set permissions so that only the owner can read status file C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\bin\..\run\nifi.status; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2018-04-03 18:11:40,302 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 13708
2018-04-03 18:11:41,026 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read pid file C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2018-04-03 18:11:41,065 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read status file C:\Users\206508~1\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\bin\..\run\nifi.status; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2018-04-03 18:11:41,076 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 55487
2018-04-03 18:11:55,355 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi

nifi-app.log:-

2018-04-03 09:22:23,790 INFO [main] o.e.j.a.AnnotationConfiguration Scanning elapsed time=419ms
2018-04-03 09:22:23,821 INFO [main] o.e.j.C./nifi-content-viewer No Spring WebApplicationInitializer types detected on classpath
2018-04-03 09:22:23,836 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.w.WebAppContext@24888d8b{/nifi-content-viewer,file:///C:/Users//Downloads/nifi-1.5.0-bin/nifi-1.5.0/work/jetty/nifi-web-content-viewer-1.5.0.war/webapp/,AVAILABLE}{.\work\nar\framework\nifi-framework-nar-1.5.0.nar-unpacked\META-INF\bundled-dependencies\nifi-web-content-viewer-1.5.0.war}
2018-04-03 09:22:23,836 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.s.h.ContextHandler@eaa07bb{/nifi-docs,null,AVAILABLE}
2018-04-03 09:22:24,101 INFO [main] o.e.j.a.AnnotationConfiguration Scanning elapsed time=19ms
2018-04-03 09:22:24,133 INFO [main] o.e.jetty.ContextHandler./nifi-docs No Spring WebApplicationInitializer types detected on classpath
2018-04-03 09:22:24,148 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.w.WebAppContext@6eae3730{/nifi-docs,file:///C:/Users//Downloads/nifi-1.5.0-bin/nifi-1.5.0/work/jetty/nifi-web-docs-1.5.0.war/webapp/,AVAILABLE}{.\work\nar\framework\nifi-framework-nar-1.5.0.nar-unpacked\META-INF\bundled-dependencies\nifi-web-docs-1.5.0.war}
2018-04-03 09:22:24,335 INFO [main] o.e.j.a.AnnotationConfiguration Scanning elapsed time=19ms
2018-04-03 09:22:24,351 INFO [main] org.eclipse.jetty.ContextHandler./ No Spring WebApplicationInitializer types detected on classpath
2018-04-03 09:22:24,398 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.w.WebAppContext@3da55998{/,file:///C:/Users//Downloads/nifi-1.5.0-bin/nifi-1.5.0/work/jetty/nifi-web-error-1.5.0.war/webapp/,AVAILABLE}{.\work\nar\framework\nifi-framework-nar-1.5.0.nar-unpacked\META-INF\bundled-dependencies\nifi-web-error-1.5.0.war}
2018-04-03 09:22:24,429 INFO [main] o.eclipse.jetty.server.AbstractConnector Started ServerConnector@6406b84d{HTTP/1.1,[http/1.1]}{0.0.0.0:9090}
2018-04-03 09:22:24,429 INFO [main] org.eclipse.jetty.server.Server Started @93634ms
2018-04-03 09:22:24,429 WARN [main] org.apache.nifi.web.server.JettyServer Failed to start web server... shutting down.
org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller.
    at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:88)
    at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:876)
    at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
    at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:839)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
    at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
    at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:290)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
    at org.eclipse.jetty.server.Server.start(Server.java:452)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    at org.eclipse.jetty.server.Server.doStart(Server.java:419)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:798)
    at org.apache.nifi.NiFi.<init>(NiFi.java:160)
    at org.apache.nifi.NiFi.main(NiFi.java:268)
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
    at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
    at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:117)
    at java.io.FilterInputStream.read(FilterInputStream.java:107)
    at org.apache.nifi.util.file.FileUtils.copy(FileUtils.java:303)
    at org.apache.nifi.controller.StandardFlowService.copyCurrentFlow(StandardFlowService.java:971)
    at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:707)
    at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:534)
    at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:72)
    ... 32 common frames omitted
2018-04-03 18:11:55,107 INFO [Thread-0] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2018-04-03 18:11:55,107 INFO [Thread-0] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).

I have delete all repositories and journal directories and restarted nifi again, but nothing changed nifi logs are showing the same above error.NiFi is running on java -version 1.8.0_161.

6 REPLIES 6

avatar

Can you please confirm your classpath setting and make sure its pointing to correct version of NiFI.

avatar

@milind pandit

Thanks for your response, Yes it is pointing to correct classpath. NiFi has been running until yesterday afternoon without any issues, when i did restart of my computer then tried to start NiFi 1.5 i'm getting this issueand i haven't changed any classpath and java versions before/after restart.

avatar

Please confirm if you tried deleting the flow repository at. $nifi_home/flowfile_repository. Also take backup of flow.xml.gz file. delete it and try again. The file is in your conf dir.

avatar
@milind pandit

if i delete flow.xml.gz then nifi will start without any issues, root cause is flow.xml.gz has been corrupted and throwing all these errors.

avatar
Master Guru

The error is coming from trying to read the flow.xml.gz file which is typically in the conf dir. It seems this file may be corrupted.

If you don't care about your flow, then you can blow away this file to start fresh.

If you do care about your flow then you'll need to figure out what happened to this file. If it is a valid file you should be able to run gunzip to get it back to a regular flow.xml file, and then gzip to get it back to flow.xml.gz

avatar
@Bryan Bende

You are right flow.xml.gz has been corrupted even i'm not able to do gunzip flow.xml.gz throwing error. As i have deleted the flow.xml.gz and restarted NiFi instance.
Is there any way that we can backup flow.xml.gz regular basis? and does new NiFi version control includes the backup of flow.xml.gz also?