Created 05-03-2018 01:51 PM
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 ?
Created 05-03-2018 02:41 PM
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
Created 05-03-2018 02:41 PM
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
Created 05-04-2018 12:36 PM
*** 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.
Created 05-04-2018 12:59 PM
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)
Created 05-04-2018 08:13 AM
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"