<?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>topic tFileFetch hangs at random url in iterate loop in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266282#M45552</link>
    <description>&lt;P&gt;Hi Group,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a job that reads a list of image url's from a DB and downloads each in an iterate loop.&amp;nbsp; The job hangs at a random url in the tFileFetch.&amp;nbsp; The debugger is no help:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-06-08_17-03-59.png" style="width: 628px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuX7.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144623i61531459162FFDAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuX7.png" alt="0683p000009LuX7.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have the timeout set for 10 seconds (10000 ms) in the tFileFetch&lt;/P&gt; 
&lt;P&gt;I set the timeout to 10ms and it did finish but missed 80% of the files.&lt;/P&gt; 
&lt;P&gt;I set it to 100ms and it hung...&lt;/P&gt; 
&lt;P&gt;Any advice at all on how to proceed would be greatly appreciated.&amp;nbsp; I am running v6.2.1&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2017 23:33:16 GMT</pubDate>
    <dc:creator>billimmer</dc:creator>
    <dc:date>2017-06-08T23:33:16Z</dc:date>
    <item>
      <title>tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266282#M45552</link>
      <description>&lt;P&gt;Hi Group,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a job that reads a list of image url's from a DB and downloads each in an iterate loop.&amp;nbsp; The job hangs at a random url in the tFileFetch.&amp;nbsp; The debugger is no help:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-06-08_17-03-59.png" style="width: 628px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuX7.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144623i61531459162FFDAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuX7.png" alt="0683p000009LuX7.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have the timeout set for 10 seconds (10000 ms) in the tFileFetch&lt;/P&gt; 
&lt;P&gt;I set the timeout to 10ms and it did finish but missed 80% of the files.&lt;/P&gt; 
&lt;P&gt;I set it to 100ms and it hung...&lt;/P&gt; 
&lt;P&gt;Any advice at all on how to proceed would be greatly appreciated.&amp;nbsp; I am running v6.2.1&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 23:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266282#M45552</guid>
      <dc:creator>billimmer</dc:creator>
      <dc:date>2017-06-08T23:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266283#M45553</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please also post your current job design screenshot into forum? How does your loop work?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 03:46:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266283#M45553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-09T03:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266284#M45554</link>
      <description>&lt;P&gt;Here is the main job.&amp;nbsp; It looks at two url sources.&amp;nbsp; Then I iterate to a subjob to fetch the two images.&amp;nbsp; The url's are passed as params:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="job.png" style="width: 800px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuBc.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130158iF982DABCCBB9009F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuBc.png" alt="0683p000009LuBc.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The subjob checks to see if the url field is null or blank.&amp;nbsp; If not it tries the fetch&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="subjob.png" style="width: 280px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuN3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151401i13EEE2917CF10A25/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuN3.png" alt="0683p000009LuN3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;There are about 4000 images to download, and It get anywhere between 10 and 500 before it hangs.&amp;nbsp; Files come from many different locations.&amp;nbsp; When it hangs I see the file it's trying to download in the folder in my work directory, but it shows a size of 0.&amp;nbsp; When it hangs it will sit forever - until you manually cancel the job.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm going to try building a&amp;nbsp;simplified test job to see if I can get more insight.&amp;nbsp; One without a subjob and multiple iterate operations.&amp;nbsp; And another test job that just tries to download the same file in a iterate loop.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266284#M45554</guid>
      <dc:creator>billimmer</dc:creator>
      <dc:date>2017-06-09T14:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266285#M45555</link>
      <description>In the Advanced settings of tFileFetch is an option to "Print response to console". Does that reveal anything interesting just before the job hangs?</description>
      <pubDate>Fri, 09 Jun 2017 14:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266285#M45555</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-06-09T14:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266286#M45556</link>
      <description>I did try this but no error is shown:
&lt;BR /&gt;
&lt;BR /&gt;Status Line: HTTP/1.1 200 OK
&lt;BR /&gt;*** Response Header ***
&lt;BR /&gt;Date: Fri, 09 Jun 2017 16:16:05 GMT
&lt;BR /&gt;Server: Apache/2.2.15 (CentOS)
&lt;BR /&gt;Last-Modified: Tue, 28 Feb 2017 22:09:31 GMT
&lt;BR /&gt;ETag: "ac0509-8a47-5499e73433cc0"
&lt;BR /&gt;Accept-Ranges: bytes
&lt;BR /&gt;Content-Length: 35399
&lt;BR /&gt;Connection: close
&lt;BR /&gt;Content-Type: image/jpeg</description>
      <pubDate>Fri, 09 Jun 2017 17:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266286#M45556</guid>
      <dc:creator>billimmer</dc:creator>
      <dc:date>2017-06-09T17:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266287#M45557</link>
      <description>&lt;P&gt;another update.&amp;nbsp; I created a simple job and connected a tloop for 1 to 3000 ----&amp;gt; iterate -----&amp;gt; tfilefetch&lt;/P&gt; 
