Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Multiple framework NARs discovered. Only one framework is permitted

avatar
Expert Contributor

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?

 

 

1 ACCEPTED SOLUTION

avatar
Super Mentor

@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

View solution in original post

4 REPLIES 4

avatar

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

avatar
Expert Contributor

Ok. So I would need to copy them one by one and check if container launches. It would be lot of work I guess.

avatar
Super Mentor

@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

avatar
Expert Contributor

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.