Support Questions

Find answers, ask questions, and share your expertise

NIFI Installation: keep getting "Apache NiFi is not running"

Explorer

Hello all,

I downloaded NIFI on a linux ec2 node. I set the JAVA_HOME and am trying to run as su. I am running the command ./nifi.sh run. I do not see any error messages on nifi-app.log or nifi-bootstrap.log but when I check status I keep getting "Apacha Nifi not running". Am I missing some basic check here? One more issue: nifi-user.log file stays at 0 KB (doesn't get updated).

Thanks

1 ACCEPTED SOLUTION

Expert Contributor

I am seeing that nifi is trying to start and is getting killed for some reason, don't see any logs that indicate an error.

Are you being patient enough? There is a lot of packages that get unpacked and setup when you run nifi for the first time. Also the entropy can sometimes block, so may try giving it some more time, around 15 minutes and see if it comes up. I am just hoping you are not terminating it too early.

If that is not the case, what kind of ec2 are you using, how much memory, disk space and cores?

View solution in original post

19 REPLIES 19

Expert Contributor

@Ranjit S can you confirm nothing else is running on port 8080. This is port used by nifi for web-ui. You can look into logs/nifi-bootstrap.log and logs/nifi-app.log and see if there are any errors.

Expert Contributor

if you have some other process running on port 8080, you can change nifi to use a different port by changing the value in conf/nifi.properties. replace 8080 with whatever port you want.

Explorer

@Karthik Narayanan

I am not sure if my previous reply got posted. I think it got lost. My 8080 is not in use. I ran netstat -pan and did not get any reference of 8080 in my output. I also tried changing port to 9090 but no luck. The log files don't contain any error either. The file: nifi-user.log stays at 0KB though. Any other suggestions?

Thanks for your help!

Expert Contributor

@Ranjit S what about nifi-bootstrap.log and nifi-app.log can you check that. Also, it could be possible you may getting stuck in the java entropy issue. In your conf/bootstrap.conf file add the following line .

java.arg.15=-Djava.security.egd=file:/dev/./urandom

Try starting nifi now.

Explorer

@Karthik Narayanan nifi-bootstrap.log and nifi.app.log do not show any error. I added the java.arg.15 line but I still get the same issue.

Rising Star

@Ranjit S I would recommend using ./nifi.sh start, rather than ./nifi.sh run and see if that works out for you. You can then stop it by running "nifi.sh stop".

Explorer

@mpayne I tried running nifi using ./nifi.sh start and after few minutes tries ./nifi.sh status and I still get the same result that nifi is not running.

Expert Contributor

@Ranjit S That is strange.... can you show us your directory structure, a screenshot of it. Also make sure you downloaded the full tar and that it was not corrupted. I should see something in nifi-bootstrap.log at least.

Rising Star

I agree - that would be useful. Any chance that there are permissions issues at play here? The user running NiFi will need write permissions to the $NIFI_HOME directory and all subdirectories.

Explorer

@mpayne I gave 777 permission to all files and folders in nifi_home but still no luck.

Explorer

@Karthik Narayanan I uploaded the two log files (renamed them as txt for upload) and screenshot of directory structure. Do you see any issues with these? Thanks for all your help!

directorystructure-screenshot.jpgnifi-app.txtnifi-bootstrap.txt

Rising Star

@Ranjit S If you do a cat run/nifi.pid does it contain a valid PID? I.e., if you do "ps -ef | grep <pid>" does that show a process that is currently running?

Explorer

@mpayne

The PID I got was 25163. The result for "ps -ef | grep <pid>" is below. I am not sure how to interpret the below result. Does this look like a valid PID?

ec2-user 25257 23220 0 16:30 pts/0 00:00:00 grep --color=auto 25163

Rising Star

That looks like there is no process running with that PID. So NiFi did indeed stop. It's very strange that the logs show nothing of that nature, though...

Expert Contributor

I am seeing that nifi is trying to start and is getting killed for some reason, don't see any logs that indicate an error.

Are you being patient enough? There is a lot of packages that get unpacked and setup when you run nifi for the first time. Also the entropy can sometimes block, so may try giving it some more time, around 15 minutes and see if it comes up. I am just hoping you are not terminating it too early.

If that is not the case, what kind of ec2 are you using, how much memory, disk space and cores?

Explorer

@Karthik Narayanan

I am being patient enough but it just does not start. I think it might be that my ec2 instance is low on memory and disk. It is a free instance. 10GB disk, 1GB memory and 1 core. Is that insufficient for nifi?

I am not stopping nifi manually. It just dies automatically.

Expert Contributor

yeah, i would try a bigger instance. To quickly do this, go into cons/bootstrap.conf and may be reduce the Xms and Xmx to link 128m and see what happens. It could be possible that OS is not able to allocate 512m to nifi.

Explorer
@Karthik Narayanan

I think the issue was with memory as you pointed out. I am running nifi for last 20 mins and it has not exited. the status command also shows that it is running. I am not able to open the browser but that's probably because of low system resources. I will wait for some more time and see if there are any issues.

Expert Contributor

check the security group on AWS, make sure there is a incoming rule for port 8080.