2016-07-27 80 views
2

在我目前的項目中,我一直在使用apache nifi進行一些實驗目的。 當我第一次配置。 nifi運行完美(當我輸入http://localhost:8080/nifi/時,我能夠看到Google Chrome上的畫布,工具欄)。但是,重啓計算機一次後,我無法運行它。無法在Windows上運行Apache nifi

當我鍵入nifi.0.7.0\bin\run-nifi.bat命令時,我在控制檯上看到以下消息。

2016-07-27 10:19:39,246 INFO [main] org.apache.nifi.bootstrap.Command Starting A 
pache NiFi... 
2016-07-27 10:19:39,246 INFO [main] org.apache.nifi.bootstrap.Command Working Di 
rectory: C:\NIFI-0~1.0 
2016-07-27 10:19:39,246 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\log 
back-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:\NIF 
I-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.properti 
es.file.path=C:\NIFI-0~1.0\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=4 
9823 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NIFI-0~1.0\bin\..\ 
\logs org.apache.nifi.NiFi 

您能否告訴我這是什麼問題?我怎麼能解決這個問題?

更多的詳細信息,的nifi-app.log內容如下:

2016-07-31 17:47:52,531 INFO [main] org.apache.nifi.NiFi Launching NiFi... 
2016-07-31 17:47:52,687 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 54877 
2016-07-31 17:47:52,718 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap 
2016-07-31 17:58:20,339 INFO [main] org.apache.nifi.NiFi Launching NiFi... 
2016-07-31 17:58:20,464 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 49217 
2016-07-31 17:58:20,480 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap 

nifi-bootstrap.log內容如下:

2016-07-31 17:47:52,013 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: [] 
2016-07-31 17:47:52,013 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED 
2016-07-31 17:47:52,013 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED 
2016-07-31 17:47:52,013 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED 
2016-07-31 17:47:52,029 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi... 
2016-07-31 17:47:52,029 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\NIFI-0~1.0 
2016-07-31 17:47:52,029 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=54876 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NIFI-0~1.0\bin\..\\logs org.apache.nifi.NiFi 
2016-07-31 17:47:52,702 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-07-31 17:47:52,718 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 54877 
2016-07-31 17:55:03,208 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi 
2016-07-31 17:58:18,870 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: [] 
2016-07-31 17:58:18,870 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED 
2016-07-31 17:58:18,870 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED 
2016-07-31 17:58:18,870 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED 
2016-07-31 17:58:19,915 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi... 
2016-07-31 17:58:19,915 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\NIFI-0~1.0 
2016-07-31 17:58:19,915 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=49216 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NIFI-0~1.0\bin\..\\logs org.apache.nifi.NiFi 
2016-07-31 17:58:20,480 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-07-31 17:58:20,480 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 49217 

nifi-user.log

當我嘗試撥打localhost:8080/nifi/時,我看到以下內容。 enter image description here

+0

你可以在瀏覽器中使用apache nifi嗎? – gks

+0

沒有。我無法在瀏覽器中運行Apache Nifi。 :(:( – Pankesh

+1

我沒有看到上述日誌中的任何錯誤,只需檢查nifi的狀態。要查看NiFi的當前狀態,雙擊狀態-nifi.bat – gks

回答

4

嘗試檢查配置文件是否具有值「nifi.sensitive.props.key =」以下鍵「。 如果它是空的,請設置一個鍵,如示例「nifi.sensitive.props.key = 132134」。

如果您仍然處於煩惱狀態,請觀看此視頻,應該有所幫助。 https://www.youtube.com/watch?v=DDd6KayUHt8

一切順利。

+0

這適用於我在WIndows 7上運行,x64 – mccainz

+0

也爲我工作。謝謝! –

0

除了之前的評論幫助我解決了這個問題之外,您還需要花費一點時間,因爲這裏已經討論了https://community.hortonworks.com/questions/107192/nifi-web-ui-not-working-facing-error-err-connectio.html。事實上,在啓動Nifi之後,Web界面並不能立即到達,Nifi需要一段時間來初始化所有內容。您可以通過訪問名爲:nifi-app.log的日誌文件來追蹤Nifi的執行情況,您可以在NIFI_HOME/logs中找到它。 我認爲消息:org.apache.nifi.NiFi控制器初始化耗時132792678105納秒(132秒)是Nifi Web界面可以使用的好兆頭。