<?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 Re: Getting java warning after staring NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398858#M250321</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/119395"&gt;@tono425&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Apache NiFi 2.0.0 has only been tested and verified against Java 21.&amp;nbsp; &amp;nbsp;I suggest switching to latest Java 21 JDK update and seeing if same messages persist in your Linux /var/log/messages log.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://nifi.apache.org/nifi-docs/administration-guide.html#system_requirements" target="_blank"&gt;NiFi 2.0.0 System requirements&lt;/A&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2024 16:48:24 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2024-12-13T16:48:24Z</dc:date>
    <item>
      <title>Getting java warning after staring NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398826#M250313</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Recently I setup NiFi 2.0.&lt;BR /&gt;Everytime I start NiFi, I get below warning messages in /var/log/messages.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dec 13 12:07:58 myserver nifi.sh[208489]: WARNING: A restricted method in java.lang.foreign.Linker has been called
Dec 13 12:07:58 myserver nifi.sh[208489]: WARNING: java.lang.foreign.Linker::downcallHandle has been called by org.apache.lucene.store.PosixNativeAccess in an unnamed module
Dec 13 12:07:58 myserver nifi.sh[208489]: WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
Dec 13 12:07:58 myserver nifi.sh[208489]: WARNING: Restricted methods will be blocked in a future release unless native access is enabled&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to supress these messages?&lt;BR /&gt;&lt;BR /&gt;Here are product versions.&lt;BR /&gt;&lt;BR /&gt;Red Hat Enterprise Linux 8.8&lt;BR /&gt;NiFi 2.0.0&lt;BR /&gt;Java OpenJDK&amp;nbsp;23.0.1.0.11&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 05:57:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398826#M250313</guid>
      <dc:creator>tono425</dc:creator>
      <dc:date>2024-12-13T05:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting java warning after staring NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398854#M250317</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;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt;&amp;nbsp;Hi! Do you have some insights here? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 15:56:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398854#M250317</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-12-13T15:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting java warning after staring NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398858#M250321</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/119395"&gt;@tono425&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Apache NiFi 2.0.0 has only been tested and verified against Java 21.&amp;nbsp; &amp;nbsp;I suggest switching to latest Java 21 JDK update and seeing if same messages persist in your Linux /var/log/messages log.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://nifi.apache.org/nifi-docs/administration-guide.html#system_requirements" target="_blank"&gt;NiFi 2.0.0 System requirements&lt;/A&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 16:48:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398858#M250321</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-12-13T16:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting java warning after staring NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398900#M250333</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;BR /&gt;Thank you for your advice.&lt;BR /&gt;I installed Java 21 (21.0.5) but similar warnings still persist.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dec 16 11:09:10 myserver nifi.sh[253936]: WARNING: A restricted method in java.lang.foreign.Linker has been called
