在我目前的项目中,我一直在使用apache nifi进行一些实验。
当我第一次配置时。 nifi运行得很完美(当我输入http://localhost:8080/nifi/
时,我能够看到Google Chrome上的画布,工具栏)。但是,重新启动计算机一次后,我无法运行它。
当我输入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
为空。
答案 0 :(得分:6)
尝试检查配置文件是否具有带有值的以下密钥“nifi.sensitive.props.key =”。 如果它是空的,请设置一个键,例如“nifi.sensitive.props.key = 132134”。
如果您仍然遇到麻烦,请观看此视频,应该有所帮助。 https://www.youtube.com/watch?v=DDd6KayUHt8
一切顺利。
答案 1 :(得分:6)
除了以前帮助我解决问题的评论之外,你还要给它一点时间,因为这里已经讨论了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界面可以使用的好兆头。
答案 2 :(得分:1)
我最初也遇到了这个问题,但后来查看日志,url 是 http://127.0.0.1:8080/nifi
并且它起作用而不是 localhost
答案 3 :(得分:0)
Nifi需要一些时间来启动它。查看日志,似乎启动时没有错误。尝试在5分钟或更晚之后致电localhost:8080 / nifi。希望之后您将能够看到NiFi-UI。
答案 4 :(得分:0)
UI需要花费一些时间来加载,因为它将触发JAVA控制台,然后您必须接受。发布您可以在localhost:8080 / nifi
处访问URL的信息