{"uid":"cap_ao75orgbkxfodjx3t4-lU","slug":"saylor-innovations-guide-library-linux-port-already-in-use-eaddrinuse-752099e8","name":"Saylor Innovations Guide Library: Linux Port Already In Use (EADDRINUSE / errno 98)","description":"Fix address already in use errno 98 - find the owner with ss -ltnp or lsof, kill safely, TIME_WAIT and SO_REUSEADDR, bind port 0 in tests","url":"https://saylorinnovations.com/api/kb/linux-port-already-in-use-ss-lsof-eaddrinuse-errno-98-find-process?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["id","t","c","body"],"properties":{"c":{"type":"string","description":"Category of the guide"},"t":{"type":"string","description":"Title of the guide"},"id":{"type":"string","description":"Identifier of the record"},"body":{"type":"string","description":"Main body text"},"price":{"type":["number","null"],"description":"Price"},"license":{"type":"string","description":"License identifier"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4H0XqerDVOa48Yi_ARr-6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a technical guide on diagnosing and resolving 'address already in use' (errno 98 / EADDRINUSE) errors on Linux, including how to find the owning process with ss or lsof, safely kill it, handle TIME_WAIT state, configure SO_REUSEADDR, and bind port 0 in tests.","exampleAgentPrompt":"I keep getting 'address already in use' (errno 98) when starting my server — pull up the Saylor Innovations guide on how to find and kill the process holding the port using ss or lsof, deal with TIME_WAIT, and set SO_REUSEADDR.","exampleUseCases":[{"title":"Debugging EADDRINUSE on a dev server","prompt":"My Node.js server keeps crashing with 'address already in use' on port 3000 — can you get me a guide on how to find what process is holding that port on Linux and safely free it up?"},{"title":"Understanding TIME_WAIT in socket reuse","prompt":"I'm seeing tons of TIME_WAIT sockets piling up and my service can't rebind after a restart — fetch me a guide explaining TIME_WAIT and how SO_REUSEADDR helps with this on Linux."},{"title":"Fixing port conflicts in automated tests","prompt":"My integration tests are randomly failing because ports are already in use between test runs — get me a guide on how to use port 0 binding in tests and avoid EADDRINUSE issues on Linux."}],"resultDescription":"A JSON object containing the guide's unique ID, title, category, full body text (explaining ss -ltnp / lsof commands, process killing, TIME_WAIT, SO_REUSEADDR, and port-0 test binding), license information, and price. The body is a human-readable technical article.","failureModes":["Endpoint returns non-200 if payment (x402) is not provided or fails","Guide content may be unavailable if the server is down, returning a 5xx error","Malformed requests may return a 400 bad request","Response body may be empty or truncated if the guide ID is invalid or retired"],"whenToPreferThis":"Choose this endpoint when an agent needs a concise, ready-to-read technical reference on Linux EADDRINUSE / errno 98 errors, port conflict diagnosis with ss or lsof, process management around port binding, or socket option guidance — especially when the agent needs a complete structured article rather than a raw web scrape or LLM-generated answer.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:35.193Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-guide-library-linux-port-already-in-use-eaddrinuse-752099e8"}