Apache nifi MiNiFi在使用命令和控制(C2)服务器更新config.yml文件时,由于bootstrap.conf文件而关闭
我正在使用命令和控制(C2)服务器自动更新minifi中的config.yml文件。C2从当前运行的NiFi实例中的模板获取此文件。它每隔1分钟只更新config.yml一次,第二次尝试后会显示: 错误[pool-2-thread-2]org.apache.nifi.bootstrapplistener无法与引导通信。引导程序可能无法从MiNiFi发出或接收命令。 然后它关闭了minifi,并且没有重新启动 请注意,我仍然没有更新NiFi中的模板,因此它将要求与以前相同的config.yml文件 minifi-c2-context.xmlApache nifi MiNiFi在使用命令和控制(C2)服务器更新config.yml文件时,由于bootstrap.conf文件而关闭,apache-nifi,minify,Apache Nifi,Minify,我正在使用命令和控制(C2)服务器自动更新minifi中的config.yml文件。C2从当前运行的NiFi实例中的模板获取此文件。它每隔1分钟只更新config.yml一次,第二次尝试后会显示: 错误[pool-2-thread-2]org.apache.nifi.bootstrapplistener无法与引导通信。引导程序可能无法从MiNiFi发出或接收命令。 然后它关闭了minifi,并且没有重新启动 请注意,我仍然没有更新NiFi中的模板,因此它将要求与以前相同的config.yml文件
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<beans default-lazy-init="true" xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="configService" class="org.apache.nifi.minifi.c2.service.ConfigService" scope="singleton">
<constructor-arg>
<list>
<!--<bean class="org.apache.nifi.minifi.c2.provider.cache.CacheConfigurationProvider">
<constructor-arg>
<list>
<value>text/yml</value>
</list>
</constructor-arg>
<constructor-arg>
<bean class="org.apache.nifi.minifi.c2.cache.filesystem.FileSystemConfigurationCache">
<constructor-arg>
<value>./files</value>
</constructor-arg>
<constructor-arg>
<value>${class}/config</value>
</constructor-arg>
</bean>
</constructor-arg>
<constructor-arg>
<bean class="org.apache.nifi.minifi.c2.cache.s3.S3ConfigurationCache">
<constructor-arg>
<value>bucket</value>
</constructor-arg>
<constructor-arg>
<value>prefix/</value>
</constructor-arg>
<constructor-arg>
<value>${class}</value>
</constructor-arg>
<constructor-arg>
<value>access-key</value>
</constructor-arg>
<constructor-arg>
<value>secret-key</value>
</constructor-arg>
<constructor-arg>
<value>us-east-1</value>
</constructor-arg>
</bean>
</constructor-arg>
</bean>-->
<bean class="org.apache.nifi.minifi.c2.provider.nifi.rest.NiFiRestConfigurationProvider">
<constructor-arg>
<bean class="org.apache.nifi.minifi.c2.cache.filesystem.FileSystemConfigurationCache">
<constructor-arg>
<value>./cache</value>
</constructor-arg>
<constructor-arg>
<value>${class}/${class}</value>
</constructor-arg>
</bean>
</constructor-arg>
<constructor-arg>
<value>http://localhost:8080/nifi-api</value>
</constructor-arg>
<constructor-arg>
<value>${class}.v${version}</value>
</constructor-arg>
</bean>
</list>
</constructor-arg>
<constructor-arg>
<bean class="org.apache.nifi.minifi.c2.security.authorization.GrantedAuthorityAuthorizer">
<constructor-arg value="classpath:authorizations.yaml"/>
</bean>
</constructor-arg>
</bean>
minifi中的nifi.properties
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
#Wed Nov 20 15:01:56 IST 2019
# Core Properties #
nifi.version=1.4.0
nifi.flow.configuration.file=./conf/flow.xml.gz
nifi.flow.configuration.archive.enabled=false
nifi.flow.configuration.archive.dir=./conf/archive/
nifi.flowcontroller.autoResumeState=true
nifi.flowcontroller.graceful.shutdown.period=10 sec
nifi.flowservice.writedelay.interval=500 ms
nifi.administrative.yield.duration=30 sec
nifi.variable.registry.properties=
# If a component has no work to do (is "bored"), how long should we wait before checking again for work?
nifi.bored.yield.duration=10 millis
nifi.authority.provider.configuration.file=./conf/authority-providers.xml
nifi.login.identity.provider.configuration.file=./conf/login-identity-providers.xml
nifi.templates.directory=./conf/templates
nifi.ui.banner.text=
nifi.ui.autorefresh.interval=30 sec
nifi.nar.library.directory=./lib
nifi.nar.working.directory=./work/nar/
nifi.documentation.working.directory=./work/docs/components
##################### State Management #####################
nifi.state.management.configuration.file=./conf/state-management.xml
# The ID of the local state provider
nifi.state.management.provider.local=local-provider
# H2 Settings
nifi.database.directory=./database_repository
nifi.h2.url.append=;LOCK_TIMEOUT\=25000;WRITE_DELAY\=0;AUTO_SERVER\=FALSE
# FlowFile Repository
nifi.flowfile.repository.implementation=org.apache.nifi.controller.repository.WriteAheadFlowFileRepository
nifi.flowfile.repository.directory=./flowfile_repository
nifi.flowfile.repository.partitions=256
nifi.flowfile.repository.checkpoint.interval=2 mins
nifi.flowfile.repository.always.sync=false
nifi.swap.manager.implementation=org.apache.nifi.controller.FileSystemSwapManager
nifi.queue.swap.threshold=20000
nifi.swap.in.period=5 sec
nifi.swap.in.threads=1
nifi.swap.out.period=5 sec
nifi.swap.out.threads=4
# Content Repository
nifi.content.repository.implementation=org.apache.nifi.controller.repository.FileSystemRepository
nifi.content.claim.max.appendable.size=10 MB
nifi.content.claim.max.flow.files=100
nifi.content.repository.archive.max.retention.period=
nifi.content.repository.archive.max.usage.percentage=
nifi.content.repository.archive.enabled=false
nifi.content.repository.directory.default=./content_repository
nifi.content.repository.always.sync=false
# Provenance Repository Properties
nifi.provenance.repository.implementation=org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepository
nifi.provenance.repository.rollover.time=1 min
# Volatile Provenance Respository Properties
nifi.provenance.repository.buffer.size=10000
# Component Status Repository
nifi.components.status.repository.implementation=org.apache.nifi.controller.status.history.VolatileComponentStatusRepository
nifi.components.status.repository.buffer.size=1440
nifi.components.status.snapshot.frequency=1 min
# web properties #
nifi.web.war.directory=./lib
nifi.web.http.host=
nifi.web.http.port=8081
nifi.web.https.host=
nifi.web.https.port=
nifi.web.jetty.working.directory=./work/jetty
nifi.web.jetty.threads=200
# security properties #
nifi.sensitive.props.key=
nifi.sensitive.props.algorithm=PBEWITHMD5AND256BITAES-CBC-OPENSSL
nifi.sensitive.props.provider=BC
nifi.security.keystore=
nifi.security.keystoreType=
nifi.security.keystorePasswd=
nifi.security.keyPasswd=
nifi.security.truststore=
nifi.security.truststoreType=
nifi.security.truststorePasswd=
nifi.security.needClientAuth=
nifi.security.user.credential.cache.duration=24 hours
nifi.security.user.authority.provider=file-provider
nifi.security.user.login.identity.provider=
nifi.security.support.new.account.requests=
# Valid Authorities include: ROLE_MONITOR,ROLE_DFM,ROLE_ADMIN,ROLE_PROVENANCE,ROLE_NIFI
nifi.security.anonymous.authorities=
nifi.security.ocsp.responder.url=
nifi.security.ocsp.responder.certificate=
# cluster node properties (only configure for cluster nodes) #
nifi.cluster.is.node=false
# cluster manager properties (only configure for cluster manager) #
nifi.cluster.is.manager=false
您可以将bootstrap.conf(raspi)上的本地主机从您的计算机(已安装的c2服务器)更改为您的ip地址。您可以分享c2服务器和MiNiFi本身的配置吗?如果是这样的话,请随意上传到gist或类似文件中,以提高可读性。我已根据要求编辑了问题并添加了配置。
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
#Wed Nov 20 15:01:56 IST 2019
# Core Properties #
nifi.version=1.4.0
nifi.flow.configuration.file=./conf/flow.xml.gz
nifi.flow.configuration.archive.enabled=false
nifi.flow.configuration.archive.dir=./conf/archive/
nifi.flowcontroller.autoResumeState=true
nifi.flowcontroller.graceful.shutdown.period=10 sec
nifi.flowservice.writedelay.interval=500 ms
nifi.administrative.yield.duration=30 sec
nifi.variable.registry.properties=
# If a component has no work to do (is "bored"), how long should we wait before checking again for work?
nifi.bored.yield.duration=10 millis
nifi.authority.provider.configuration.file=./conf/authority-providers.xml
nifi.login.identity.provider.configuration.file=./conf/login-identity-providers.xml
nifi.templates.directory=./conf/templates
nifi.ui.banner.text=
nifi.ui.autorefresh.interval=30 sec
nifi.nar.library.directory=./lib
nifi.nar.working.directory=./work/nar/
nifi.documentation.working.directory=./work/docs/components
##################### State Management #####################
nifi.state.management.configuration.file=./conf/state-management.xml
# The ID of the local state provider
nifi.state.management.provider.local=local-provider
# H2 Settings
nifi.database.directory=./database_repository
nifi.h2.url.append=;LOCK_TIMEOUT\=25000;WRITE_DELAY\=0;AUTO_SERVER\=FALSE
# FlowFile Repository
nifi.flowfile.repository.implementation=org.apache.nifi.controller.repository.WriteAheadFlowFileRepository
nifi.flowfile.repository.directory=./flowfile_repository
nifi.flowfile.repository.partitions=256
nifi.flowfile.repository.checkpoint.interval=2 mins
nifi.flowfile.repository.always.sync=false
nifi.swap.manager.implementation=org.apache.nifi.controller.FileSystemSwapManager
nifi.queue.swap.threshold=20000
nifi.swap.in.period=5 sec
nifi.swap.in.threads=1
nifi.swap.out.period=5 sec
nifi.swap.out.threads=4
# Content Repository
nifi.content.repository.implementation=org.apache.nifi.controller.repository.FileSystemRepository
nifi.content.claim.max.appendable.size=10 MB
nifi.content.claim.max.flow.files=100
nifi.content.repository.archive.max.retention.period=
nifi.content.repository.archive.max.usage.percentage=
nifi.content.repository.archive.enabled=false
nifi.content.repository.directory.default=./content_repository
nifi.content.repository.always.sync=false
# Provenance Repository Properties
nifi.provenance.repository.implementation=org.apache.nifi.provenance.MiNiFiPersistentProvenanceRepository
nifi.provenance.repository.rollover.time=1 min
# Volatile Provenance Respository Properties
nifi.provenance.repository.buffer.size=10000
# Component Status Repository
nifi.components.status.repository.implementation=org.apache.nifi.controller.status.history.VolatileComponentStatusRepository
nifi.components.status.repository.buffer.size=1440
nifi.components.status.snapshot.frequency=1 min
# web properties #
nifi.web.war.directory=./lib
nifi.web.http.host=
nifi.web.http.port=8081
nifi.web.https.host=
nifi.web.https.port=
nifi.web.jetty.working.directory=./work/jetty
nifi.web.jetty.threads=200
# security properties #
nifi.sensitive.props.key=
nifi.sensitive.props.algorithm=PBEWITHMD5AND256BITAES-CBC-OPENSSL
nifi.sensitive.props.provider=BC
nifi.security.keystore=
nifi.security.keystoreType=
nifi.security.keystorePasswd=
nifi.security.keyPasswd=
nifi.security.truststore=
nifi.security.truststoreType=
nifi.security.truststorePasswd=
nifi.security.needClientAuth=
nifi.security.user.credential.cache.duration=24 hours
nifi.security.user.authority.provider=file-provider
nifi.security.user.login.identity.provider=
nifi.security.support.new.account.requests=
# Valid Authorities include: ROLE_MONITOR,ROLE_DFM,ROLE_ADMIN,ROLE_PROVENANCE,ROLE_NIFI
nifi.security.anonymous.authorities=
nifi.security.ocsp.responder.url=
nifi.security.ocsp.responder.certificate=
# cluster node properties (only configure for cluster nodes) #
nifi.cluster.is.node=false
# cluster manager properties (only configure for cluster manager) #
nifi.cluster.is.manager=false