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.

Apache NiFi is not running on centos-7 ??

Highlighted

Apache NiFi is not running on centos-7 ??

New Contributor

Hi,

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

Thanks.

3 REPLIES 3

Re: Apache NiFi is not running on centos-7 ??

Master Guru
@Surendra Shringi

-

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.

-

Thank you,

Matt

-

If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.

Re: Apache NiFi is not running on centos-7 ??

New Contributor

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)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at org.apache.nifi.BootstrapListener.sendCommand(BootstrapListener.java:100)
at org.apache.nifi.BootstrapListener.start(BootstrapListener.java:83)
at org.apache.nifi.NiFi.<init>(NiFi.java:102)
at org.apache.nifi.NiFi.<init>(NiFi.java:71)
at org.apache.nifi.NiFi.main(NiFi.java:296)
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.

Thanks.

Re: Apache NiFi is not running on centos-7 ??

Master Guru

@Surendra Shringi

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.remote.input.host

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.

-

Thank you,

Matt