Created 11-29-2024 08:23 AM
Hello ,
I use "nifi.cmd start" to start with NIFI.
Sometime it works and most of the times it doesn't.
In case where NIFI doesn't work I am getting following logs :
2024-11-29 21:06:39,642 INFO [main] o.a.n.w.StandardContentViewerApplication Starting StandardContentViewerApplication using Java 21.0.2 with PID 24600 (D:\WorkingInstaller\2.0\nifi-2.0.0-bin\nifi-2.0.0\work\jetty\nifi-standard-content-viewer-2.0.0.war\webapp\WEB-INF\classes started by Riyaz in D:\WorkingInstaller\2.0\nifi-2.0.0-bin\nifi-2.0.0)
2024-11-29 21:06:39,643 INFO [main] o.a.n.w.StandardContentViewerApplication No active profile set, falling back to 1 default profile: "default"
Any pointers would be appreciated.
Thanks,
Riyaz
Created 12-05-2024 05:57 AM
I have the same problem.
Created 12-05-2024 12:57 PM
@MattWho @SAMSAL @mburgess Hi! Do you have some insights here?
Regards,
Diana Torres,Created 12-09-2024 12:25 PM
@mohdriyaz
These are just INFO level log lines. What logging did you see in the NiFi bootstrap.log?
Does the process die or does just appear hung and not progressing to point where UI is becomes available?
On the times where NiFi did start, what log lines are seen immediately after above are output?
Thanks,
Matt
Created 12-09-2024 11:56 PM
Hello,
The process hangs. The lines in mohdriyaz' screenshot are the last ones that appear. There are no errors. When quitting with ctrl-c in the CMD window, one Java process is hanging and needs to be killed with the task manager.
In cases when the start succeeds, the app log continues within a second and the memory usage of the java process increases.
I think the bootstrap log seems normal when the startup fails, for example:
2024-12-05 14:58:44,813 INFO [main] o.a.n.b.command.RunBootstrapCommand Java Version: 21.0.5+11-LTS
2024-12-05 14:58:44,813 INFO [main] o.a.n.b.command.RunBootstrapCommand Available Processors: 4
2024-12-05 14:58:44,891 INFO [main] o.a.n.b.command.RunBootstrapCommand E:\jdk21.0.5_11\bin\java.exe --class-path E:\nifi-2.0.0\lib\jcl-over-slf4j-2.0.16.jar;E:\nifi-2.0.0\lib\jul-to-slf4j-2.0.16.jar;E:\nifi-2.0.0\lib\log4j-over-slf4j-2.0.16.jar;E:\nifi-2.0.0\lib\logback-classic-1.5.12.jar;E:\nifi-2.0.0\lib\logback-core-1.5.12.jar;E:\nifi-2.0.0\lib\nifi-api-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-framework-api-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-nar-utils-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-per-process-group-logging-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-properties-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-property-utils-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-python-framework-api-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-runtime-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-server-api-2.0.0.jar;E:\nifi-2.0.0\lib\nifi-stateless-api-2.0.0.jar;E:\nifi-2.0.0\lib\slf4j-api-2.0.16.jar;E:\nifi-2.0.0\conf -Dorg.apache.nifi.bootstrap.config.log.dir=E:\nifi-2.0.0\logs -Dnifi.properties.file.path=E:\nifi-2.0.0\conf\nifi.properties -Dorg.apache.nifi.management.server.address=127.0.0.1:52020 -Djavax.security.auth.useSubjectCredsOnly=true -Xmx10g -Djava.awt.headless=true -Xms5g -Dsun.net.http.allowRestrictedHeaders=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dcurator-log-only-first-connection-issue-as-error-level=true org.apache.nifi.NiFi
2024-12-05 14:58:44,922 INFO [main] org.apache.nifi.bootstrap.Command Application Process [10636] started
2024-12-05 14:58:44,922 INFO [main] org.apache.nifi.bootstrap.Command Bootstrap Process Running
2024-12-05 14:59:44,939 INFO [StartBootstrapCommand] o.a.n.b.c.ApplicationProcessStatusBootstrapCommand Application Process [10636] running
2024-12-05 14:59:44,939 INFO [StartBootstrapCommand] o.a.n.b.command.StartBootstrapCommand Application monitoring started
2024-12-05 14:59:49,954 INFO [StartBootstrapCommand] o.a.n.b.c.ApplicationProcessStatusBootstrapCommand Application Process [10636] running
2024-12-05 14:59:54,955 INFO [StartBootstrapCommand] o.a.n.b.c.ApplicationProcessStatusBootstrapCommand Application Process [10636] running
And keeps repeating the same line until you kill it.
Thanks,
Created 12-10-2024 12:00 AM
I attach a screenshot of the log when the start succeeds.
Created 12-10-2024 06:04 AM
@Dahlgren @mohdriyaz
Before launching did you check to make sure all the previous running NiFi java process were gone?
Can you share more detail about your environments (Windows version and Java version)?
Any details on the Java process you have to terminate after quitting with ctrl-c in the CMD window?
Thanks,
Matt
Created 12-10-2024 06:24 AM
Yes, I kill the Java process before trying again. After trying 5-10 times, NiFi normally starts.
Windows Server 2022 Datacenter, 21H2
The Java version is Corretto-21.0.5.11.1, and I also tried Zulu 21.38+21-CA, both have the problem.
Not sure, but I think it’s the bootstrap process that ends with ctrl-c, while the application process remains hung and must be killed with the task manager.
Created 12-10-2024 09:43 AM
@Dahlgren
I conversation with a committer to the Apache NiFi product and he stated that this is a known issue they are aware of and investigating. There is no Apache NiFi jira that I can find specifically for this issue. . The best suggestion I can make at this point is maybe raising an Apache NiFi jira and if possible share thread dumps (3 dumps spaced 5 minutes apart). Looking at what threads are not progressing from one thread dump to the next may provide clues as to where specifically it is getting hung in the startup code. That should narrow down the scope of investigation and confirm that all experiencing this issue are getting hung in the same code area.
Of course including your NIFi 2.0.0-Mx specific version, OS version, and Java version is also important in that Apache Jira.
Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt
Created 12-10-2024 11:16 AM
@Dahlgren
- Make sure you are using a Java 21 JDK and not a Java 21 JRE.
- Try excluding the NiFi directory to include all the repositories from your Virus scanning software and see if that helps resolve the startup issue.
Here is an Apache NiFi slack thread discussing this same issue:
https://apachenifi.slack.com/archives/C0L9UPWJZ/p1731963549046199
Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt