Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Nifi start not working but nifi run is

avatar
Explorer

Hello,

I recently installed Nifi on a Mac with an M1 chip, Sonoma 14.4.1. I am able to run "nifi.sh run" successfully and navigate to localhost port 8443/nifi. However, when I run "nifi.sh start" it fails to open localhost 8443/nifi. The logs do not throw any errors, I have checked (see screenshot below). I am running openjdk 21.0.2 and nifi 2.0.0-M2. My environment variables for java (/Library/Java/JavaVirtualMachines/jdk-21.0.2.jdk/Contents/Home), nifi (/Users/RZO4145/nifi-2.0.0-M2), and apache maven have been set.

I have also checked when doing the nifi.sh start, it looks like there is nothing listening on 8443 (and I checked nifi.properties, it is still set to 8443). I've also tried setting the host to 0.0.0.0 instead of 127.0.0.1 and changing the port. 

After about 5-10 minutes of running, I will finally be able to see it on localhost 8443 (see attached), but the page will still not load.

Is there something I'm missing?


Screenshot 2024-04-11 at 9.31.48 AM.png


Screenshot 2024-04-11 at 9.46.08 AM.png

8 REPLIES 8

avatar
Community Manager

@tmarkfeld Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our NiFi expert @steven-matison  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Master Guru

We need to see your nifi configuration files and how much ram is used.   Also is there enough disk space?

What is in the logs?

Being able to run in the foreground and not background usually means your user may have diminished privileges.  

 

Did you set a login?

 

See:   https://community.cloudera.com/t5/Support-Questions/start-nifi-automatically-when-system-boots/m-p/3...

avatar
Explorer

There is enough space, the Mac was just re-imaged so there is nothing on it other than the few applications I've installed. I did set a login, and I can successfully use that login when I have nifi running through "nifi.sh run". I have searched through the logs using grep for errors and warnings, and haven't seen any. When I run nifi.sh start, once I actually see something listening on port 8443 (which takes about 5-10 minutes), if I try to load nifi it will just get stuck loading and not do anything. No errors, no warnings.

avatar
Explorer

@steven-matison it looks like it gets stuck here: 

[main] org.apache.nifi.nar.NarUnpacker Expanding 115 NAR files started

avatar
Master Guru

Remember NiFi 2.0.0-M2 is an alpha release 2 branch is not yet released.

That tends to happen if you don't have enough RAM.   How much did you specify in your configuration.   Post logs, configuration, how much RAM, how much RAM assigned to JDK.

You probably need at least 4Gig of RAM assigned.

bootstrap config

# JVM memory settings
java.arg.2=-Xms6g
java.arg.3=-Xmx7g

conf/nifi.properties

nifi.web.https.host=127.0.0.1
nifi.web.https.port=8443
nifi.web.https.network.interface.default=
nifi.web.https.application.protocols=h2 http/1.1
nifi.web.jetty.working.directory=./work/jetty

 

avatar
Explorer

I currently have 6gb of ram assigned. I upped it from 1 and still nothing. Logs have no errors, I put them in debug mode as well and nothing out of the ordinary happened, just took forever to start (20 minutes if not more)

avatar
Super Mentor

@tmarkfeld 

The NiFi UI will not be avialable until you see the following lines in the nifi-app.log:

2024-03-17 16:39:59,500 INFO [main] org.apache.nifi.web.server.JettyServer NiFi has started. The UI is available at the following URLs:
2024-03-17 16:39:59,500 INFO [main] org.apache.nifi.web.server.JettyServer https://localhost:8443/nifi

Up until this time NiFi is still loading.
I see you mentioned it stalls at unpacking the nars but eventually completes as you also said eventually you see NiFi listening on port 8443.

You can use developer tools within your browser to see what calls have been made when you try to access your NiFi,  you could then share what calls were made and which it appears to be hanging on.

Hope this helps,
Matt

avatar
Community Manager

@tmarkfeld Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  Thanks.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: