Support Questions

Find answers, ask questions, and share your expertise

Unable to start up a single NiFi node

avatar
Rising Star

I have a single NiFi node, new installation, but I'm not able to launch NiFi from command line. Any pointer is appreciated.

-- HDF 2.1.1.0-2

-- No Ambari

-- CentOS 7

In nifi-bootstrap.log

2017-07-31 12:20:23,970 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2017-07-31 12:20:23,971 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: /usr/hdf/2.1.1.0-2/nifi
2017-07-31 12:20:23,971 INFO [main] org.apache.nifi.bootstrap.Command Command: java -classpath /usr/hdf/2.1.1.0-2/nifi/./conf:/usr/hdf/2.1.1.0-2/nifi/./lib/jcl-over-slf4j-1.7.12.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/jul-to-slf4j-1.7.12.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/log4j-over-slf4j-1.7.12.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/logback-classic-1.1.3.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/logback-core-1.1.3.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/nifi-properties-1.1.0.2.1.1.0-2.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/nifi-api-1.1.0.2.1.1.0-2.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/nifi-runtime-1.1.0.2.1.1.0-2.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/nifi-documentation-1.1.0.2.1.1.0-2.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/nifi-framework-api-1.1.0.2.1.1.0-2.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/nifi-nar-utils-1.1.0.2.1.1.0-2.jar:/usr/hdf/2.1.1.0-2/nifi/./lib/slf4j-api-1.7.12.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -XX:-AssumeMP -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -XX:ReservedCodeCacheSize=256m -XX:+UseG1GC -Djava.protocol.handler.pkgs=sun.net.www.protocol -XX:+UseCodeCacheFlushing -XX:CodeCacheMinimumFreeSpace=10m -Dnifi.properties.file.path=/usr/hdf/2.1.1.0-2/nifi/./conf/nifi.properties -Dnifi.bootstrap.listen.port=16627 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=/usr/hdf/2.1.1.0-2/nifi/logs org.apache.nifi.NiFi
2017-07-31 12:20:24,991 DEBUG [main] org.apache.nifi.bootstrap.RunNiFi Status File: /usr/hdf/2.1.1.0-2/nifi/run/nifi.status
2017-07-31 12:20:24,992 DEBUG [main] org.apache.nifi.bootstrap.RunNiFi Status File: /usr/hdf/2.1.1.0-2/nifi/run/nifi.lock
2017-07-31 12:20:24,992 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi


In nifi-app.log

2017-07-31 12:20:24,456 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 37982
2017-07-31 12:20:24,462 DEBUG [main] org.apache.nifi.BootstrapListener Notifying Bootstrap that local port is 37982
2017-07-31 12:20:24,465 DEBUG [Listen to Bootstrap] org.apache.nifi.BootstrapListener Listening for Bootstrap Requests
2017-07-31 12:20:24,467 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) ~[na:1.8.0_141]
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_141]
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_141]
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_141]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_141]
        at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_141]
        at java.net.Socket.connect(Socket.java:538) ~[na:1.8.0_141]
        at org.apache.nifi.BootstrapListener.sendCommand(BootstrapListener.java:100) ~[nifi-runtime-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
        at org.apache.nifi.BootstrapListener.start(BootstrapListener.java:83) ~[nifi-runtime-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
        at org.apache.nifi.NiFi.<init>(NiFi.java:102) ~[nifi-runtime-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
        at org.apache.nifi.NiFi.main(NiFi.java:262) ~[nifi-runtime-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
2017-07-31 12:20:24,470 INFO [Thread-1] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2017-07-31 12:20:24,471 INFO [Thread-1] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).
1 ACCEPTED SOLUTION

avatar
Rising Star

Turns out it was not able to talk to "localhost:37982".

Checked “/etc/hosts”, found that there was not "127.0.0.1 localhost". Added it to "hosts" file and restarted NiFi, it worked.

View solution in original post

5 REPLIES 5

avatar
Rising Star

Configured nifi to run with'nifi' user. Disabled firewall

avatar
@Vincent Jiang

Did you change the ownership of the nifi directories and files to the nifi user?

avatar
Rising Star

Yes I did that. I've been following the NiFi best practice

avatar
Rising Star

Turns out it was not able to talk to "localhost:37982".

Checked “/etc/hosts”, found that there was not "127.0.0.1 localhost". Added it to "hosts" file and restarted NiFi, it worked.

avatar
Rising Star

Hi @Vincent Jiang,

How you solved this issue. Bcz i am facing same issue on Ambari server. could you post your config or solution here.

Thanks.