2
votes

In my current project, I have been using apache-nifi on Windows operating system. I have extracted nifi-0.7.0-bin.zip file in C:\. Now, when I run \bin\run-nifi.bat as an administrator I see the following message on the command line and I am not able to run nifi. Could you please suggest what should I do in order to run the nifi.

enter image description here

the content of app.log file as follows

2016-08-08 11:41:57,716 INFO [main] org.apache.nifi.NiFi Launching NiFi...
2016-08-08 11:41:57,851 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 50050
2016-08-08 11:41:57,877 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap
2016-08-08 11:42:59,485 WARN [Timer-0] org.apache.nifi.NiFi NiFi has detected that this box is not responding within the expected timing interval, which may cause Processors to be scheduled erratically. Please see the NiFi documentation for more information.

The content of nifi-bootstrap.log file is as follows:

2016-08-08 11:41:57,279 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: []
2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED
2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED
2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED
2016-08-08 11:41:57,298 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2016-08-08 11:41:57,299 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\NIFI-0~1.0
2016-08-08 11:41:57,299 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program Files\Java\jdk1.8.0_102\bin\java.exe -classpath C:\NIFI-0~1.0\.\conf;C:\NIFI-0~1.0\.\lib\jcl-over-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\jul-to-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\log4j-over-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\logback-classic-1.1.3.jar;C:\NIFI-0~1.0\.\lib\logback-core-1.1.3.jar;C:\NIFI-0~1.0\.\lib\nifi-api-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-documentation-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-nar-utils-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-properties-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-runtime-0.7.0.jar;C:\NIFI-0~1.0\.\lib\slf4j-api-1.7.12.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=C:\NIFI-0~1.0\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=50049 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NIFI-0~1.0\bin\..\\logs org.apache.nifi.NiFi 
2016-08-08 11:41:57,866 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read status file C:\NIFI-0~1.0\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2016-08-08 11:41:57,876 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 50050
1

1 Answers

1
votes

I recommend running NiFi with the current directory context in the bin directory:

  1. Open a new command prompt window
  2. Change to the NiFi bin directory, cd c:\nifi-0.7\bin
  3. From c:\nifi-0.7\bin, execute run-nifi.bat

I believe run-nifi.bat depends on finding nifi-env.bat in the current directory, rather than finding it relative to its own path. If you ran C:\...\nifi-0.7.0\bin\run-nifi.bat, I think you would see that error.