0

我对 NiFi 有点挑战……确切地说是 MiNiFi。我们使用 MiNiFi 将日志从远程系统传送到 NiFi 实例,从那里传送到 Kafka 和 Elasticsearch。我们可以在没有 https 的情况下成功地做到这一点,但是,最近我的任务是使用 https 安全地做同样的事情。

使用证书,我可以连接到 NiFi UI,挑战是 MiNiFi 无法连接到远程 NiFi 上的 RPG,并出现错误“无法在 URI https://xxxx.com:9443/nifi与远程 NiFi 通信由于:收到致命警报:handshake_failure”。我怀疑这是因为以下错误

2018-07-23 16:27:23,083 INFO [main] o.apache.nifi.controller.FlowController 未启用 RAW Socket 站点到站点功能,因为未设置 nifi.remote.input.socket.port

2018-07-23 16:27:23,083 INFO [main] o.apache.nifi.controller.FlowController 由于“nifi.remote.input.http.enabled”属性为不对

我试图在 MiNiFi 的 nifi.properties 文件中设置这些属性,但每次重新启动时该文件总是被覆盖并加载默认值。请问,您对如何解决此问题有任何想法吗?

如何在启动时在 config.yml 文件或任何其他位置引导这些设置?

4

1 回答 1

1

您需要在从 NiFi 导出到 MiNiFi 的原始流程中进行设置。nifi.propertiesMiNiFi 实例的 是从提供的文件中自动生成的config.yml。该文件是通过使用 MiNiFi Converter Toolkit 转换导出的模板 XML 文件生成的。

有关更多信息,您可以观看这些视频或阅读入门指南

您需要在 中查找类似以下的行config.yml

Security Properties:
    keystore: /tmp/ssl/localhost-ks.jks
    keystore type: JKS
    keystore password: localtest
    key password: localtest
    truststore: /tmp/ssl/localhost-ts.jks
    truststore type: JKS
    truststore password: localtest
    ssl protocol: TLS
    Sensitive Props:
        key:
        algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL
        provider: BC

Remote Processing Groups:
- name: http://localhost:8080/nifi
  url: http://localhost:8080/nifi
  comment: ''
  timeout: 30 sec
  yield period: 10 sec
  Input Ports:
  - id: AUTOGENERATED_NIFI_PORT_ID_HERE
    name: MiNiFi-input
    comment: ''
    max concurrent tasks: 1
    use compression: false
    Properties: # Deviates from spec and will later be removed when this is autonegotiated      
        Port: 1026      
        Host Name: localhost
于 2018-07-23T20:57:49.540 回答