<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML-esimuotoiltu Char";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTML-esimuotoiltuChar
        {mso-style-name:"HTML-esimuotoiltu Char";
        mso-style-priority:99;
        mso-style-link:HTML-esimuotoiltu;
        font-family:Consolas;}
span.Shkpostityyli22
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">It seems that the WMS server is closing the door and there is nothing else to do on the GDAL side except to try again later. Contact the WMS service maintainer and report your troubles.
 They may be able to provide you a more reliable service especially if you are ready to pay for it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>Puolesta </b>Roman Breitfuss-Schiffer<br>
<b>Lähetetty:</b> torstai 18. marraskuuta 2021 11.59<br>
<b>Vastaanottaja:</b> gdal-dev@lists.osgeo.org<br>
<b>Aihe:</b> [gdal-dev] GDALWMS - error: TCP connection reset by peer<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-family:"Tahoma",sans-serif">Dear all!</span><o:p></o:p></p>
<p><span style="font-family:"Tahoma",sans-serif">We are running a Python application an a linux distribution (RedHat) which creates clips in MBTILES format from a WMS. We are using the Python-API and are basically doing something like this:</span><o:p></o:p></p>
<p><span style="font-family:"Courier New"">src_ds = gdal.Warp(<br>
    tmp_file,<br>
    ds_in,<br>
    format='GTiff',<br>
    outputBounds=[bbox[0], bbox[2], bbox[1], bbox[3]],<br>
    dstSRS=output_srs,<br>
)<br>
ds_out = gdal.Translate(<br>
    out_filepath,<br>
    src_ds,<br>
    format='MBTILES',<br>
    creationOptions=creation_options,<br>
)</span><o:p></o:p></p>
<p><span style="font-family:"Tahoma",sans-serif">The application throughs an error from time to time since a few days. We couldn't figure out a pattern yet and therefore we are also not able to reproduce the error. The error is the following:</span><o:p></o:p></p>
<p><span style="font-family:"Courier New"">Mon Nov 15 13:48:13 2021: CPLError: GDALWMS: Unable to download block 2765, 602.<br>
URL: TCP connection reset by peer<br>
  HTTP status code: 0, error: TCP connection reset by peer.<br>
Add the HTTP status code to <ZeroBlockHttpCodes> to ignore this error (see <a href="http://www.gdal.org/frmt_wms.html">
http://www.gdal.org/frmt_wms.html</a>).<br>
Mon Nov 15 13:48:13 2021: CPLError: /wms_xml/wms_config.xml, band 1: IReadBlock failed at X offset 2764, Y offset 601<br>
Mon Nov 15 13:48:13 2021: CPLError: GetBlockRef failed at X block offset 2764, Y block offset 601</span><o:p></o:p></p>
<p><span style="font-family:"Tahoma",sans-serif">The exact same data gets processed successfully in one run and not successfully in another run. We didn't change the code nor the Python or GDAL version. Hence, we are kind of puzzled as the error comes and goes
 seemingly at random.</span> <o:p></o:p></p>
<p><span style="font-family:"Tahoma",sans-serif">Does anyone of you have any hints?</span><o:p></o:p></p>
<p><span style="font-family:"Tahoma",sans-serif">Thanks & best regards!<br>
Roman</span><o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Dipl.-Ing. Roman Breitfuss-Schiffer, MSc. (GIS)<o:p></o:p></pre>
</div>
</body>
</html>