Dec 16 11:09:10 myserver nifi.sh[253936]: WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module
Dec 16 11:09:10 myserver nifi.sh[253936]: WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thank you,&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 02:15:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398900#M250333</guid>
      <dc:creator>tono425</dc:creator>
      <dc:date>2024-12-16T02:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting java warning after staring NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398924#M250343</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/119395"&gt;@tono425&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It is just a WARNING that can safely be ignored.&lt;BR /&gt;&lt;BR /&gt;I found some threads on this here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://bugs.openjdk.org/browse/JDK-8310626" target="_blank"&gt;https://bugs.openjdk.org/browse/JDK-8310626&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://apachenifi.slack.com/archives/C0L9VCD47/p1730736181056549?thread_ts=1730294478.475309&amp;amp;cid=C0L9VCD47" target="_blank"&gt;https://apachenifi.slack.com/archives/C0L9VCD47/p1730736181056549?thread_ts=1730294478.475309&amp;amp;cid=C0L9VCD47&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.reddit.com/r/java/comments/17cjajl/why_introduce_a_mandatory_enablenativeaccess/" target="_blank"&gt;https://www.reddit.com/r/java/comments/17cjajl/why_introduce_a_mandatory_enablenativeaccess/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose you could try adding a new java.arg.&amp;lt;some string/num&amp;gt; to the NiFi bootstrap.conf to "--enable-native-access=ALL-UNNAMED" to see if that stops these Warnings on NiFi startup.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&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, 16 Dec 2024 13:08:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398924#M250343</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-12-16T13:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting java warning after staring NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398985#M250354</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/119395"&gt;@tono425&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The error messages you are encountering in NiFi are related to &lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;Java's native method access restrictions&lt;/STRONG&gt; &lt;/FONT&gt;introduced in newer Java versions (likely Java 17 or higher). These warnings indicate that NiFi (or a dependency like Apache Lucene) is calling &lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;restricted native methods&lt;/STRONG&gt;&lt;/FONT&gt; that require explicit permission to access low-level operating system functions.&lt;BR /&gt;The warning mentions &lt;FONT color="#FF6600"&gt;java.lang.foreign.Linker::downcallHandle&lt;/FONT&gt;, which is a native method used for low-level interactions with the operating system.&lt;BR /&gt;Here are the 3 options you should try to resolve the issue:&amp;nbsp;&lt;/P&gt;&lt;H4&gt;&lt;STRONG&gt;Option 1: Add the Java Option to Enable Native Access&lt;/STRONG&gt;&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;Update the NiFi startup configuration to allow unrestricted native access for unnamed modules.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Edit the &lt;STRONG&gt;NiFi Java options&lt;/STRONG&gt; in the bootstrap.conf file:&lt;/P&gt;&lt;DIV class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950"&gt;&lt;DIV class="sticky top-9 md:top-[5.75rem]"&gt;&lt;DIV class="absolute bottom-0 right-2 flex h-9 items-center"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="overflow-y-auto p-4"&gt;&lt;LI-SPOILER&gt;nano /opt/nifi/conf/bootstrap.conf&lt;/LI-SPOILER&gt; 2. Add the following option to the java.arg properties:&lt;BR /&gt;&lt;LI-SPOILER&gt;java.arg.X=-enable-native-access=ALL-UNNAMED&lt;/LI-SPOILER&gt; 3. Restart NiFi:&lt;BR /&gt;&lt;LI-SPOILER&gt;sudo systemctl restart nifi&lt;/LI-SPOILER&gt;&lt;H4&gt;&lt;STRONG&gt;Option 2: Use a Lower Java Version (if possible)&lt;/STRONG&gt;&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;If NiFi was previously running fine with an earlier Java version (e.g., Java 8 or 11), you can revert to it until you're ready to address the native access changes:&lt;/LI&gt;&lt;LI&gt;Update the JAVA_HOME path in NiFi's bootstrap.conf to point to the older Java version.&lt;/LI&gt;&lt;/UL&gt;&lt;H4&gt;&lt;STRONG&gt;Option 3: Verify Dependencies&lt;/STRONG&gt;&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;Check if you are using the latest versions of &lt;STRONG&gt;NiFi&lt;/STRONG&gt; and &lt;STRONG&gt;Apache Lucene&lt;/STRONG&gt;:&lt;/LI&gt;&lt;LI&gt;Some of these warnings may be addressed in recent releases of NiFi or its libraries.&lt;/LI&gt;&lt;LI&gt;Consider upgrading NiFi to the latest stable version to ensure compatibility with newer Java versions.&lt;BR /&gt;&lt;BR /&gt;Happy hadooping&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 15:48:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398985#M250354</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2024-12-17T15:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Getting java warning after staring NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398999#M250363</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/20288"&gt;@Shelton&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for your advice.&lt;/P&gt;&lt;P&gt;As I use the latest version of NiFi and it requires Java 21,&amp;nbsp;I added the following line in bootstrap.conf and confirmed the warning messages disappeared.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;java.arg.EnableNativeAccess=--enable-native-access=ALL-UNNAMED&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I appreciate your help.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 00:48:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Getting-java-warning-after-staring-NiFi/m-p/398999#M250363</guid>
      <dc:creator>tono425</dc:creator>
      <dc:date>2024-12-18T00:48:18Z</dc:date>
    </item>
  </channel>
</rss>

