Uploaded image for project: 'Apache NiFi MiNiFi - MOVED TO NIFI PROJECT'
  1. Apache NiFi MiNiFi - MOVED TO NIFI PROJECT
  2. MINIFI-521

minifi-toolkit-0.5.0: "Connection with id ... has invalid destination id" confused by targetId?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.5.0
    • 1.14.0
    • None
    • version: '3'
      services:
        nifi:
          image: apache/nifi:1:10.0
        minifi:
          image: apache/nifi-minifi:0.5.0

      minifi-toolkit-0.5.0, Windows

    Description

      I followed this tutorial: Getting started with MiNiFi

      And the problem was that, while transforming the Template to the yml-file, it failed with: "Connection with id 10de7342-41ef-37a5-0000-000000000000 has invalid destination id 9b02eb45-3c2d-3fb4-91cf-880d5038c0cd"

      minifi-toolkit-0.5.0\bin\config.bat transform  MiNiFi-buggy.xml config-buggy.yml
      
      There are validation errors with the template, still outputting YAML but it will need to be edited.
      Connection with id 10de7342-41ef-37a5-0000-000000000000 has invalid destination id 9b02eb45-3c2d-3fb4-91cf-880d5038c0cd
      

      By the help of brosander@github (Thank you, mate!) we discovered that the tool is confused by the targetId property:

                          <contents>
                              <inputPorts>
                                  <batchSettings/>
                                  <comments></comments>
                                  <concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
                                  <connected>true</connected>
                                  <exists>true</exists>
                                  <groupId>db4d2e20-016e-1000-d3c7-73a67e2b1d67</groupId>
                                  <id>9b02eb45-3c2d-3fb4-91cf-880d5038c0cd</id>
                                  <name>input_minifi</name>
                                  <targetId>dadd7f29-016e-1000-3c91-89495c813674</targetId>
                                  <targetRunning>false</targetRunning>
                                  <transmitting>false</transmitting>
                                  <useCompression>false</useCompression>
                              </inputPorts>
                          </contents>
      

      just by removing the targetId, the toolkit runs through:

      minifi-toolkit-0.5.0\bin\config.bat transform   MiNiFi-expected.xml config-expected.yml
      No validation errors found in converted configuration.
      

      The produced files differ:

      diff config-buggy.yml config-expected.yml
      101c101
      <     - id: dadd7f29-016e-1000-3c91-89495c813674
      ---
      >     - id: 9b02eb45-3c2d-3fb4-91cf-880d5038c0cd
      

      I tested it and NiFi discovers MiNiFi, everything seems fine.

      EDIT:

      I celebrated to early. Removing the targetId is not a working workaround. The easiest way to get around this issue is to downgrade NiFi from 1.10 to 1.9.2.

      Originally I thought this is a MiNiFi issue, but now I'm thinking that something changed in NiFi from 1.9.2 to 1.10.0 when exporting Templates. The ids are mixed up. This could be a much more critical bug, than I initially thought.

      Attachments

        1. config.yml
          3 kB
          Aldrin Piri
        2. config-buggy.yml
          3 kB
          Sebastian Napiorkowski
        3. config-expected.yml
          3 kB
          Sebastian Napiorkowski
        4. MiNiFi-buggy.xml
          8 kB
          Sebastian Napiorkowski
        5. MiNiFi-expected.xml
          8 kB
          Sebastian Napiorkowski
        6. minifi-flow.xml
          12 kB
          Aldrin Piri

        Issue Links

          Activity

            People

              aldrin Aldrin Piri
              sebnapi Sebastian Napiorkowski
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h