A Stale Socket File Makes a Make Target Lie
A start target that checks whether a socket path exists will skip starting the daemon after a crash, then report success. Test for a live listener, not for a file.
TIL · Today I Learned
Short technical notes, commands, fixes and behaviours learned while building and operating real systems.
Small discoveries worth retaining
Showing all 32 notes.
A start target that checks whether a socket path exists will skip starting the daemon after a crash, then report success. Test for a live listener, not for a file.
A lab VM with a virtual TPM works from the home directory and fails from a second data volume. The profile permits socket creation under one path pattern only, and the denial is not in the tool's output.
Uncommenting the stock localnet ACL so a lab network can reach a proxy also admits every other private range, including the wifi the laptop happens to be sitting on.
Remote desktop credentials go into the login keyring, and the keyring stays locked until someone logs in at the console. Setting them on a headless machine appears to succeed and produces a connect-then-drop fault.
A self-signed key generated the usual way is rejected with no useful error. The certificate is fine and the key is fine; the private key container format is not.
The terminal escape sequence that lets a remote editor write to your local clipboard has no reliable read half. Configure copy through it and leave paste to the terminal.
Agent start-up logic in ~/.profile works when you log in at the machine and silently does nothing when you connect over SSH. Which startup file runs depends on how the shell was invoked.
A service bound to 0.0.0.0 will not accept connections arriving inside a VRF unless the kernel is told to allow it. The listener looks correct, the route is correct, and the connection is refused.
For a training-compliance Access evaluator, I treat missing users, invalid requests and database errors as deny conditions instead of accidental allows.
Short-lived Cloudflare API failures can justify a retry, but diagnostic Workers still need a bounded attempt count and a useful fallback value.
Cloudflare Gateway can provide a rule ID to a custom block page, but resolving that UUID to the rule name makes support diagnostics much more useful.
When a Zero Trust diagnostic page needs the virtual IPv4/IPv6 assigned to a device, the active device registration is the useful object to query.
For dynamically generated security pages, I use a per-response nonce so required inline script/style can run without falling back to a broad unsafe-inline CSP.
A CF-Ray header alone does not prove a request came from Gateway, so my Worker requires Gateway-specific query context before rendering diagnostic output.
A rebuildable demo environment should not destroy the backend that stores its state, so I manage the S3/DynamoDB backend as a separate Terraform project.
An HTTP data source can retrieve an external domain feed, but the useful pattern is to validate and normalize it before Terraform materializes enforcement objects.
When Terraform already knows the cloud subnets, those values can become inputs to WARP routing instead of being copied into a second manually maintained list.
In my Gateway allow-list Worker, Cloudflare lists remain the enforcement state while Workers KV stores backup and synchronization metadata.
Using the Git commit SHA as a container image tag creates a direct, immutable link between source code, pipeline and deployed artifact.
When learning a new platform, proving the deployment manually first turns CI/CD into automation of a known-good process.
A hostname can continue returning NXDOMAIN after its DNS record exists if another resolver layer has cached the earlier negative response.
A CLI working in PowerShell does not mean the same authentication or configuration will automatically exist inside WSL.
Why Active Directory exposes multiple logon attributes and why choosing the wrong one can give misleading results.
A small Astro content-filtering pattern that makes draft posts visible during local development without publishing them.
The small deployment workflow behind this site: test Astro locally, push to GitHub and let Cloudflare build the production site.
The simple 301 redirect pattern I use to keep one canonical hostname for a site.
Cloud and SaaS services move between addresses. Policy often expresses intent more accurately when it follows the application hostname.
A simple pre-push check for seeing changed, unstaged and staged content before it reaches a public repository.
When a local script is blocked by execution policy, Process scope can be useful for a temporary session without changing the machine-wide setting.
Use a HEAD request to see the HTTP status and Location header without downloading the complete page.
DNS resolution and packet routing are related, but a WARP configuration often needs you to reason about them separately.
Before creating an emergency bypass, work out whether the failure is identity, posture, policy, DNS, tunnel or origin.