Docker-Nifi:1.14.0-启动失败-原因:org.apache.nifi.properties.SensitivePropertyProtectionException [英] Docker - Nifi : 1.14.0 - Startup failure - Caused by: org.apache.nifi.properties.SensitivePropertyProtectionException

查看:22
本文介绍了Docker-Nifi:1.14.0-启动失败-原因:org.apache.nifi.properties.SensitivePropertyProtectionException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我对docker和nifi完全陌生,我需要在docker上设置nifi,但我收到以下错误。

下面的错误文本或(screenshot of error - on terminal)

nifi01_1   | 2021-09-17 02:12:30,707 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Loaded 202 properties from /opt/nifi/nifi-current/./conf/nifi.properties
nifi01_1   | 2021-09-17 02:12:30,719 ERROR [main] o.a.nifi.properties.NiFiPropertiesLoader Clustered Configuration Found: Shared Sensitive Properties Key [nifi.sensitive.props.key] required for cluster nodes
nifi01_1   | 2021-09-17 02:12:30,723 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.lang.IllegalArgumentException: There was an issue decrypting protected properties
nifi01_1   | java.lang.IllegalArgumentException: There was an issue decrypting protected properties
nifi01_1   |    at org.apache.nifi.NiFi.initializeProperties(NiFi.java:346)
nifi01_1   |    at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:314)
nifi01_1   |    at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:310)
nifi01_1   |    at org.apache.nifi.NiFi.main(NiFi.java:302)
nifi01_1   | Caused by: org.apache.nifi.properties.SensitivePropertyProtectionException: Sensitive Properties Key [nifi.sensitive.props.key] not found: See Admin Guide section [Updating the Sensitive Properties Key]
nifi01_1   |    at org.apache.nifi.properties.NiFiPropertiesLoader.getDefaultProperties(NiFiPropertiesLoader.java:220)
nifi01_1   |    at org.apache.nifi.properties.NiFiPropertiesLoader.get(NiFiPropertiesLoader.java:209)
nifi01_1   |    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
nifi01_1   |    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
nifi01_1   |    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
nifi01_1   |    at java.lang.reflect.Method.invoke(Method.java:498)
nifi01_1   |    at org.apache.nifi.NiFi.initializeProperties(NiFi.java:341)
nifi01_1   |    ... 3 common frames omitted
nifi01_1 exited with code 0

docker-compose.yml:

#    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.

version: "3"
services:
  zookeeper:
    hostname: zookeeper
    container_name: zookeeper
    image: 'bitnami/zookeeper:latest'
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
    networks:
      - nifinet
  nifi01:
    image: apache/nifi:1.14.0
    ports:
      - 6980:8080 # Unsecured HTTP Web Port
    networks:
      - nifinet
    environment:
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_CLUSTER_IS_NODE=true
      - NIFI_CLUSTER_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper:2181
      - NIFI_ELECTION_MAX_WAIT=1 min
  nifi02:
    image: apache/nifi:1.14.0
    ports:
      - 6979:8080 # Unsecured HTTP Web Port
    networks:
      - nifinet
    environment:
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_CLUSTER_IS_NODE=true
      - NIFI_CLUSTER_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper:2181
      - NIFI_ELECTION_MAX_WAIT=1 min
  nifi03:
    image: apache/nifi:1.14.0
    ports:
      - 6978:8080 # Unsecured HTTP Web Port
    networks:
      - nifinet
    environment:
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_CLUSTER_IS_NODE=true
      - NIFI_CLUSTER_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper:2181
      - NIFI_ELECTION_MAX_WAIT=1 min
networks:
  nifinet:
    driver: bridge

根据我的研究,我提到我必须更新nifi.properties中的几个属性,但不确定如何在docker图像上设置它们。请帮帮忙。

推荐答案

只需将NIFI_SENSITIVE_PROPS_KEY作为环境变量添加到您的docker-Copmose文件nifis中。它可以是随机字符串,但确保长度至少为12个字符(否则,NiFi不会接受它)。

这篇关于Docker-Nifi:1.14.0-启动失败-原因:org.apache.nifi.properties.SensitivePropertyProtectionException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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