<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Losing processor's state on nifi upgrade in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386202#M245965</link>
    <description>&lt;P&gt;Hi team!&lt;/P&gt;&lt;P&gt;We are currently running a standalone nifi 1.13.2.&lt;/P&gt;&lt;P&gt;Our upgrade strategy is 1.13.2 (outside docker) -&amp;gt; 1.25.0 (dockerized) -&amp;gt; 2.0.0-M2&amp;nbsp;(dockerized)&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="https://cwiki.apache.org/confluence/display/NIFI/Migration+Guidance#MigrationGuidance-Migratingto2.0.0-M2" target="_blank" rel="noopener"&gt;https://cwiki.apache.org/confluence/display/NIFI/Migration+Guidance#MigrationGuidance-Migratingto2.0.0-M2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When we upgrade to 1.25.0 (dockerized) all states are still there, &lt;STRONG&gt;but after updating to 2.0.0-M2 (from 1.25.0) we no longer have the processor's states&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Our docker volumes are these&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;- /opt/nifi/nifi-current/database_repository:/opt/nifi/nifi-current/database_repository&lt;BR /&gt;- /opt/nifi/nifi-current/flowfile_repository:/opt/nifi/nifi-current/flowfile_repository&lt;BR /&gt;- /opt/nifi/nifi-current/content_repository:/opt/nifi/nifi-current/content_repository&lt;BR /&gt;- /opt/nifi/nifi-current/provenance_repository:/opt/nifi/nifi-current/provenance_repository&lt;BR /&gt;- /opt/nifi/nifi-current/state:/opt/nifi/nifi-current/state&lt;BR /&gt;- /opt/nifi/nifi-current/logs:/opt/nifi/nifi-current/logs&lt;BR /&gt;- /opt/nifi/nifi-current/conf:/opt/nifi/nifi-current/conf&lt;BR /&gt;- /opt/nifi/nifi-current/extras:/opt/nifi/nifi-current/extras&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 05 Apr 2024 18:29:37 GMT</pubDate>
    <dc:creator>double_w</dc:creator>
    <dc:date>2024-04-05T18:29:37Z</dc:date>
    <item>
      <title>Losing processor's state on nifi upgrade</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386202#M245965</link>
      <description>&lt;P&gt;Hi team!&lt;/P&gt;&lt;P&gt;We are currently running a standalone nifi 1.13.2.&lt;/P&gt;&lt;P&gt;Our upgrade strategy is 1.13.2 (outside docker) -&amp;gt; 1.25.0 (dockerized) -&amp;gt; 2.0.0-M2&amp;nbsp;(dockerized)&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="https://cwiki.apache.org/confluence/display/NIFI/Migration+Guidance#MigrationGuidance-Migratingto2.0.0-M2" target="_blank" rel="noopener"&gt;https://cwiki.apache.org/confluence/display/NIFI/Migration+Guidance#MigrationGuidance-Migratingto2.0.0-M2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When we upgrade to 1.25.0 (dockerized) all states are still there, &lt;STRONG&gt;but after updating to 2.0.0-M2 (from 1.25.0) we no longer have the processor's states&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Our docker volumes are these&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;- /opt/nifi/nifi-current/database_repository:/opt/nifi/nifi-current/database_repository&lt;BR /&gt;- /opt/nifi/nifi-current/flowfile_repository:/opt/nifi/nifi-current/flowfile_repository&lt;BR /&gt;- /opt/nifi/nifi-current/content_repository:/opt/nifi/nifi-current/content_repository&lt;BR /&gt;- /opt/nifi/nifi-current/provenance_repository:/opt/nifi/nifi-current/provenance_repository&lt;BR /&gt;- /opt/nifi/nifi-current/state:/opt/nifi/nifi-current/state&lt;BR /&gt;- /opt/nifi/nifi-current/logs:/opt/nifi/nifi-current/logs&lt;BR /&gt;- /opt/nifi/nifi-current/conf:/opt/nifi/nifi-current/conf&lt;BR /&gt;- /opt/nifi/nifi-current/extras:/opt/nifi/nifi-current/extras&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 Apr 2024 18:29:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386202#M245965</guid>
      <dc:creator>double_w</dc:creator>
      <dc:date>2024-04-05T18:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Losing processor's state on nifi upgrade</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386275#M245985</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109928"&gt;@double_w&lt;/a&gt;,&amp;nbsp;Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/42173"&gt;@ckumar&lt;/a&gt;&amp;nbsp;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 10:10:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386275#M245985</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2024-04-08T10:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Losing processor's state on nifi upgrade</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386566#M246077</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109928"&gt;@double_w&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;NiFi state configuration is setup in the state-management.xml file located by default in NiFi's conf directory.&amp;nbsp; &amp;nbsp;When you say that state is being lost, are you specifically having issues with missing "cluster" state, "local" state, or both?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is your NiFi clustered or a standalone (non cluster) deployment?&lt;BR /&gt;&lt;BR /&gt;Default cluster state is stored in zookeeper (are you using an external zookeeper or the embedded zookeeper?).&amp;nbsp; &amp;nbsp;Any chance that your NiFi-2.0 is configured to use the new "kubernetes-provider" for cluster state management?&amp;nbsp; If so, did you configure the "&lt;SPAN&gt;nifi.state.management.provider.cluster.previous" property in nifi.properties with the previous "zk-provider", so that on first startup, it migrates your cluster state from zk-provider to the empty kubernetes-provider?&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Default local-provider stores state in ./state/local.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Have you compared the state-management.xml file configurations between both environments?&lt;/P&gt;&lt;P&gt;Please help our community thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 13:09:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386566#M246077</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-04-15T13:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Losing processor's state on nifi upgrade</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386694#M246125</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for answering my question.&lt;/P&gt;&lt;P&gt;It's a standalone installation&lt;/P&gt;&lt;P&gt;The provider confs are&lt;/P&gt;&lt;P&gt;- nifi.state.management.provider.local=local-provider&lt;/P&gt;&lt;P&gt;- nifi.state.management.configuration.file=./conf/state-management.xml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And isn't a cluster node&lt;/P&gt;&lt;P&gt;- nifi.cluster.is.node=false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also didn't detected any changes on&amp;nbsp;state-management.xml after updating to&amp;nbsp;&lt;SPAN&gt;2.0.0-M2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I detected changes after start the new version in /state/local files, I thought it could be some serialization changes, but I couldn't see major changes in state file format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm out of new ideas, my last one would be migrate the local state contents to zookeeper, then update, then migrate the states back to local, or keep on zookeeper, I don't know if this is possible, if is please provide me some directions.&lt;/P&gt;&lt;P&gt;Thank you again&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 13:03:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386694#M246125</guid>
      <dc:creator>double_w</dc:creator>
      <dc:date>2024-04-17T13:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Losing processor's state on nifi upgrade</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386757#M246146</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109928"&gt;@double_w&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you share some details on which specific components you are using that appear to lose state after upgrade?&lt;BR /&gt;&lt;BR /&gt;The upgrade from 1.13.2 to 1.25.0 is a large leap.&amp;nbsp; Did you test out your dataflow after upgrading to 1.25.0?&amp;nbsp; Was state still working correctly before migrating then to 2.0.0-M3?&lt;BR /&gt;&lt;BR /&gt;I am unaware if any way to migrate local state to Zookeeper.&lt;BR /&gt;&lt;BR /&gt;While I do not have an answer for you here, the more details you share the more i can look into it possibly as I have time.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 13:44:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386757#M246146</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-04-18T13:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Losing processor's state on nifi upgrade</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386964#M246199</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&lt;/P&gt;&lt;P&gt;About your questions&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Can you share some details on which specific components you are using that appear to lose state after upgrade?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;All processors even the valid ones&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Did you test out your dataflow after upgrading to 1.25.0?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Yes it works as expected&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Was state still working correctly before migrating then to 2.0.0-M2?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Yes, the problem only happens when upgrading from 1.25.0 to 2.0.0-M2 (I tried M1 too, same problem&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;To help with this I created a flow to reproduce the problem it will require docker.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Setup nifi 1.25.0 installation

