java - Windows 上的 Nifi 命令

标签 java apache-nifi

在我目前的项目中,我一直在Windows操作系统上使用apache-nifi。 我已经在 C:\ 中提取了 nifi-0.7.0-bin.zip 文件。现在,当我以 管理员 身份运行 \bin\run-nifi.bat 时,我在命令行上看到以下消息,我无法运行 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

最佳答案

我建议在 bin 目录中使用当前目录上下文运行 NiFi:

  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,我想你会看到那个错误。

关于java - Windows 上的 Nifi 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38822146/

相关文章:

apache-nifi - 观看 NIFI 目录中的新文件

Java日期DST调整我的日期/时间

java - 迭代器中的 ConcurrentModificationException 帮助

excel - 在 Nifi 数据流中将 .xls 文件转换为 json 文件的位置?

hadoop - Nifi消耗卡夫卡不接受上游连接

apache - 使用 NiFi 更新 CSV 内字段中的值

java - 如何在 Spring Boot 中从 HttpSessionEvent 检索主体信息?

java - 按对象的属性对 map 进行排序

java - 简单 XML 框架反序列化的异常

java - 使用Java中的Rest API在apache NiFi中上传模板