I am running NiFi on centos-7, but its not running. I tried many times but the same issue came. I used command ./bin/nifi.sh restart and the output came "org.apache.nifi.bootstrap.Command Apache NiFi is not running" .
If i am missing anything pls let me know.
Java home: /usr/lib/jvm/java-1.8.0-openjdk
NiFi home: /root/nifi-1.8.0
If NiFi is not running when you execute a "./nifi.sh restart" command, I woudl expect to see "org.apache.nifi.bootstrap.Command Apache NiFi is not running" logged in the nifi-bootstrap.log. The restart command issues stop and start actions (the stop action would trigger this log line output).
I assume that what you are seeing is that the start action does not result in a NiFi successful start. The startup if the NIFi service occurs in two phases:
1. The boostrap is started (log outout form this process is written to the nifi-bootstrap.log).
2. The bootstrap starts teh main NiFi core service as a separate java child process. The startup of tis process is logged in the nifi-app.log. (this startup may take several minutes to complete).
I suggest tailing your nifi-app.log and see if an exception is logged during startup. Often times the exception clearky states what the issue is (memory issue, permissions issue, port in use issue, etc...). The NiFi UI will not be available until the service is completely up. Watch NiFi app log for line that includes "UI is available at following" which will then list each URL NiFi UI can be reached from.
If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.
Thanks @Matt Clarke for quick repl.
As per "nifi-bootstrap.log" i am getting ##################
org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 21089
org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi
o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: 
org.apache.nifi.bootstrap.Command Apache NiFi is not running
As per "nifi-app.log" i am getting #####################
ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
2019-01-03 10:14:26,252 INFO [Thread-1] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2019-01-03 10:14:26,253 INFO [Thread-1] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).
2019-01-03 10:20:48,165 INFO [main] org.apache.nifi.NiFi Launching NiFi...
2019-01-03 10:20:48,509 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Determined default nifi.properties path to be '/root/nifi-1.8.0/./conf/nifi.properties'
Now could you ple suggest where to and what to change in properties files.
Is this a single NiFi instance or part of . NiFi cluster?
I suggest taking a look at your nfii.properties and make sure you have configured valid/resolvable hostnames for the following properties:
nifi.web.http.host or nifi.web.https.host --- (Use hostname command to verify hostname of NiFi server and try pinging those hostnames form command line on NiFi server. Was resolution successful and was ping successful)
nifi.cluster.node.address --- (if clustered setup)
nifi.zookeeper.connect.string --- (if clustered setup)
Verify there are no misconfigurations in /etc/hosts file that would affect resolution of above configured hostnames.