&lt;P&gt;the file is the same file every time:&lt;/P&gt; 
&lt;P&gt;...&lt;A href="https://images.tradeservice.com/TF6WT1M87RNDP45U/PRODUCTIMAGES/DIR100002/BRONUTC00003_16_TN_001.jpg" target="_blank" rel="nofollow noopener noreferrer"&gt;https://images.tradeservice.com/TF6WT1M87RNDP45U/PRODUCTIMAGES/DIR100002/BRONUTC00003_16_TN_001.jpg&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;after a random number of downloads, the Talend job hangs.&amp;nbsp; I quickly try the url in a browser, and it spins.&amp;nbsp; So the server is slow...&lt;/P&gt; 
&lt;P&gt;But the question is, why doesn't the tfilefetch give up and move on to the next iteration after the specified number of milliseconds?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 20:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266287#M45557</guid>
      <dc:creator>billimmer</dc:creator>
      <dc:date>2017-06-09T20:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266288#M45558</link>
      <description>Another update. I built the following code routine for testing and call it in a loop with tjava. This runs without hanging up. Note that the code disables ssl cert checking so it's not a production solution: 
&lt;BR /&gt; 
&lt;BR /&gt;public static String HttpDownloadFile(String fileURL, String saveDir, String saveName) { 
&lt;BR /&gt;String msg = ""; 
&lt;BR /&gt; 
&lt;BR /&gt;// Create a new trust manager that trust all certificates 
&lt;BR /&gt;TrustManager[] trustAllCerts = new TrustManager[]{ 
&lt;BR /&gt;new X509TrustManager() { 
&lt;BR /&gt;public java.security.cert.X509Certificate[] getAcceptedIssuers() { 
&lt;BR /&gt;return null; 
&lt;BR /&gt;} 
&lt;BR /&gt;public void checkClientTrusted( 
&lt;BR /&gt;java.security.cert.X509Certificate[] certs, String authType) { 
&lt;BR /&gt;} 
&lt;BR /&gt;public void checkServerTrusted( 
&lt;BR /&gt;java.security.cert.X509Certificate[] certs, String authType) { 
&lt;BR /&gt;} 
&lt;BR /&gt;} 
&lt;BR /&gt;}; 
&lt;BR /&gt; 
&lt;BR /&gt;// Activate the new trust manager 
&lt;BR /&gt;try { 
&lt;BR /&gt;SSLContext sc = SSLContext.getInstance("SSL"); 
&lt;BR /&gt;sc.init(null, trustAllCerts, new java.security.SecureRandom()); 
&lt;BR /&gt;HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); 
&lt;BR /&gt;} catch (Exception e) { 
&lt;BR /&gt;msg = "DOWNLOAD ERROR: Unhandled exception."; 
&lt;BR /&gt;e.printStackTrace(); 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt;try { 
&lt;BR /&gt;URL url = new URL(fileURL); 
&lt;BR /&gt;URLConnection connection = url.openConnection(); 
&lt;BR /&gt; 
&lt;BR /&gt;String fileName = ""; 
&lt;BR /&gt;String disposition = connection.getHeaderField("Content-Disposition"); 
&lt;BR /&gt;String contentType = connection.getContentType(); 
&lt;BR /&gt;int contentLength = connection.getContentLength(); 
&lt;BR /&gt; 
&lt;BR /&gt;if (disposition != null) { 
&lt;BR /&gt;// extracts file name from header field 
&lt;BR /&gt;int index = disposition.indexOf("filename="); 
&lt;BR /&gt;if (index &amp;gt; 0) { 
&lt;BR /&gt;fileName = disposition.substring(index + 10, 
&lt;BR /&gt;disposition.length() - 1); 
&lt;BR /&gt;} 
&lt;BR /&gt;} else { 
&lt;BR /&gt;// extracts file name from URL 
&lt;BR /&gt;fileName = fileURL.substring(fileURL.lastIndexOf("/") + 1, 
&lt;BR /&gt;fileURL.length()); 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt;System.out.println("Content-Type = " + contentType); 
&lt;BR /&gt;System.out.println("Content-Disposition = " + disposition); 
&lt;BR /&gt;System.out.println("Content-Length = " + contentLength); 
&lt;BR /&gt;System.out.println("fileName = " + fileName); 
&lt;BR /&gt; 
&lt;BR /&gt;// opens input stream from the HTTP connection 
&lt;BR /&gt;InputStream inputStream = connection.getInputStream(); 
&lt;BR /&gt;String saveFilePath = saveDir + File.separator + saveName; 
&lt;BR /&gt; 
&lt;BR /&gt;// opens an output stream to save into file 
&lt;BR /&gt;FileOutputStream outputStream = new FileOutputStream(saveFilePath); 
&lt;BR /&gt; 
&lt;BR /&gt;int bytesRead = -1; 
&lt;BR /&gt;byte[] buffer = new byte[8192]; 
&lt;BR /&gt;while ((bytesRead = inputStream.read(buffer)) != -1) { 
&lt;BR /&gt;outputStream.write(buffer, 0, bytesRead); 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt;outputStream.close(); 
&lt;BR /&gt;inputStream.close(); 
&lt;BR /&gt; 
&lt;BR /&gt;System.out.println("File downloaded"); 
&lt;BR /&gt;} catch (FileNotFoundException e) { 
&lt;BR /&gt;msg = "DOWNLOAD ERROR: File not found."; 
&lt;BR /&gt;} catch (IOException ex) { 
&lt;BR /&gt;msg = "DOWNLOAD ERROR: Unhandled exception."; 
&lt;BR /&gt;ex.printStackTrace(); 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt;return msg; 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jun 2017 22:02:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266288#M45558</guid>
      <dc:creator>billimmer</dc:creator>
      <dc:date>2017-06-12T22:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266289#M45559</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Could you please go to Window &amp;gt; Show view &amp;gt; General &amp;gt; Error Log to see if there is any error message?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 10:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266289#M45559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-05T10:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch hangs at random url in iterate loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266290#M45560</link>
      <description>&lt;P&gt;Here are the log entries for a job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align="left"&gt;!ENTRY org.talend.platform.logging 1 0 2017-07-10 10:31:16.262&lt;/P&gt;
&lt;P align="left"&gt;!MESSAGE 2017-07-10 10:31:16,262 INFO org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory - Using NULL lifecycle mapping for MavenProject: org.talend.master.butler:code.Master:6.2.1 @ C:\Talend\Workspaces_6_2_1\WS_Butler\.Java\pom.xml.&lt;/P&gt;
&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align="left"&gt;　&lt;/P&gt;
&lt;P align="left"&gt;!ENTRY org.talend.platform.logging 1 0 2017-07-10 10:31:17.402&lt;/P&gt;
&lt;P align="left"&gt;!MESSAGE 2017-07-10 10:31:17,402 INFO org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory - Using NULL lifecycle mapping for MavenProject: org.talend.master.butler:code.Master:6.2.1 @ C:\Talend\Workspaces_6_2_1\WS_Butler\.Java\pom.xml.&lt;/P&gt;
&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align="left"&gt;　&lt;/P&gt;
&lt;P align="left"&gt;!ENTRY org.talend.platform.logging 1 0 2017-07-10 10:31:18.543&lt;/P&gt;
&lt;P align="left"&gt;!MESSAGE 2017-07-10 10:31:18,543 INFO org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory - Using NULL lifecycle mapping for MavenProject: org.talend.master.butler:code.Master:6.2.1 @ C:\Talend\Workspaces_6_2_1\WS_Butler\.Java\pom.xml.&lt;/P&gt;
&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align="left"&gt;　&lt;/P&gt;
&lt;P align="left"&gt;!ENTRY org.talend.platform.logging 1 0 2017-07-10 10:31:19.715&lt;/P&gt;
&lt;P align="left"&gt;!MESSAGE 2017-07-10 10:31:19,715 INFO org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory - Using NULL lifecycle mapping for MavenProject: org.talend.master.butler:code.Master:6.2.1 @ C:\Talend\Workspaces_6_2_1\WS_Butler\.Java\pom.xml.&lt;/P&gt;
&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align="left"&gt;　&lt;/P&gt;
&lt;P align="left"&gt;!ENTRY org.talend.platform.logging 1 0 2017-07-10 10:31:20.403&lt;/P&gt;
&lt;P align="left"&gt;!MESSAGE 2017-07-10 10:31:20,403 INFO org.talend.designer.core.runprocess.Processor - Command line: C:/Java/jre1.8.0_112/bin/java.exe -Xms256M -Xmx1024M -Dfile.encoding=UTF-8 -cp C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/target/classes;.;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/commons-codec-1.6.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/commons-httpclient-3.0.1.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/commons-logging-1.1.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/dom4j-1.6.1.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/jcifs-1.3.0.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/jtds-1.3.1-patch.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/log4j-1.2.16.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib/talendcsv.jar;C:/Talend/Workspaces_6_2_1/WS_Butler/.Java/lib; butler.testfilefetch_0_1.testFileFetch --context=Test --stat_port=3978 %*&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 16:40:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-hangs-at-random-url-in-iterate-loop/m-p/2266290#M45560</guid>
      <dc:creator>billimmer</dc:creator>
      <dc:date>2017-07-10T16:40:36Z</dc:date>
    </item>
  </channel>
</rss>

