<?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: nifi socket timeout importing template in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225334#M72689</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/1184/vergari.html" nodeid="1184"&gt;@Davide Vergari&lt;/A&gt;&lt;P&gt;@srinivas p&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Let me explain what is going on here so you can understand why the configuration change made helps in some cases and not others.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;When you add a component to the canvas of a NiFi cluster the following steps are performed.&lt;/P&gt;&lt;P&gt;1. That request is forwarded to the current elected cluster coordinator on behalf of the user who added the component.&lt;/P&gt;&lt;P&gt;2. The cluster coordinator then replicates that request to all the nodes connected in the cluster. (the nifi.cluster.node.protocol.threads=10 setting dictates how many concurrent request can be made, so larger clusters will need to have this value increased)&lt;/P&gt;&lt;P&gt;3. Each node must then make the change and respond back to the cluster coordinator.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;While this process is consistent for every such replicated request, not all changes are equal.&lt;/P&gt;&lt;P&gt;The action of selecting a bunch of components on the canvas copying and pasting them or instantiating a large template to the canvas also constitutes a single replication requests instead of many requests. These component bundles are referred to as snippets in NiFi.  This action is not asynchronous. this means that each node must add every component (processors, connections, controller services, etc..) from this snippet before it responds to the cluster coordinator. Depending on size of the snippet and load on the server, this request may very likely exceed to configured timeout.  This results in those nodes that timed out being disconnected from cluster.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Increasing the timeouts allows more time for these snippets to be instantiated and response to be received.  Because there is no way to know how large these snippets are, the timeout setting that works for one user may not work for others.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Two things to keep in mind here:&lt;/P&gt;&lt;P&gt;1. How many node requests can be made concurrently (as shown above default is 10). Using a 16 node NiFi cluster as an example, 10 nodes must respond before the other 6 even get the request. so increase this value.&lt;/P&gt;&lt;P&gt;2.  The nifi.cluster.node.connection.timeout and nifi.cluster.node.read.timeout can be set to much higher values.  Even settings these timeouts to 2 - 5 minutes does not mean every request will take that long.  It simply means that you will allow that much time before the cluster coordinator makes the decision to disconnect the node due to timeout.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;There is work on the roadmap to redesign these types of replication requests in to asynchronous type requests eventually.  Once that happens user will not need such high timeouts configured.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Tue, 08 May 2018 00:46:29 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2018-05-08T00:46:29Z</dc:date>
    <item>
      <title>nifi socket timeout importing template</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225331#M72686</link>
      <description>&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I'm trying to import a (Kylo) template inside Nifi, but I'm having some  issues. The template import process goes fine, but when I  try to deploy the template to a process group the nifi UI goes in error with the following message:&lt;/P&gt;&lt;P&gt;com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out&lt;/P&gt;&lt;P&gt;On the nifi-app.log I can see these messages:&lt;/P&gt;&lt;P&gt;2017-12-15 15:18:11,005 WARN [Replicate Request Thread-5] o.a.n.c.c.h.r.ThreadPoolRequestReplicator Failed to replicate request POST /nifi-api/process-groups/2f9f6866-13e0-1bc2-ffff-ffffccd0318d/template-instance to tst-hdfsandbox.pochdp.csi.it:9090 due to {}&lt;BR /&gt;com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out&lt;BR /&gt;  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)&lt;BR /&gt;  at com.sun.jersey.api.client.Client.handle(Client.java:652)&lt;BR /&gt;  at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)&lt;BR /&gt;  at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)&lt;BR /&gt;  at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)&lt;BR /&gt;  at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:560)&lt;BR /&gt;  at org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator.replicateRequest(ThreadPoolRequestReplicator.java:630)&lt;BR /&gt;  at org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator$NodeHttpRequest.run(ThreadPoolRequestReplicator.java:832)&lt;BR /&gt;  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)&lt;BR /&gt;  at java.util.concurrent.FutureTask.run(FutureTask.java:266)&lt;BR /&gt;  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;BR /&gt;  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;BR /&gt;  at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;Caused by: java.net.SocketTimeoutException: Read timed out&lt;BR /&gt;  at java.net.SocketInputStream.socketRead0(Native Method)&lt;BR /&gt;  at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)&lt;BR /&gt;  at java.net.SocketInputStream.read(SocketInputStream.java:170)&lt;BR /&gt;  at java.net.SocketInputStream.read(SocketInputStream.java:141)&lt;BR /&gt;  at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)&lt;BR /&gt;  at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)&lt;BR /&gt;  at java.io.BufferedInputStream.read(BufferedInputStream.java:345)&lt;BR /&gt;  at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)&lt;BR /&gt;  at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)&lt;BR /&gt;  at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)&lt;BR /&gt;  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)&lt;BR /&gt;  at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)&lt;BR /&gt;  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:253)&lt;BR /&gt;  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)&lt;BR /&gt;  ... 12 common frames omitted&lt;BR /&gt;2017-12-15 15:18:11,005 WARN [Replicate Request Thread-5] o.a.n.c.c.h.r.ThreadPoolRequestReplicator&lt;BR /&gt;com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out&lt;BR /&gt;  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)&lt;BR /&gt;  at com.sun.jersey.api.client.Client.handle(Client.java:652)&lt;BR /&gt;  at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)&lt;BR /&gt;  at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)&lt;BR /&gt;  at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)&lt;BR /&gt;  at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:560)&lt;BR /&gt;  at org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator.replicateRequest(ThreadPoolRequestReplicator.java:630)&lt;BR /&gt;  at org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator$NodeHttpRequest.run(ThreadPoolRequestReplicator.java:832)&lt;BR /&gt;  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)&lt;BR /&gt;  at java.util.concurrent.FutureTask.run(FutureTask.java:266)&lt;BR /&gt;  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;BR /&gt;  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;BR /&gt;  at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;Caused by: java.net.SocketTimeoutException: Read timed out&lt;BR /&gt;  at java.net.SocketInputStream.socketRead0(Native Method)&lt;BR /&gt;  at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)&lt;BR /&gt;  at java.net.SocketInputStream.read(SocketInputStream.java:170)&lt;BR /&gt;  at java.net.SocketInputStream.read(SocketInputStream.java:141)&lt;BR /&gt;  at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)&lt;BR /&gt;  at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)&lt;BR /&gt;  at java.io.BufferedInputStream.read(BufferedInputStream.java:345)&lt;BR /&gt;  at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)&lt;BR /&gt;  at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)&lt;BR /&gt;  at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)&lt;BR /&gt;  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)&lt;BR /&gt;  at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)&lt;BR /&gt;  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:253)&lt;BR /&gt;  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)&lt;BR /&gt;  ... 12 common frames omitted&lt;BR /&gt;2017-12-15 15:18:11,006 WARN [Replicate Request Thread-5] o.a.n.c.c.node.NodeClusterCoordinator All nodes failed to process URI POST /nifi-api/process-groups/2f9f6866-13e0-1bc2-ffff-ffffccd0318d/template-instance. As a result, no node will be disconnected from cluster&lt;/P&gt;&lt;P&gt;has anyone already faced this problem?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 22:24:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225331#M72686</guid>
      <dc:creator>vergari</dc:creator>
      <dc:date>2017-12-15T22:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: nifi socket timeout importing template</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225332#M72687</link>
      <description>&lt;P&gt;I solved the issue myself, just increasing the nifi.cluster.node.connection.timeout and  nifi.cluster.node.read.timeout to 15 seconds&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 19:56:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225332#M72687</guid>
      <dc:creator>vergari</dc:creator>
      <dc:date>2017-12-18T19:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: nifi socket timeout importing template</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225333#M72688</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1184/vergari.html" nodeid="1184"&gt;@Davide Vergari&lt;/A&gt;&lt;P&gt;, I made above changes but still the same issue , even i have increased both  to 60 sec .&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 21:58:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225333#M72688</guid>
      <dc:creator>srinivasp</dc:creator>
      <dc:date>2018-05-07T21:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: nifi socket timeout importing template</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225334#M72689</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1184/vergari.html" nodeid="1184"&gt;@Davide Vergari&lt;/A&gt;&lt;P&gt;@srinivas p&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Let me explain what is going on here so you can understand why the configuration change made helps in some cases and not others.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;When you add a component to the canvas of a NiFi cluster the following steps are performed.&lt;/P&gt;&lt;P&gt;1. That request is forwarded to the current elected cluster coordinator on behalf of the user who added the component.&lt;/P&gt;&lt;P&gt;2. The cluster coordinator then replicates that request to all the nodes connected in the cluster. (the nifi.cluster.node.protocol.threads=10 setting dictates how many concurrent request can be made, so larger clusters will need to have this value increased)&lt;/P&gt;&lt;P&gt;3. Each node must then make the change and respond back to the cluster coordinator.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;While this process is consistent for every such replicated request, not all changes are equal.&lt;/P&gt;&lt;P&gt;The action of selecting a bunch of components on the canvas copying and pasting them or instantiating a large template to the canvas also constitutes a single replication requests instead of many requests. These component bundles are referred to as snippets in NiFi.  This action is not asynchronous. this means that each node must add every component (processors, connections, controller services, etc..) from this snippet before it responds to the cluster coordinator. Depending on size of the snippet and load on the server, this request may very likely exceed to configured timeout.  This results in those nodes that timed out being disconnected from cluster.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Increasing the timeouts allows more time for these snippets to be instantiated and response to be received.  Because there is no way to know how large these snippets are, the timeout setting that works for one user may not work for others.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Two things to keep in mind here:&lt;/P&gt;&lt;P&gt;1. How many node requests can be made concurrently (as shown above default is 10). Using a 16 node NiFi cluster as an example, 10 nodes must respond before the other 6 even get the request. so increase this value.&lt;/P&gt;&lt;P&gt;2.  The nifi.cluster.node.connection.timeout and nifi.cluster.node.read.timeout can be set to much higher values.  Even settings these timeouts to 2 - 5 minutes does not mean every request will take that long.  It simply means that you will allow that much time before the cluster coordinator makes the decision to disconnect the node due to timeout.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;There is work on the roadmap to redesign these types of replication requests in to asynchronous type requests eventually.  Once that happens user will not need such high timeouts configured.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 00:46:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225334#M72689</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2018-05-08T00:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: nifi socket timeout importing template</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225335#M72690</link>
      <description>&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;thank you for the explanation!&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 19:38:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/nifi-socket-timeout-importing-template/m-p/225335#M72690</guid>
      <dc:creator>vergari</dc:creator>
      <dc:date>2018-05-08T19:38:59Z</dc:date>
    </item>
  </channel>
</rss>

