<?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: Apache Nifi 1.23.2 FetchDistributedMapCache Connection Refused in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378282#M243491</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107497"&gt;@plapla&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I see that you have configured your &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-distributed-cache-services-nar/1.23.2/org.apache.nifi.distributed.cache.client.DistributedSetCacheClientService/index.html" target="_self"&gt;DistributedMapCacheClient&lt;/A&gt; controller service with a &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardSSLContextService/index.html" target="_self"&gt;StandardSSLContextService&lt;/A&gt;.&amp;nbsp; You did not share your configuration for the needed &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-distributed-cache-services-nar/1.23.2/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/index.html" target="_self"&gt;DistributedMapCachServer&lt;/A&gt;.&amp;nbsp; I must assume that the server was also configured with a &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardRestrictedSSLContextService/index.html" target="_self"&gt;StandardRestrictedSSLContextService&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;So few things to comment on here related to DistributedMapCache:&lt;BR /&gt;1. You configured the client with "localhost". Does localhost exist as a SAN entry in the PrivateKeyEntry found in the Keystore used in the DistributedMapCache server's configured keystore within the StandardRestrictedSSLContextService?&lt;BR /&gt;2. Does the keystore PrivateKeyEntry used in the StandardSSLContext services used by the DistributedMapCacheClient service include ClientAuth as an Extended Key Usage (EKU)?&lt;BR /&gt;3. Using "localhost means that all nodes will be using different map caches.&amp;nbsp; The DistributedMapCacheServer starts up a separate Distributed Map Cache server on each host in the NiFi cluster. They do not communicate with one another to share cached data.&amp;nbsp; In a cluster using this specific embedded cache server it is not common to use "localhost", but rather configured the hostname of one specific host in your NiFi cluster.&lt;BR /&gt;4. Once you had your DistributedMapCache server setup and enabled, Did you then start your DistributedMapCacheClient service and click the validation test?&lt;BR /&gt;5. When you started the DistributedMapCacheServer, did any of the NiFi cluster nodes throw any exceptions in the nifi-app.log related to possible port 4557 already in use?&lt;BR /&gt;&lt;BR /&gt;Without the verbose output of your Keystore and truststore files (all 4 ) used by both the DistributedMapCache server and client, it would be impossible for me to tell you if they are the issue here or not.&amp;nbsp; But... I suspect you may have a MutualTLS exchange issue here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;History: The DistributedMapCache (Server and Client) controller services have exists for almost as long as NiFi has existed.&amp;nbsp; They were originally implemented before NiFi offered its zero master cluster capability.&amp;nbsp; Very old versions o NiFi had a NiFi Cluster Manager (NCM) and then worker nodes that connected to that NCM.&amp;nbsp; At that time the DistributedMapCacheServer would only be installed and run on that NCM.&amp;nbsp; So DMCacheClient would always be configured to the one NCM host.&amp;nbsp; Now with Zero Master clustering there is not NCM and thus the server start a map cache server on all nodes. It is for this reason that more and newer DistributedMapCache client options are available that offer HA which is not offered through the DistributedMapCache.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you found any of the suggestions/solutions provided helped you with your issue, 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 one or more 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, 30 Oct 2023 12:56:32 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2023-10-30T12:56:32Z</dc:date>
    <item>
      <title>Apache Nifi 1.23.2 FetchDistributedMapCache Connection Refused</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378258#M243481</link>
      <description>&lt;P&gt;I started&amp;nbsp;&lt;SPAN&gt;DistributedMapCacheClientService on Controller Services.when i try to start&amp;nbsp;FetchDistributedMapCache processor got an error "AnnotatedConnectException: Connection refused".Do you have any comments on this&amp;nbsp;situation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454" target="_blank" rel="noopener"&gt;@MattWho&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="plapla_0-1698390866741.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38765i0FB5120BC7375C5C/image-size/large?v=v2&amp;amp;px=999" role="button" title="plapla_0-1698390866741.png" alt="plapla_0-1698390866741.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="plapla_1-1698391119629.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38766iC24B08C7ACE8D49A/image-size/large?v=v2&amp;amp;px=999" role="button" title="plapla_1-1698391119629.png" alt="plapla_1-1698391119629.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 07:14:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378258#M243481</guid>
      <dc:creator>plapla</dc:creator>
      <dc:date>2023-10-30T07:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi 1.23.2 FetchDistributedMapCache Connection Refused</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378282#M243491</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107497"&gt;@plapla&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I see that you have configured your &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-distributed-cache-services-nar/1.23.2/org.apache.nifi.distributed.cache.client.DistributedSetCacheClientService/index.html" target="_self"&gt;DistributedMapCacheClient&lt;/A&gt; controller service with a &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardSSLContextService/index.html" target="_self"&gt;StandardSSLContextService&lt;/A&gt;.&amp;nbsp; You did not share your configuration for the needed &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-distributed-cache-services-nar/1.23.2/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/index.html" target="_self"&gt;DistributedMapCachServer&lt;/A&gt;.&amp;nbsp; I must assume that the server was also configured with a &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardRestrictedSSLContextService/index.html" target="_self"&gt;StandardRestrictedSSLContextService&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;So few things to comment on here related to DistributedMapCache:&lt;BR /&gt;1. You configured the client with "localhost". Does localhost exist as a SAN entry in the PrivateKeyEntry found in the Keystore used in the DistributedMapCache server's configured keystore within the StandardRestrictedSSLContextService?&lt;BR /&gt;2. Does the keystore PrivateKeyEntry used in the StandardSSLContext services used by the DistributedMapCacheClient service include ClientAuth as an Extended Key Usage (EKU)?&lt;BR /&gt;3. Using "localhost means that all nodes will be using different map caches.&amp;nbsp; The DistributedMapCacheServer starts up a separate Distributed Map Cache server on each host in the NiFi cluster. They do not communicate with one another to share cached data.&amp;nbsp; In a cluster using this specific embedded cache server it is not common to use "localhost", but rather configured the hostname of one specific host in your NiFi cluster.&lt;BR /&gt;4. Once you had your DistributedMapCache server setup and enabled, Did you then start your DistributedMapCacheClient service and click the validation test?&lt;BR /&gt;5. When you started the DistributedMapCacheServer, did any of the NiFi cluster nodes throw any exceptions in the nifi-app.log related to possible port 4557 already in use?&lt;BR /&gt;&lt;BR /&gt;Without the verbose output of your Keystore and truststore files (all 4 ) used by both the DistributedMapCache server and client, it would be impossible for me to tell you if they are the issue here or not.&amp;nbsp; But... I suspect you may have a MutualTLS exchange issue here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;History: The DistributedMapCache (Server and Client) controller services have exists for almost as long as NiFi has existed.&amp;nbsp; They were originally implemented before NiFi offered its zero master cluster capability.&amp;nbsp; Very old versions o NiFi had a NiFi Cluster Manager (NCM) and then worker nodes that connected to that NCM.&amp;nbsp; At that time the DistributedMapCacheServer would only be installed and run on that NCM.&amp;nbsp; So DMCacheClient would always be configured to the one NCM host.&amp;nbsp; Now with Zero Master clustering there is not NCM and thus the server start a map cache server on all nodes. It is for this reason that more and newer DistributedMapCache client options are available that offer HA which is not offered through the DistributedMapCache.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you found any of the suggestions/solutions provided helped you with your issue, 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 one or more 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, 30 Oct 2023 12:56:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378282#M243491</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-10-30T12:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi 1.23.2 FetchDistributedMapCache Connection Refused</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378356#M243512</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;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;First of all, thank you for your return.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I tried it three ways for testing.Firstly&amp;nbsp;DistributedMapCacheClientService parameter ssl context service set&amp;nbsp; no value.Since it is not successful this way I try to&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardSSLContextService/index.html" target="_blank" rel="noopener"&gt;StandardSSLContextService&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardSSLContextService/index.html" target="_blank" rel="noopener"&gt;StandardRestrictedSSLContextService.&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Nifi process running on single server.Nifi&amp;nbsp;security parameters are set&amp;nbsp;as follows.I added the values ​​in the nifi.properties file in StandartSSLContextService.Should I use SSL since NiFi is secure?Or is my method wrong?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;nifi.security.keystore=/opt/nifi-1.23.2/certs/keystore.jks&lt;BR /&gt;nifi.security.keystoreType=jks&lt;BR /&gt;nifi.security.keystorePasswd=XXXX&lt;BR /&gt;nifi.security.keyPasswd=XXXX&lt;BR /&gt;nifi.security.truststore=/opt/nifi-1.23.2/certs/truststore.jks&lt;BR /&gt;nifi.security.truststoreType=jks&lt;BR /&gt;nifi.security.truststorePasswd=XXXX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When I enable to&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardSSLContextService/index.html" target="_blank" rel="noopener"&gt;StandardSSLContextService,&lt;/A&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.23.2/org.apache.nifi.ssl.StandardSSLContextService/index.html" target="_blank" rel="noopener"&gt;the logs like this.&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="plapla_0-1698750179140.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38805i582245EB28086B63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="plapla_0-1698750179140.png" alt="plapla_0-1698750179140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2023-10-31 12:24:49,269 INFO [Timer-Driven Process Thread-6] o.a.n.c.s.StandardControllerServiceNode Successfully enabled StandardControllerServiceNode[service=SSLContextService[id=6c5e44ef-018b-1000-19c7-5f91c320527d], name=StandardSSLContextService, active=true]&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;After enable ssl context ,enable&amp;nbsp;DistributedMapCacheClientService.Logs lik this.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="service.png" style="width: 350px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/38802i1ED0EE570157E27E/image-size/large?v=v2&amp;amp;px=999" role="button" title="service.png" alt="service.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2023-10-31 12:30:14,909 INFO [Timer-Driven Process Thread-4] o.a.n.c.s.StandardControllerServiceNode Successfully enabled StandardControllerServiceNode[service=DistributedMapCacheClientService[id=6c484bbd-018b-1000-a778-92a07c63c0a2], name= DistributedMapCacheClientService, active=true]&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Finally, when I start the processor, I get an error like the one below.When I try it with different ports the result is the same.Telnet commands give same connection refused error.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;2023-10-31 12:43:10,977 ERROR [Timer-Driven Process Thread-5] o.a.n.p.s.FetchDistributedMapCache FetchDistributedMapCache[id=3d4b463d-3954-3fec-35b1-c50417c0d8da] Unable to communicate with cache when processing StandardFlowFileRecord[uuid=b1c817fa-cc08-41f0-a3f9-6327ebb0ba74,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1698324770398-90, container=default, section=90], offset=11595, length=184],offset=0,name=b1c817fa-cc08-41f0-a3f9-6327ebb0ba74,size=184] due to io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost:4557&lt;BR /&gt;io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost:4557&lt;BR /&gt;Caused by: java.net.ConnectException: Connection refused&lt;BR /&gt;at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)&lt;BR /&gt;at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)&lt;BR /&gt;at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 11:03:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378356#M243512</guid>
      <dc:creator>plapla</dc:creator>
      <dc:date>2023-10-31T11:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi 1.23.2 FetchDistributedMapCache Connection Refused</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378375#M243519</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/107497"&gt;@plapla&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The DistributedMapCacheClientService is used to connect to the DistributedMapCacheServer.&amp;nbsp; You have not shared how you have the&amp;nbsp;DistributedMapCacheServer controller service configured.&lt;BR /&gt;&lt;BR /&gt;The&amp;nbsp;DistributedMapCacheServer configuration determines whether the&amp;nbsp;DistributedMapCacheClientService needs tobe configured with a StandardRestrictedSSLContext Service.&amp;nbsp; Essentially if you configure a StandardRestrictedSSLContext service on the&amp;nbsp;DistributedMapCacheServer, then it must also be configured on the&amp;nbsp;DistributedMapCacheClientService.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you found any of the suggestions/solutions provided helped you with your issue, 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 one or more 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;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 13:30:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-1-23-2-FetchDistributedMapCache-Connection/m-p/378375#M243519</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-10-31T13:30:44Z</dc:date>
    </item>
  </channel>
</rss>

