linux-port-resolver

Resolve Linux port conflicts (EADDRINUSE/bind failed) with precision. Detect occupying process, free the port, and prevent recurrence. Use when a service fails to start with "port already in use", EADDRINUSE, bind failed, or when you need to check what's on a specific port.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "linux-port-resolver" with this command: npx skills add laolaoqi/linux-port-resolver

Linux Port Resolver

Quick fix port conflicts on Linux without guesswork.

Quick Commands

# Find what's on a port
ss -tlnp | grep :PORT
# Alternative if ss not available
netstat -tlnp 2>/dev/null | grep :PORT
# Also check IPv6
ss -tlnp | grep :PORT

Resolution Steps

  1. Identify the process

    ss -tlnp | grep ":<PORT> "
    # Output: LISTEN 0 128 0.0.0.0:PORT 0.0.0.0:* users:(("process",PID,))
    
  2. Verify the PID - don't kill system processes

    ps -p PID -o pid,ppid,cmd,user
    
  3. Kill gracefully, escalate if needed

    kill PID                  # SIGTERM - graceful
    sleep 2 && ss -tlnp | grep ":<PORT> "  # verify
    kill -9 PID               # SIGKILL - force, last resort
    
  4. Or reconfigure - change the port in the service config instead

    • systemd: edit /etc/systemd/system/SERVICE.service, change port, systemctl daemon-reload && systemctl restart SERVICE
    • Docker: change ports: mapping in docker-compose.yml
    • Custom app: check config file or env var for port setting
  5. Prevent recurrence with ExecStartPre in systemd

    [Service]
    ExecStartPre=/bin/sh -c 'kill -9 $(ss -tlnp | grep ":PORT " | grep -oP "pid=\\K\\d+") 2>/dev/null; true'
    

Safety Checklist

  • Confirmed the port is actually in use
  • Identified the PID correctly
  • PID is not PID 1 or a critical system daemon
  • Verified there's no other instance still running
  • Checked both IPv4 and IPv6 listeners

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

EcoCompute — LLM Energy Efficiency Advisor

Evidence-first, stateless consulting skill for LLM inference energy optimization using measured benchmark priors and anti-pattern detection.

Registry SourceRecently Updated
General

ia-debugging

Systematic root-cause debugging with verification. Use for errors, stack traces, broken tests, flaky tests, regressions, or anything not working as expected....

Registry SourceRecently Updated
4240iliaal
General

ClawHealth Data Skill

Read a user's ClawHealth 30-day HealthKit sync, produce daily/weekly/long-term health reports, open temporary panels, explain health-check signals, and recom...

Registry SourceRecently Updated
General

Katz Deli

纽约下东区百年犹太熟食店,凭借经典电影植入和纯正风味单店年营收超$4000万,未开分店坚持传统工艺。

Registry SourceRecently Updated