Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ambari show nifi as down but nifi is up

Solved Go to solution

ambari show nifi as down but nifi is up

Explorer

ambari show nifi service down but I can go in the nifi UI and I see that everything is ok all services (6 services) of the clusters are up (I see 6/6).

I don't see any nifi.pid on servers, it is may be the reason.

ls /var/run/nifi

nifi.status

... but no nifi.pid,

How configure nifi to create nifi.pid at startup ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: ambari show nifi as down but nifi is up

Master Guru
@vincent yernaux

There is no user configuration that needs to be done to get NiFi to create the nifi.pid file.

Do you see any errors in the nifi-bootstrap.log about being unable to create the nifi.pid file?

-

I would suggest shutting down all 6 nodes.

Then verify that the NiFi process is in fact stopped on all nodes. (ps -ef|grep nifi)

Then restart your NiFi cluster again and monitor both the nifi-bootstrap.log and nifi-app.log for any errors/warns that may be related to pid file generation.

-

Thanks,

Matt

View solution in original post

4 REPLIES 4
Highlighted

Re: ambari show nifi as down but nifi is up

Master Guru
@vincent yernaux

There is no user configuration that needs to be done to get NiFi to create the nifi.pid file.

Do you see any errors in the nifi-bootstrap.log about being unable to create the nifi.pid file?

-

I would suggest shutting down all 6 nodes.

Then verify that the NiFi process is in fact stopped on all nodes. (ps -ef|grep nifi)

Then restart your NiFi cluster again and monitor both the nifi-bootstrap.log and nifi-app.log for any errors/warns that may be related to pid file generation.

-

Thanks,

Matt

View solution in original post

Highlighted

Re: ambari show nifi as down but nifi is up

Master Guru

@vincent yernaux

*** Forum tip: Try to avoid responding to an answer by starting a new answer. This makes following a single threaded discussion hard. Instead use the "add comment" on the answer you want to have open dialog.

-

Not really sure how you ended up in this state... Permission denied tells me the user you are currently logged in as does not own the NiFi process, have execute permissions on the nifi.sh file, or it could be some bogus output simply because the pid file is missing.

-

I know there was a bug in the HDF 3.1 nifi service install that failed to properly set ownership on a number of NiFi files/directories to the nifi user. So you may want to go to /usr/hdf/3.1.1.0-35 directory and performa recursive ownership change on the nifi directory ( chown -R nifi.nifi nifi ).

-

You can use the "ps -ef|grep nifi" command to get the process ID for the two java processes associated to NiFi. You can then manually kill those two processes.

-

Then try starting NiFi again from Ambari UI.

-

Thanks,

Matt

-

If you found this answer addressed your question, please take a moment to login to the forum and click "accept" on the answer.

Highlighted

Re: ambari show nifi as down but nifi is up

Explorer

thank you it solve my problem:

cd /usr/hdf/3.1.1.0-35
chown -R nifi:nifi nifi
./bin/nifi.sh stop

... on all hosts and start via ambari (now I have /var/run/nifi/nifi.pid)
Highlighted

Re: ambari show nifi as down but nifi is up

Explorer

Hello,

I tried to stop nifi as you said via command line

/usr/hdf/3.1.1.0-35/nifi/bin/nifi.sh stop

and I got "permission denied"

so I find the problem of permission and

chown nifi:nifi /usr/hdf/3.1.1.0-35/nifi/bin/nifi-env.sh

and vi this file to put "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk"

but when I try to stop again, I have "Error: Could not find or load main class org.apache.nifi.bootstrap.RunNifi"

Don't have an account?
Coming from Hortonworks? Activate your account here