<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>haproxy &amp;mdash; Jerry of the Week</title>
    <link>https://write.in0rdr.ch/tag:haproxy</link>
    <description>ˈdʒɛri - Individual who sends life against the grain no matter the consequences</description>
    <pubDate>Tue, 28 Apr 2026 12:58:15 +0000</pubDate>
    <item>
      <title>Docker pull through HAProxy</title>
      <link>https://write.in0rdr.ch/docker-pull-through-haproxy</link>
      <description>&lt;![CDATA[This is a story about pulling Docker images through HAProxy in my home lab.&#xA;&#xA;#selfhosting #homelab #docker #haproxy&#xA;!--more--&#xA;&#xA;I observed an interesting issue in my Jenkins pipeline. The image pull aborted with the following error message:&#xA;&#xA;Error: writing blob: storing blob to file &#34;/var/tmp/storage1360560957/1&#34;: happened during read: unexpected EOF&#xA;&#xA;First I thought it has something to do with the storage. But I was wrong. The culprit was the network.&#xA;&#xA;More specifically, I noticed that pulling through my HAProxy instance was the issue, but pulling through the nodes registry port (directly) was fine.&#xA;&#xA;When looking into the HAProxy logs, I noticed that the requests fail with the particular error flags cD:&#xA;&#xA;Sep 02 02:23:29 haproxy haproxy[2836]: 10.0.0.102:34982 [02/Sep/2025:02:22:47.563] registryfront registry/pi3 0/0/0/87/42156 200 466612119 - - cD-- 6/1/0/0/0 0/0 {haproxy.lan:5000} &#34;GET /v2/texlive/blobs/sha256:2fde6c0b50af2b1fda7ed0092ad1f1cc6897d7cb723dfcb0d2bc15201bbd7191 HTTP/1.1&#34;&#xA;&#xA;The HAProxy docs on stream states:&#xA;&#xA;     cD   The client did not send nor acknowledge any data for as long as the&#xA;          &#34;timeout client&#34; delay. This is often caused by network failures on&#xA;          the client side, or the client simply leaving the net uncleanly.&#xA;&#xA;First flag c:&#xA;  On the first character, a code reporting the first event which caused the&#xA;    stream to terminate :&#xA;&#xA;        c : the client-side timeout expired while waiting for the client to&#xA;            send or receive data.&#xA;&#xA;Second flag D:&#xA;  on the second character, the TCP or HTTP stream state when it was closed :&#xA;&#xA;        D : the stream was in the DATA phase.&#xA;&#xA;That was useful - &#34;the client-side timeout expired&#34;. It simply means that I need to bump the client timeouts (to 30m from 5s in this example) in the HAProxy frontend for my Docker registry.&#xA;&#xA;frontend registryfront&#xA;    bind                 :5000&#xA;    timeout              client 30m # was 5s&#xA;    timeout              client-fin 30m # was 30s&#xA;    mode                 http&#xA;    option               httplog&#xA;                         # display host header in logs&#xA;    capture              request header Host len 30&#xA;&#xA;    default_backend      registry&#xA;&#xA;The pull request through the proxy afterwards show no error flags (----):&#xA;Sep 02 02:30:27 haproxy haproxy[2850]: 10.0.0.102:53506 [02/Sep/2025:02:27:03.674] registryfront registry/pi3 0/0/0/15/203648 200 2334919898 - - ---- 7/1/0/0/0 0/0 {haproxy.lan:5000} &#34;GET /v2/texlive/blobs/sha256:2fde6c0b50af2b1fda7ed0092ad1f1cc6897d7cb723dfcb0d2bc15201bbd7191 HTTP/1.1&#34;&#xA;&#xA;Podman pull succeeds 🎉&#xA;&#xA;Ping me in chat or Fediverse if you have more suggestions regarding HAProxy configuration for private Docker registries. Happy self-hosting!&#xA;&#xA;div style=&#34;text-align:center; font-size: 0.8em&#34;&#xD;&#xA;a href=&#34;https://write.in0rdr.ch/feed&#34;&amp;#128732; RSS/a | a href=&#34;https://m.in0rdr.ch/in0rdr&#34;&amp;#128024; Fediverse/a | a href=&#34;https://chat.in0rdr.ch/#/guest?join=p0c@conference.in0rdr.ch&#34;&amp;#128172; XMPP/a&#xD;&#xA;/div]]&gt;</description>
      <content:encoded><![CDATA[<p>This is a story about pulling Docker images through HAProxy in my home lab.</p>

<p><a href="https://write.in0rdr.ch/tag:selfhosting" class="hashtag"><span>#</span><span class="p-category">selfhosting</span></a> <a href="https://write.in0rdr.ch/tag:homelab" class="hashtag"><span>#</span><span class="p-category">homelab</span></a> <a href="https://write.in0rdr.ch/tag:docker" class="hashtag"><span>#</span><span class="p-category">docker</span></a> <a href="https://write.in0rdr.ch/tag:haproxy" class="hashtag"><span>#</span><span class="p-category">haproxy</span></a>
</p>

<p>I observed an interesting issue in my Jenkins pipeline. The image pull aborted with the following error message:</p>

<pre><code>Error: writing blob: storing blob to file &#34;/var/tmp/storage1360560957/1&#34;: happened during read: unexpected EOF
</code></pre>

<p>First I thought it has something to do with the storage. But I was wrong. The culprit was the network.</p>

<p>More specifically, I noticed that pulling through my HAProxy instance was the issue, but pulling through the nodes registry port (directly) was fine.</p>

<p>When looking into the HAProxy logs, I noticed that the requests fail with the particular error flags <code>cD</code>:</p>

<pre><code>Sep 02 02:23:29 haproxy haproxy[2836]: 10.0.0.102:34982 [02/Sep/2025:02:22:47.563] registryfront registry/pi3 0/0/0/87/42156 200 466612119 - - cD-- 6/1/0/0/0 0/0 {haproxy.lan:5000} &#34;GET /v2/texlive/blobs/sha256:2fde6c0b50af2b1fda7ed0092ad1f1cc6897d7cb723dfcb0d2bc15201bbd7191 HTTP/1.1&#34;
</code></pre>

<p>The <a href="https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#8.5">HAProxy docs</a> on stream states:</p>

<pre><code>     cD   The client did not send nor acknowledge any data for as long as the
          &#34;timeout client&#34; delay. This is often caused by network failures on
          the client side, or the client simply leaving the net uncleanly.
</code></pre>

<p>First flag <code>c</code>:</p>

<pre><code>  - On the first character, a code reporting the first event which caused the
    stream to terminate :

        c : the client-side timeout expired while waiting for the client to
            send or receive data.
</code></pre>

<p>Second flag <code>D</code>:</p>

<pre><code>  - on the second character, the TCP or HTTP stream state when it was closed :

        D : the stream was in the DATA phase.
</code></pre>

<p>That was useful – “the client-side timeout expired”. It simply means that I need to bump the client timeouts (to 30m from 5s in this example) in the HAProxy frontend for my Docker registry.</p>

<pre><code>frontend registryfront
    bind                 :5000
    timeout              client 30m # was 5s
    timeout              client-fin 30m # was 30s
    mode                 http
    option               httplog
                         # display host header in logs
    capture              request header Host len 30

    default_backend      registry
</code></pre>

<p>The pull request through the proxy afterwards show no error flags (<code>----</code>):</p>

<pre><code>Sep 02 02:30:27 haproxy haproxy[2850]: 10.0.0.102:53506 [02/Sep/2025:02:27:03.674] registryfront registry/pi3 0/0/0/15/203648 200 2334919898 - - ---- 7/1/0/0/0 0/0 {haproxy.lan:5000} &#34;GET /v2/texlive/blobs/sha256:2fde6c0b50af2b1fda7ed0092ad1f1cc6897d7cb723dfcb0d2bc15201bbd7191 HTTP/1.1&#34;
</code></pre>

<p>Podman pull succeeds 🎉</p>

<p>Ping me in chat or Fediverse if you have more suggestions regarding HAProxy configuration for private Docker registries. Happy self-hosting!</p>

<div style="text-align:center; font-size: 0.8em">
<a href="https://write.in0rdr.ch/feed">🛜 RSS</a> | <a href="https://m.in0rdr.ch/in0rdr">🐘 Fediverse</a> | <a href="https://chat.in0rdr.ch/#/guest?join=p0c@conference.in0rdr.ch">💬 XMPP</a>
</div>
]]></content:encoded>
      <guid>https://write.in0rdr.ch/docker-pull-through-haproxy</guid>
      <pubDate>Wed, 03 Sep 2025 14:17:02 +0000</pubDate>
    </item>
  </channel>
</rss>