mkdir nifi_upgrade_test

docker run -d --rm -v ./nifi_upgrade_test:/nifi_upgrade_test -d -p 8443:8443 --name nifi apache/nifi:1.25.0

## wait until nifi starts
## It can be checked with docker logs nifi -f

docker exec nifi /opt/nifi/nifi-current/bin/nifi.sh set-single-user-credentials admin supersecret1

docker restart nifi

# go https://localhost:8443/nifi/
# user: admin
# pass: supersecret1

# Create a "dummy" state
# 1) Add two processors GenerateFlowFile and UpdateAttribute
# 2) Add relationship GenerateFlowFile -&amp;gt; success -&amp;gt; UpdateAttribute
# 3) UpdateAttribute: add a property called "something" with value "${getStateValue("something"):plus(1)}"
# 4) UpdateAttribute: update property "Store State" to "Store state locally"
# 5) UpdateAttribute: update property "Stateful Variables Initial Value" to 0
# 6) UpdateAttribute: update "success" and "set state fail" relationship to terminate
# 7) Run once both processors first GenerateFlowFile and then UpdateAttribute
# Now UpdateAttribute have state something=1

# Prepare migration: copy important files to /nifi_upgrade_test
docker exec nifi cp conf/ content_repository/ database_repository/ flowfile_repository/ provenance_repository/ state/ /nifi_upgrade_test -rv

