<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: roy reznik</title>
    <description>The latest articles on DEV Community by roy reznik (@roy_reznik_59dace0c435ae6).</description>
    <link>https://dev.to/roy_reznik_59dace0c435ae6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2857462%2F431b38fd-de0f-4a34-a43d-ac1551e9bd48.jpg</url>
      <title>DEV Community: roy reznik</title>
      <link>https://dev.to/roy_reznik_59dace0c435ae6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/roy_reznik_59dace0c435ae6"/>
    <language>en</language>
    <item>
      <title>Debug &amp; Chill #1</title>
      <dc:creator>roy reznik</dc:creator>
      <pubDate>Thu, 13 Feb 2025 16:14:32 +0000</pubDate>
      <link>https://dev.to/roy_reznik_59dace0c435ae6/debug-chill-1-22k7</link>
      <guid>https://dev.to/roy_reznik_59dace0c435ae6/debug-chill-1-22k7</guid>
      <description>&lt;p&gt;Hi there!&lt;/p&gt;

&lt;p&gt;Welcome to the first episode in my debugging series. I originally started writing this back in 2020, but only now have I had the time to translate and rewrite it into a fun, hands-on exploration of debugging. Throughout this series, I’ll show you various ways to approach problems, explaining my thought process along the way.&lt;/p&gt;

&lt;p&gt;Let’s dive right into the first debugging session!&lt;/p&gt;

&lt;h4&gt;
  
  
  Background
&lt;/h4&gt;

&lt;p&gt;It’s around 2020, and my coworker has told me about a new technology called OpenNebula (often referred to as “one”). If you’re unfamiliar, here’s a brief explanation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“OpenNebula is an open source platform delivering a simple but feature-rich and flexible solution to build and manage enterprise clouds for virtualized services, containerized applications, and serverless computing.” — ReadMe.md, 2025&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In essence, it’s somewhat similar to the VMware stack (ESXi, vSphere, etc.). It lets you create virtual machines, set up networks, and connect these VMs much like you would with any major cloud provider.&lt;/p&gt;

&lt;p&gt;I won’t delve into broader virtualization topics here, but stay tuned: a future episode will cover that in more depth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXftwUWBlCYO-ZBLKtakIMSOc5fAZGnMoixmtYDvfM8s0RdbZFZkpGGdLu3cn-o8vIhjACjjUgKJbcTiQ7OWNQFMge8arMgBha6YYbxEspJr5vldkcRWgql8_YWbbAKbTplCJSNn%3Fkey%3Dzt6KwTV1xDAkBTSKDBCoofyr" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXftwUWBlCYO-ZBLKtakIMSOc5fAZGnMoixmtYDvfM8s0RdbZFZkpGGdLu3cn-o8vIhjACjjUgKJbcTiQ7OWNQFMge8arMgBha6YYbxEspJr5vldkcRWgql8_YWbbAKbTplCJSNn%3Fkey%3Dzt6KwTV1xDAkBTSKDBCoofyr" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The Setup
&lt;/h4&gt;

&lt;p&gt;For this scenario, my coworker created two Ubuntu VMs: Client and Server, both on the latest Ubuntu version. He also set up a network between them and assigned IPs on the same subnet.&lt;/p&gt;

&lt;p&gt;So the network looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXdFThVo9FaSiuB2-rB4p9Gx5ZUgwmWDSpTs5DteDaMsA4qmEu702TjK-31X3F7hMZ1xrz8aDdZw_Mxv5DNSFGERsrrfcgkg_XQIcGRMNPOj8Qrs1KXAB0QQAmAwhzZciPPw2_8RZg%3Fkey%3Dzt6KwTV1xDAkBTSKDBCoofyr" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh7-rt.googleusercontent.com%2Fdocsz%2FAD_4nXdFThVo9FaSiuB2-rB4p9Gx5ZUgwmWDSpTs5DteDaMsA4qmEu702TjK-31X3F7hMZ1xrz8aDdZw_Mxv5DNSFGERsrrfcgkg_XQIcGRMNPOj8Qrs1KXAB0QQAmAwhzZciPPw2_8RZg%3Fkey%3Dzt6KwTV1xDAkBTSKDBCoofyr" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The Problem
&lt;/h4&gt;

