Support Questions

Find answers, ask questions, and share your expertise

Nifi Bootstrap listener listening some other ports !!! After nifi.sh start command

avatar

NIFI START:

bin]# ./nifi.sh start

Java home: /usr/jdk64/jdk1.8.0_112/

NiFi home: /usr/src/nifi-1.7.1

Bootstrap Config File: /usr/src/nifi-1.7.1/conf/bootstrap.conf

bin]#

NIFI BOOTSTRAP.log

2018-09-05 06:13:50,068 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: [] 2018-09-05 06:13:50,083 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTE D 2018-09-05 06:13:50,083 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPE D 2018-09-05 06:13:50,083 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED 2018-09-05 06:13:50,087 INFO [main] org.apache.nifi.bootstrap.Command Apache NiFi is not currently running 2018-09-05 06:14:24,885 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: [] 2018-09-05 06:14:24,889 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTE D 2018-09-05 06:14:24,889 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPE D 2018-09-05 06:14:24,889 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED 2018-09-05 06:14:25,019 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi... 2018-09-05 06:14:25,020 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: /usr/src/nifi-1.7.1 2018-09-05 06:14:25,020 INFO [main] org.apache.nifi.bootstrap.Command Command: /usr/jdk64/jdk1.8.0_112/bin/java -classpath /usr/src/nifi-1. 7.1/./conf:/usr/src/nifi-1.7.1/./lib/jcl-over-slf4j-1.7.25.jar:/usr/src/nifi-1.7.1/./lib/nifi-nar-utils-1.7.1.jar:/usr/src/nifi-1.7.1/./lib /log4j-over-slf4j-1.7.25.jar:/usr/src/nifi-1.7.1/./lib/nifi-properties-1.7.1.jar:/usr/src/nifi-1.7.1/./lib/jul-to-slf4j-1.7.25.jar:/usr/src /nifi-1.7.1/./lib/nifi-runtime-1.7.1.jar:/usr/src/nifi-1.7.1/./lib/javax.servlet-api-3.1.0.jar:/usr/src/nifi-1.7.1/./lib/nifi-framework-api -1.7.1.jar:/usr/src/nifi-1.7.1/./lib/jetty-schemas-3.1.jar:/usr/src/nifi-1.7.1/./lib/logback-classic-1.2.3.jar:/usr/src/nifi-1.7.1/./lib/lo gback-core-1.2.3.jar:/usr/src/nifi-1.7.1/./lib/slf4j-api-1.7.25.jar:/usr/src/nifi-1.7.1/./lib/nifi-api-1.7.1.jar -Dorg.apache.jasper.compil er.disablejsr199=true -Xmx512m -Xms512m -Djavax.security.auth.useSubjectCredsOnly=true -Djava.security.egd=file:/dev/urandom -Dsun.net.http .allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -XX:+UseG1GC -Djava.protocol.handler.pkgs=sun.net.www .protocol -Dnifi.properties.file.path=/usr/src/nifi-1.7.1/./conf/nifi.properties -Dnifi.bootstrap.listen.port=18979 -Dapp=NiFi -Dorg.apache .nifi.bootstrap.config.log.dir=/usr/src/nifi-1.7.1/logs org.apache.nifi.NiFi 2018-09-05 06:14:25,097 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 19438 2018-09-05 06:14:28,120 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi

NIFI-APP.log


logs]# cat nifi-app.log 2018-09-05 06:14:26,418 INFO [main] org.apache.nifi.NiFi Launching NiFi... 2018-09-05 06:14:27,546 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Determined default nifi.properties path to be '/usr/src/nifi-1 .7.1/./conf/nifi.properties' 2018-09-05 06:14:27,551 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Loaded 148 properties from /usr/src/nifi-1.7.1/./conf/nifi.pro perties 2018-09-05 06:14:27,558 INFO [main] org.apache.nifi.NiFi Loaded 148 properties 2018-09-05 06:14:27,581 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 2 4264 2018-09-05 06:14:27,587 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.net.ConnectException: Connection refused (Conn ection 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:292) 2018-09-05 06:14:27,594 INFO [Thread-1] org.apache.nifi.NiFi Initiating shutdown of Jetty web server... 2018-09-05 06:14:27,594

INFO [Thread-1] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).

NOTE :I already tried this following configuration.

1. My java path is correct

2.etc/hosts are also correct

3.nifi.properties http.port is 8090

I installed NIFI without Ambari in centos but, I am using Ambari on the same server already

I did wget <repo>from apache NIFI and extracted in to the /usr/src/ folder

4 REPLIES 4

avatar
Master Mentor
@Hariprasanth Madhavan

-

There are two separate processes that are associated to Nifi on startup.

The bootstrap service starts and listens for requests from the second nifi process (main application). The Exception above leads me to believe that the second process is unable to communicate with the bootstrap process listening on port 24264. This is likely because it is trying to communicate with localhost:24264 and you so not have an entry in your server's /etc/hosts file resolving localhost to any address (for example: 127.0.0.1 localhost)

-

Thank you,

Matt

-

If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.

avatar
Master Mentor

You are also going to want to make sure you have set the following nifi.properties file properties:

nifi.web.http(s).host= leaving this blanks means Java will try to determine hostname which may result in an incorrect hostname being determined or Java just using localhost instead of the actual server hostname.
-

Then you want to make sure whatever hostname you enter here is properly resolvable to a valid IP for your server.

avatar

Hi,

I already metioned nifi.web.http(s).host=(my server ip) in nifi.properties. But problem still remains same. I mentioned my IP insteead of my FQDN.

avatar

i am running NiFi on ambari server, at the starting time i am getting this error. As per your response, which file port or what to be changed in system. Bcz i did not understand your answer. And in my /etc/hosts i configured 4 host server ip with FQDN I am running NiFi only one Host and so how it can communicate to another process(main application) where to find out second NiFi process in ambari. I downloaded NiFi-1.6.0 on 1 host and it was configured.

@Matt Clarke