docker kill nifi

# replace flow.xml.gz to flow.json.gz
sed -i "s/flow.xml.gz/flow.json.gz/g" nifi_upgrade_test/conf/nifi.properties

# volumes
# ./nifi_upgrade_test/conf:/opt/nifi/nifi-current/conf
# ./nifi_upgrade_test/content_repository:/opt/nifi/nifi-current/content_repository
# ./nifi_upgrade_test/database_repository:/opt/nifi/nifi-current/database_repository
# ./nifi_upgrade_test/flowfile_repository:/opt/nifi/nifi-current/flowfile_repository
# ./nifi_upgrade_test/provenance_repository:/opt/nifi/nifi-current/provenance_repository
# ./nifi_upgrade_test/state:/opt/nifi/nifi-current/state
# ./nifi_upgrade_test:/nifi_upgrade_test

# Start nifi 2.0.0-M2 installation
docker run -d --rm -v ./nifi_upgrade_test/conf:/opt/nifi/nifi-current/conf -v ./nifi_upgrade_test/content_repository:/opt/nifi/nifi-current/content_repository -v ./nifi_upgrade_test/database_repository:/opt/nifi/nifi-current/database_repository -v ./nifi_upgrade_test/flowfile_repository:/opt/nifi/nifi-current/flowfile_repository -v ./nifi_upgrade_test/provenance_repository:/opt/nifi/nifi-current/provenance_repository -v ./nifi_upgrade_test/state:/opt/nifi/nifi-current/state -v ./nifi_upgrade_test:/nifi_upgrade_test -d -p 8443:8443 --name nifi apache/nifi:2.0.0-M2

# go https://localhost:8443/nifi/ again
# user: admin
# pass: supersecret1&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;After migration the processors are still valid, but the states have been lost&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you again&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 18:02:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386964#M246199</guid>
      <dc:creator>double_w</dc:creator>
      <dc:date>2024-04-22T18:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Losing processor's state on nifi upgrade</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386981#M246207</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will see this behavior even if you don't use docker only nifi standard binaries.&lt;/P&gt;&lt;P&gt;I validated this copying those dirs below from 1.25.0 installation to 2.0.0-M2 installation both without using docker.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;conf/&lt;/LI&gt;&lt;LI&gt;content_repository/&lt;/LI&gt;&lt;LI&gt;database_repository/&lt;/LI&gt;&lt;LI&gt;flowfile_repository/&lt;/LI&gt;&lt;LI&gt;provenance_repository/&lt;/LI&gt;&lt;LI&gt;state/&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thank you again&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 19:58:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Losing-processor-s-state-on-nifi-upgrade/m-p/386981#M246207</guid>
      <dc:creator>double_w</dc:creator>
      <dc:date>2024-04-22T19:58:01Z</dc:date>
    </item>
  </channel>
</rss>

