unix
11 minTCP, UDP, ss, netstat, and tcpdump: A Layered Network Debugging Guide
Diagnose connection failures by separating DNS, routing, transport, listening sockets, and application protocol behavior.
Loading page...
unix
11 minDiagnose connection failures by separating DNS, routing, transport, listening sockets, and application protocol behavior.
Q&A
Q&AInspect local socket state and bind address before changing firewall policy.
On Linux, `ss -lntup` lists listening sockets; `netstat` may be available via net-tools on older systems. Confirm the process, address, and network namespace. A service bound only to 127.0.0.1 is not externally reachable; also check container port mapping and host policy.
Q&A
Q&AResolve the name from the failing runtime, then test the returned address and port separately.
Use the system resolver path, for example getent hosts, and compare with a direct DNS query. If a correct address resolves but the connection fails, investigate route, listener, firewall, or protocol behavior. Run diagnostics inside the same container or namespace as the application because resolver configuration may differ.
python
9 minTurn Python exceptions into a reproducible diagnosis using traceback frames, minimal experiments, structured logging, and boundary validation.
java
10 minA practical method for investigating wrapped exceptions, null failures, resource exhaustion, and misleading catch blocks in JVM services.
java
9 minDiagnose collection bugs caused by inconsistent equality, mutable keys, inheritance, and accidental identity comparisons.
Q&A
Q&ACOUNT(column) excludes NULL values; COUNT(*) counts input rows.
COUNT(*) counts each row in the group regardless of column values. COUNT(column) counts only rows where that expression is non-NULL. When aggregates look low, check nullability and join multiplication before changing the query.
Q&A
Q&ACapture the seed and environment, then isolate and repeatedly run the smallest failing test.
Treat the failure as evidence of an uncontrolled input. Record test order, random seed, runtime, timing, and environment; run the test alone and repeatedly. If it only fails in a suite, inspect shared fixtures, globals, ports, environment patches, clocks, and unawaited tasks before adding retries.