<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Troubleshooting on bismigel</title><link>https://bismigel.dev/tags/troubleshooting/</link><description>Recent content in Troubleshooting on bismigel</description><generator>Hugo</generator><language>en-us</language><copyright>bismigel</copyright><lastBuildDate>Mon, 19 Oct 2026 09:30:00 -0400</lastBuildDate><atom:link href="https://bismigel.dev/tags/troubleshooting/index.xml" rel="self" type="application/rss+xml"/><item><title>Cilium VXLAN troubleshooting: port 8472 already in use</title><link>https://bismigel.dev/posts/2026-10-19-cilium-vxlan-troubleshooting/</link><pubDate>Mon, 19 Oct 2026 09:30:00 -0400</pubDate><guid>https://bismigel.dev/posts/2026-10-19-cilium-vxlan-troubleshooting/</guid><description/><content:encoded><![CDATA[<p>Cilium was healthy in native routing. After switching to VXLAN, new pods stayed in <code>ContainerCreating</code> and Cilium health was unreachable. The cause was not the kernel or the firewall.</p>
<h1 id="symptoms">Symptoms</h1>
<ul>
<li><code>cilium-dbg status</code> showed <code>Routing: Tunnel [vxlan]</code>.</li>
<li>New pods stayed in <code>ContainerCreating</code>.</li>
<li>Cilium health warned that the health daemon was unreachable.</li>
<li>Existing pods could still serve traffic.</li>
<li>Cilium agent logs showed:</li>
</ul>
<div class="code-block">
  <div class="code-block-header">
    <span class="code-block-lang">text</span>
    <button type="button" class="code-copy" aria-label="Copy code">
      <span class="code-copy-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</span>
      <span class="code-copy-icon code-copy-icon-check"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
</span>
      <span class="code-copy-label">Copy</span>
    </button>
  </div>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">failed to setup vxlan tunnel device:
</span></span><span class="line"><span class="cl">  address already in use</span></span></code></pre></div>
</div>
<h1 id="checks">Checks</h1>
<p>Run these on the node:</p>
<div class="code-block">
  <div class="code-block-header">
    <span class="code-block-lang">bash</span>
    <button type="button" class="code-copy" aria-label="Copy code">
      <span class="code-copy-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</span>
      <span class="code-copy-icon code-copy-icon-check"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
</span>
      <span class="code-copy-label">Copy</span>
    </button>
  </div>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ip -d link show <span class="nb">type</span> vxlan
</span></span><span class="line"><span class="cl">ss -lunp <span class="p">|</span> grep <span class="m">8472</span>
</span></span><span class="line"><span class="cl">ip -d link show cilium_vxlan
</span></span><span class="line"><span class="cl">ip -4 route
</span></span><span class="line"><span class="cl">ip -4 rule
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Check the Cilium agent log:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">#+begin_src bash</span>
</span></span><span class="line"><span class="cl">kubectl -n kube-system logs ds/cilium --tail<span class="o">=</span><span class="m">100</span> <span class="p">|</span>
</span></span><span class="line"><span class="cl">  grep -Ei <span class="s1">&#39;vxlan|8472|address already|datapath&#39;</span></span></span></code></pre></div>
</div>
<p>In this lab the output showed two VXLAN devices:</p>
<ul>
<li><code>flannel.1</code>, still UP and bound to UDP 8472;</li>
<li><code>cilium_vxlan</code>, DOWN because Cilium could not bind the same port.</li>
</ul>
<p>Flannel was disabled in k3s, but the old interface survived the CNI migration.</p>
<h1 id="fix">Fix</h1>
<p>Remove the stale interface, then restart Cilium:</p>
<div class="code-block">
  <div class="code-block-header">
    <span class="code-block-lang">bash</span>
    <button type="button" class="code-copy" aria-label="Copy code">
      <span class="code-copy-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</span>
      <span class="code-copy-icon code-copy-icon-check"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
</span>
      <span class="code-copy-label">Copy</span>
    </button>
  </div>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ip link del flannel.1
</span></span><span class="line"><span class="cl">kubectl -n kube-system rollout restart ds/cilium</span></span></code></pre></div>
</div>
<p>On NixOS, make it survive a reboot:</p>
<div class="code-block">
  <div class="code-block-header">
    <span class="code-block-lang">nix</span>
    <button type="button" class="code-copy" aria-label="Copy code">
      <span class="code-copy-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</span>
      <span class="code-copy-icon code-copy-icon-check"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
