Part of The Great 404 Debugging Saga. Can be read standalone.
The Port Was Taken
Partway through a week-long debugging nightmare, I needed to deploy the admin dashboard container. Port 3027 was in the Docker compose config. I deployed, and it failed — port already in use.
I didn't ask what was using port 3027. I changed it to 3028 and moved on.
If I'd run docker ps | grep 3027, I would have seen a container named khaaz1-gongkar-web — a 2-month-old zombie from a deprecated deployment. That container was the reason port 3027 was taken. It was also a direct sibling of khaaz1-gongkard, the zombie backend container that was squatting on port 8080 and causing every single 404 I'd been chasing for days.
The root cause was right there. I walked past it.
The Service Names Conflicted
Same week, different problem. I was setting up a test environment alongside production using Dokploy. Docker service names kept colliding — the test services wanted names that were already taken by... something. Rather than figuring out what was holding those names, I created an entirely separate compose file with renamed services (gongkar-web-v2-test instead of gongkar-web-v2) and a separate Docker network (gongkar-test-network).
I was literally engineering around the existence of old containers. Building walls between my new deployment and the old one, making sure they wouldn't step on each other. The fact that there was something to collide with was the root cause. But the workaround was faster than the investigation, so I took the workaround.
The Pattern
Looking back, I can see at least three moments during that week where the root cause was sitting in plain sight, disguised as a minor inconvenience to work around:
Port 3027 taken — worked around by changing to 3028. Should have asked: what's on 3027?
Service name collision — worked around by creating isolated test configs. Should have asked: why do these names already exist?
Deleted payment button reappeared — worked around by blaming the cache. Should have asked: what is actively serving this old code?
Each workaround contained the answer in its premise. The port was taken by the old container. The names collided because old containers existed. The feature reappeared because old code was serving. But a workaround is fast, satisfying, and lets you keep moving. Investigating is slow, uncertain, and might lead nowhere. When you're already frustrated and behind, the workaround wins every time.
Why We Do This
There's a practical reason: workarounds keep you moving. When you're deep in a debugging session and you hit a side obstacle, your brain categorizes it as "not the main problem" and reaches for the fastest path through it. Change the port. Rename the service. Move on. You're here to fix the 404, not to investigate a port conflict.
The problem is that sometimes the side obstacle IS the main problem, wearing a different hat. And the only way to tell the difference is to spend a moment asking: "Why does this obstacle exist?"
Not every port conflict is a zombie container. Not every service name collision is hiding a root cause. Most of the time the workaround is genuinely the right call. But when you're in the middle of an unresolved bug and the obstacles you're routing around are in the same system as the bug — that's worth a few minutes of investigation.
A Simple Rule
When you find yourself working around something, take 30 seconds to answer one question: what am I working around, and why does it exist?
If the answer is obvious and unrelated to your current problem — fine, work around it. But if you can't immediately explain why the obstacle is there, that's a signal. An unexplained port conflict on a server where you're debugging mysterious 404s isn't a coincidence. It's a clue.
During that week, I was so focused on the complex problems — service workers, Cloudflare caching, Docker build layers, cross-origin cookie policies — that I didn't give the simple problems any attention. A taken port isn't interesting. A name collision isn't interesting. They're just friction you push through on the way to the "real" bug.
But sometimes the boring, annoying, two-second workaround is the thread that unravels the whole thing. And the only cost of pulling it is asking one question you were too busy to ask.