2016-08-08 100 views
2

在我目前的項目中,我一直在Windows操作系統上使用apache-nifi。 我在C:\中提取了nifi-0.7.0-bin.zip文件。現在,當我運行\bin\run-nifi.bat作爲管理員我在命令行上看到以下消息,我無法運行nifi。你能否建議我應該怎麼做才能運行nifi。窗口上的Nifi命令

enter image description here

app.log文件的內容如下

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. 

nifi-bootstrap.log文件的內容如下:

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

我建議用在當前目錄上下文中運行NiFi bin目錄:

  1. 打開一個新的命令提示符窗口
  2. 更改爲NiFi bin目錄,cd c:\nifi-0.7\bin
  3. 從C:\ nifi-0.7 \ bin中,執行run-nifi.bat

我相信run-nifi.bat取決於找到nifi- env.bat放在當前目錄中,而不是相對於它自己的路徑找到它。如果你跑C:\...\nifi-0.7.0\bin\run-nifi.bat,我想你會看到那個錯誤。

+0

感謝您的回答。這裏'run-nifi.bat'和'nifi-env.bat'文件位於'C:\ nifi-0.7 \ bin'文件夾中。我錯過了什麼嗎?如果您對我有任何建議,請告訴我。 – Pankesh

+0

嘗試更改到該目錄:cd c:\ nifi-0.7 \ bin,然後運行nifi'run-nifi.bat'。這是否更好? – James

+0

你的意思是 - 我應該將'run-nifi.bat複製到其他文件夾(比如'C:\ nifi-0.7 \ test'),然後從命令行運行這個文件? – Pankesh