Windows 上的 Nifi 命令 [英] Nifi commands on windows

查看:20
本文介绍了Windows 上的 Nifi 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我当前的项目中,我一直在 Windows 操作系统上使用 apache-nifi.我已经在 C:\ 中提取了 nifi-0.7.0-bin.zip 文件.现在,当我以 管理员 身份运行 \bin\run-nifi.bat 时,我在命令行上看到以下消息,但我无法运行 nifi.您能否建议我应该怎么做才能运行 nifi.

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.

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:

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

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

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.

这篇关于Windows 上的 Nifi 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