nifi新节点加入集群操作

原有三个节点组成的Nifi集群,其中一个节点损坏,待修复完成之后,新节点要加入到现有集群中,主要修改的配置文件有:

conf/bootstrap.conf

conf/zookeeper.properties

conf/state-management.xml

conf/nifi.properties

conf/authorizers.xml

conf/login-identity-providers.xml

还需要重新生成密钥文件:

./tls-toolkit.sh standalone -n '172.28.231.30,172.28.231.33,172.28.231.36' --subjectAlternativeNames '172.28.231.30,172.28.231.33,172.28.231.36' -P secret -S secret -d 3600 -o ../store

三个节点都更新新的密钥文件

启动新节点,这时出现报错;

2020-06-08 11:58:38,012 ERROR [main] o.a.nifi.controller.StandardFlowService Failed to load flow from cluster due to: org.apache.nifi.controller.UninheritableFlowException: Failed to connect node to cluster because local flow is different than cluster flow.
org.apache.nifi.controller.UninheritableFlowException: Failed to connect node to cluster because local flow is different than cluster flow.
        at org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:1026)
        at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:539)
        at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1028)
        at org.apache.nifi.NiFi.<init>(NiFi.java:158)
        at org.apache.nifi.NiFi.<init>(NiFi.java:72)
        at org.apache.nifi.NiFi.main(NiFi.java:301)
Caused by: org.apache.nifi.controller.UninheritableFlowException: Proposed Authorizer is not inheritable by the flow controller because of Authorizer differences: Proposed Authorizations do not match current Authorizations: Proposed fingerprint is not inheritable because the current access policies is not empty.
        at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:333)
        at org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1376)
        at org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:88)
        at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:812)
        at org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:1001)
        ... 5 common frames omitted
2020-06-08 11:58:38,013 INFO [main] o.a.n.c.c.node.NodeClusterCoordinator 172.28.231.30:9443 requested disconnection from cluster due to org.apache.nifi.controller.UninheritableFlowException: Failed to connect node to cluster because local flow is different than cluster flow.
2020-06-08 11:58:38,014 INFO [main] o.a.n.c.c.node.NodeClusterCoordinator Status of 172.28.231.30:9443 changed from NodeConnectionStatus[nodeId=172.28.231.30:9443, state=CONNECTING, updateId=12] to NodeConnectionStatus[nodeId=172.28.231.30:9443, state=DISCONNECTED, Disconnect Code=Node's Flow did not Match Cluster Flow, Disconnect Reason=org.apache.nifi.controller.UninheritableFlowException: Failed to connect node to cluster because local flow is different than cluster flow., updateId=12]
2020-06-08 11:58:38,176 ERROR [main] o.a.n.c.c.node.NodeClusterCoordinator Event Reported for 172.28.231.30:9443 -- Node disconnected from cluster due to org.apache.nifi.controller.UninheritableFlowException: Failed to connect node to cluster because local flow is different than cluster flow.
2020-06-08 11:58:38,177 INFO [main] o.a.n.c.l.e.CuratorLeaderElectionManager Cannot unregister Leader Election Role 'Primary Node' becuase that role is not registered
2020-06-08 11:58:38,177 WARN [main] org.apache.nifi.web.server.JettyServer Failed to start web server... shutting down.
java.lang.IllegalStateException: Already closed or has not been started
        at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507)
        at org.apache.curator.framework.recipes.leader.LeaderSelector.close(LeaderSelector.java:272)
        at org.apache.nifi.controller.leader.election.CuratorLeaderElectionManager.unregister(CuratorLeaderElectionManager.java:164)
        at org.apache.nifi.controller.FlowController.setClustered(FlowController.java:2306)
        at org.apache.nifi.controller.StandardFlowService.handleConnectionFailure(StandardFlowService.java:578)
        at org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:542)
        at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:1028)
        at org.apache.nifi.NiFi.<init>(NiFi.java:158)
        at org.apache.nifi.NiFi.<init>(NiFi.java:72)
        at org.apache.nifi.NiFi.main(NiFi.java:301)
2020-06-08 11:58:38,181 INFO [Thread-1] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2020-06-08 11:58:38,216 INFO [Thread-1] o.eclipse.jetty.server.AbstractConnector Stopped ServerConnector@1356d4d4{SSL,[ssl, http/1.1]}{172.28.231.30:9443}
2020-06-08 11:58:38,217 INFO [Thread-1] org.eclipse.jetty.server.session node0 Stopped scavenging

具体原因是由于:本地流与群集流不同,授权与当前授权不匹配

解决方案:

1、删除新节点conf/flow.xml.gz

2、将其它节点的conf/users.xml和conf/authorizations.xml复制到新节点,使其保持一致

3、重启新节点,OK

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hblicy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值