&lt;p&gt;When we try to run the following command on the Client VM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh root@1.1.1.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…it just hangs. No output, no prompt—nothing.&lt;/p&gt;

&lt;p&gt;What would you do in this situation?&lt;/p&gt;

&lt;p&gt;(Pause here if you want to think about possible issues before reading on.)&lt;/p&gt;

&lt;p&gt;From experience, I can think of three main categories of problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Something is misconfigured on one of the machines.&lt;/li&gt;
&lt;li&gt;There’s a network configuration problem within OpenNebula.&lt;/li&gt;
&lt;li&gt;There’s a hardware issue causing packet drops.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To check for network/hardware issues (2 and 3), I ran a simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ping 1.1.1.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the ping worked flawlessly. That rules out basic connectivity problems.&lt;/p&gt;

&lt;p&gt;Next, I tried:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; http.server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;on the Server VM, then from the Client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://1.1.1.2:8000/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No luck—curl never got a response. This suggested an issue at the transport layer (TCP/UDP) rather than raw connectivity (ICMP ping was fine, but TCP traffic failed).&lt;/p&gt;

&lt;h4&gt;
  
  
  Digging Deeper With Tools
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://www.tcpdump.org/" rel="noopener noreferrer"&gt;tcpdump&lt;/a&gt; is a personal favorite for troubleshooting network issues because it lets you watch packets in real time. I ran it on both VMs while attempting the curl command again. On the Client side, I could see a SYN packet being sent, but it never appeared on the Server side. If packets aren’t arriving, you need to figure out where they’re getting dropped.&lt;/p&gt;

&lt;p&gt;A critical thing to know about &lt;code&gt;tcpdump&lt;/code&gt; is that it captures inbound packets before firewall tools like &lt;code&gt;iptables&lt;/code&gt;, So if you don't see them captured as inbound packets, that can't be related to the firewall.&lt;br&gt;
In general, The “flow” of a packet in Linux goes something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IN: Wire -&amp;gt; NIC -&amp;gt; tcpdump -&amp;gt; netfilter/iptables
OUT: iptables -&amp;gt; tcpdump -&amp;gt; NIC -&amp;gt; Wire
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’re interested in an in-depth explanation, you can read this article &lt;a href="https://thermalcircle.de/doku.php?id=blog:linux:nftables_ipsec_packet_flow" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another valuable tool is &lt;a href="https://man7.org/linux/man-pages/man8/ethtool.8.html" rel="noopener noreferrer"&gt;ethtool&lt;/a&gt;, which allows you to query and adjust network driver settings. Running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ethtool &lt;span class="nt"&gt;-k&lt;/span&gt; eth0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;on both VMs, I noticed TCP offload was enabled.&lt;/p&gt;

&lt;p&gt;TCP Offload is a technique that offloads some IP or TCP tasks to the network interface card (NIC) itself. It can dramatically improve performance under heavy loads, but if the driver configuration is buggy or if there’s an incompatibility, it can result in packet loss or other odd behavior.&lt;/p&gt;

&lt;p&gt;I decided to disable it temporarily:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ethtool &lt;span class="nt"&gt;-K&lt;/span&gt; tx off rx off &lt;span class="c"&gt;# On both the Client and the Server VM&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With offloading disabled, I retried the HTTP request and… success! SSH also worked again.&lt;/p&gt;

&lt;p&gt;While I didn’t investigate the deeper cause, I suspect it relates to driver settings or OpenNebula’s own host configuration. Turning off offloads resolved the issue in this case.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
