Apache Nifi failed to start web server (shutting down) during DocGenerator.generate()
Asked Answered
V

2

7

Apache-Nifi v-1.7.1 was running fine on AWS Centos machine but now on restart it thrown following error: (below content of /nifi-app.log)

            org.apache.nifi:nifi-standard-nar:1.7.1 || ./work/nar/extensions/nifi-standard-nar-1.7.1.nar-unpacked
    org.apache.nifi.processors.standard.FetchSFTP
            org.apache.nifi:nifi-standard-nar:1.7.1 || ./work/nar/extensions/nifi-standard-nar-1.7.1.nar-unpacked
    org.apache.nifi.processors.azure.eventhub.ConsumeAzureEventHub
            org.apache.nifi:nifi-azure-nar:1.7.1 || ./work/nar/extensions/nifi-azure-nar-1.7.1.nar-unpacked
    === End Processor types ===
2019-01-21 10:07:15,987 WARN [main] org.apache.nifi.web.server.JettyServer Failed to start web server... shutting down.
java.lang.NullPointerException: null
    at org.apache.nifi.documentation.DocGenerator.generate(DocGenerator.java:62)
    at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:835)
    at org.apache.nifi.NiFi.<init>(NiFi.java:157)
    at org.apache.nifi.NiFi.<init>(NiFi.java:71)
    at org.apache.nifi.NiFi.main(NiFi.java:292)
2019-01-21 10:07:15,987 INFO [Thread-1] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2019-01-21 10:07:15,988 INFO [Thread-1] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).
Verein answered 21/1, 2019 at 10:24 Comment(6)
obviously nifi failed to generate documentation for one of the nar files. probably you put new nar to the /lib folder?Average
or you have problems on server with unpacking nar files. check /work/nar folderAverage
@Average thanks for suggestion.. let me check. doc first.Verein
@daggett, how to instruct jetty to not care about generating doc ?Verein
didn't worked..Verein
Something wrong with unpacking nars. Check for any warnings in log files like Unable to load NAR library.... Set DEBUG level for org.apache.nifi in logback.xml, clean the logs and restart the server and look for nar that fails to extract...Average
V
3
sudo chown -R nifi:nifi /opt/nifi/
sudo service nifi start 

worked for me.

Verein answered 20/2, 2019 at 9:56 Comment(0)
E
4

I ran into this issue when the folders pointed to by nifi.nar.library.directory.* was inaccessible, e.g. the Symbolic links were no longer valid due to file system changes.

Fixed the links and the server came up.

Exuberant answered 20/2, 2019 at 4:55 Comment(2)
How did you fix them?Wornout
As stated, referenced location was inaccessible, be it permissions or broken links. Correct permissions or links and service started fine. Note I had custom processors in shared HA folder which became unavailable when admins modified autofs.Exuberant
V
3
sudo chown -R nifi:nifi /opt/nifi/
sudo service nifi start 

worked for me.

Verein answered 20/2, 2019 at 9:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.