在Linux机器上运行NiFi

时间:2016-03-13 06:37:11

标签: apache-nifi

我刚刚为linux下载了nifi-0.5.1。

尝试使用以下命令运行Nifi:./nifi.sh run

我在nifi-app.log中收到以下异常:

  

2016-03-13 05:29:42,959警告[主要]   org.apache.nifi.web.server.JettyServer无法启动Web服务器...   关闭。 org.apache.nifi.web.NiFiCoreException:无法启动   流量控制器。           at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:99)   〜[NA:NA]           at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)   〜[码头 - 服务器 - 9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)   〜[码头-servlet的9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)   〜[码头 - 服务器 - 9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)   〜[码头-servlet的9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)   〜[码头-web应用-9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)   〜[码头-web应用-9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)   〜[码头 - 服务器 - 9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)   〜[码头-web应用-9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)   〜[码头-UTIL-9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)   〜[码头-UTIL-9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)   〜[码头-UTIL-9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)   〜[码头 - 服务器 - 9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)   〜[码头-UTIL-9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)   〜[码头-UTIL-9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.server.Server.start(Server.java:387)〜[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)   〜[码头-UTIL-9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)   〜[码头 - 服务器 - 9.2.11.v20150529.jar:9.2.11.v20150529]           在org.eclipse.jetty.server.Server.doStart(Server.java:354)〜[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]           at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)   〜[码头-UTIL-9.2.11.v20150529.jar:9.2.11.v20150529]           在org.apache.nifi.web.server.JettyServer.start(JettyServer.java:663)   〜[nifi-码头-0.5.1.jar:0.5.1]           在org.apache.nifi.NiFi。(NiFi.java:137)[nifi-runtime-0.5.1.jar:0.5.1]           在org.apache.nifi.NiFi.main(NiFi.java:227)[nifi-runtime-0.5.1.jar:0.5.1]引起:   java.nio.file.FileSystemException:   ./flowfile_repository/partition-61/2.journal:打开的文件过多           at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)   〜[NA:1.7.0_45]           at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)   〜[NA:1.7.0_45]           at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)   〜[NA:1.7.0_45]           at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)   〜[NA:1.7.0_45]           在java.nio.file.Files.newByteChannel(Files.java:315)〜[na:1.7.0_45]           在java.nio.file.Files.newByteChannel(Files.java:361)〜[na:1.7.0_45]           在java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:380)   〜[NA:1.7.0_45]           在java.nio.file.Files.newInputStream(Files.java:106)〜[na:1.7.0_45]           at org.wali.MinimalLockingWriteAheadLog $ Partition.createDataInputStream(MinimalLockingWriteAheadLog.java:932)   〜[nifi-预写日志-0.5.1.jar:0.5.1]           在org.wali.MinimalLockingWriteAheadLog $ Partition.getRecoveryStream(MinimalLockingWriteAheadLog.java:947)   〜[nifi-预写日志-0.5.1.jar:0.5.1]           at org.wali.MinimalLockingWriteAheadLog $ Partition.getNextRecoverableTransactionId(MinimalLockingWriteAheadLog.java:973)   〜[nifi-预写日志-0.5.1.jar:0.5.1]           在org.wali.MinimalLockingWriteAheadLog.recoverFromEdits(MinimalLockingWriteAheadLog.java:419)   〜[nifi-预写日志-0.5.1.jar:0.5.1]           在org.wali.MinimalLockingWriteAheadLog.recoverRecords(MinimalLockingWriteAheadLog.java:293)   〜[nifi-预写日志-0.5.1.jar:0.5.1]           at org.apache.nifi.controller.repository.WriteAheadFlowFileRepository.loadFlowFiles(WriteAheadFlowFileRepository.java:323)   〜[nifi的框架芯-0.5.1.jar:0.5.1]           在org.apache.nifi.controller.FlowController.initializeFlow(FlowController.java:609)   〜[nifi的框架芯-0.5.1.jar:0.5.1]           at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:641)   〜[nifi的框架芯-0.5.1.jar:0.5.1]           在org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:479)   〜[nifi的框架芯-0.5.1.jar:0.5.1]           at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:79)   〜[NA:NA]           ...省略了22个常见帧2016-03-13 05:29:42,961 INFO [Thread-1] org.apache.nifi.NiFi启动Jetty web关闭   服务器...

感谢您的帮助,

1 个答案:

答案 0 :(得分:2)

默认情况下,由于其类加载器隔离方法及其作为数据流应用程序的功能,NiFi在启动时会访问相当多的文件。请参阅管理指南,其中介绍了如何将打开文件句柄数量的操作系统限制设置得更高。 linux中的默认操作系统文件句柄限制通常为1024,这对于NiFi来说实在太低了。

https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#configuration-best-practices