Created on 09-06-2023 07:48 AM - edited 09-06-2023 07:54 AM
For my work, I had to copy nifi 1.10.0 nars into lib folder of nifi 1.22.0. I do this as part of docker image build process.
This work seems to support this.
First, container launch has issues with multiple jetty nars, so I dont't copy them, and jetty issue is gone. But container launch still fails with:
java.lang.IllegalStateException: Multiple framework NARs discovered. Only one framework is permitted
Is this due to nar versions(1.10.0 and 1.22.0) or do I need some more configuration to make it work?
Created on 09-06-2023 02:47 PM - edited 09-06-2023 02:57 PM
@manishg
You should only be copying over component nars and not of the core or framework nars. You still want your NiFi running with the newer 1.22. core and framework. None of the component nars should be dependent on a specific core or framework nar version.
So start by only including the nars for the components (processors, controller services and reporting tasks) you use and don't copy any other lib.
of course the best approach is to test your flows in new version and make adjustments where needed so that it works in 1.22. Copying over older component nars will simply provide multiple version of the same components in the list of available components in NiFi. You lose out on component enhancement, bug fixes, and security improvements. Additionally, you are likely to run in to more issue down the road as you upgrade to an even newer version. Is your plan to keep adding more nars with each upgrade (1.10, 1.22, 1.23, etc.)? On startup NiFi loads the flow.json.gz and looks for the component class defined in the flow.json.gz with version defined in flow.json.gz. If it does not find that version AND only finds one other version fo the same component class, NiFi will auto switch to using that available version of the component. As soon as you have multiple versions avialable and noe match what is in flow.json.gz at startup, NiFi will NOT pick a new one and instead instantiate a "ghost" processor on the canvas. So you run more risks by not fixing/updating your dataflows to work in the newer version.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 09-06-2023 08:00 AM
@manishg You should only copy individual nars that you know you need, not ALL 1.10 nars. You error suggest a conflict with 1 or more. That being said, be super careful with the expectation that things from 1.10 will work in 1.22. Each of them would to be tested individually for compatibility in 1.22.x.
Created 09-06-2023 08:02 AM
Ok. So I would need to copy them one by one and check if container launches. It would be lot of work I guess.
Created on 09-06-2023 02:47 PM - edited 09-06-2023 02:57 PM
@manishg
You should only be copying over component nars and not of the core or framework nars. You still want your NiFi running with the newer 1.22. core and framework. None of the component nars should be dependent on a specific core or framework nar version.
So start by only including the nars for the components (processors, controller services and reporting tasks) you use and don't copy any other lib.
of course the best approach is to test your flows in new version and make adjustments where needed so that it works in 1.22. Copying over older component nars will simply provide multiple version of the same components in the list of available components in NiFi. You lose out on component enhancement, bug fixes, and security improvements. Additionally, you are likely to run in to more issue down the road as you upgrade to an even newer version. Is your plan to keep adding more nars with each upgrade (1.10, 1.22, 1.23, etc.)? On startup NiFi loads the flow.json.gz and looks for the component class defined in the flow.json.gz with version defined in flow.json.gz. If it does not find that version AND only finds one other version fo the same component class, NiFi will auto switch to using that available version of the component. As soon as you have multiple versions avialable and noe match what is in flow.json.gz at startup, NiFi will NOT pick a new one and instead instantiate a "ghost" processor on the canvas. So you run more risks by not fixing/updating your dataflows to work in the newer version.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created on 09-07-2023 07:30 PM - edited 09-07-2023 07:32 PM
So I copied only those nars which we use, and container could launch now. Though I have to remove few nars which were causing issues, like nifi-ssl-context-service-nar-1.10.0.nar.
And now existing flows dont have issues with properties which are obsolete in 1.22.0 as 1.10.0 nars are used for those components.
Thanks for all the inputs.