</span>
      <span class="code-copy-label">Copy</span>
    </button>
  </div>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-nix" data-lang="nix"><span class="line"><span class="cl"><span class="n">systemd</span><span class="o">.</span><span class="n">services</span><span class="o">.</span><span class="n">cleanup-flannel-vxlan</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">description</span> <span class="o">=</span> <span class="s2">&#34;Remove a stale Flannel VXLAN interface&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">before</span> <span class="o">=</span> <span class="p">[</span> <span class="s2">&#34;k3s.service&#34;</span> <span class="p">];</span>
</span></span><span class="line"><span class="cl">  <span class="n">wantedBy</span> <span class="o">=</span> <span class="p">[</span> <span class="s2">&#34;multi-user.target&#34;</span> <span class="p">];</span>
</span></span><span class="line"><span class="cl">  <span class="n">serviceConfig</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">Type</span> <span class="o">=</span> <span class="s2">&#34;oneshot&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">    <span class="n">RemainAfterExit</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="p">};</span>
</span></span><span class="line"><span class="cl">  <span class="n">script</span> <span class="o">=</span> <span class="s2">&#34;ip link del flannel.1 2&gt;/dev/null || true&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span></span></span></code></pre></div>
</div>
<h1 id="verify">Verify</h1>
<div class="code-block">
  <div class="code-block-header">
    <span class="code-block-lang">bash</span>
    <button type="button" class="code-copy" aria-label="Copy code">
      <span class="code-copy-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</span>
      <span class="code-copy-icon code-copy-icon-check"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
</span>
      <span class="code-copy-label">Copy</span>
    </button>
  </div>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ip -d link show cilium_vxlan
</span></span><span class="line"><span class="cl">ss -lunp <span class="p">|</span> grep <span class="m">8472</span>
</span></span><span class="line"><span class="cl">kubectl -n kube-system <span class="nb">exec</span> ds/cilium -- cilium-dbg status
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">kubectl run nettest --image<span class="o">=</span>curlimages/curl:8.10.1 --restart<span class="o">=</span>Never --command -- <span class="se">\
</span></span></span><span class="line"><span class="cl">  sh -c <span class="s1">&#39;curl -s -o /dev/null -w &#34;%{http_code}\n&#34; https://example.com&#39;</span></span></span></code></pre></div>
</div>
<p>Expected:</p>
<ul>
<li><code>cilium_vxlan</code> is UP;</li>
<li>UDP 8472 is owned by Cilium;</li>
<li>new pods reach <code>Running</code>;</li>
<li>DNS, external egress and ClusterIP work;</li>
<li><code>cilium-dbg status</code> health is 3/3.</li>
</ul>
<h1 id="why-native-routing-hid-it">Why native routing hid it</h1>
<p>Native routing never creates a VXLAN device, so a stale <code>flannel.1</code> interface did not matter. The tunnel failure looked like a kernel difference because native worked on the same hosts.</p>
<p>Two other settings still matter:</p>
<ul>
<li><code>networking.firewall.checkReversePath = false</code> on NixOS;</li>
<li>the fwmark overlap case when another VPN uses policy routing.</li>
</ul>
<p>References:</p>
<ul>
<li>Cilium routing: <a href="https://docs.cilium.io/en/stable/network/concepts/routing/" target="_blank" rel="noopener noreferrer">https://docs.cilium.io/en/stable/network/concepts/routing/</a>
</li>
<li>NixOS rpfilter issue: <a href="https://github.com/lucas-albers-lz4/rke2nixos/issues/10" target="_blank" rel="noopener noreferrer">https://github.com/lucas-albers-lz4/rke2nixos/issues/10</a>
</li>
<li>fwmark collision: <a href="https://pokgak.xyz/notes/cilium-vxlan-tailscale-fwmark-collision/" target="_blank" rel="noopener noreferrer">https://pokgak.xyz/notes/cilium-vxlan-tailscale-fwmark-collision/</a>
</li>
<li>Native vs encapsulation: <a href="/posts/2026-10-19-native-vs-encapsulation/">Native vs encapsulated routing for a small homelab</a>
</li>
</ul>
]]></content:encoded></item></channel></rss>