Skip to content

Troubleshooting Guide

Prasad Honrao edited this page Oct 22, 2024 · 3 revisions

This guide will help you resolve some of the common issues encountered while running the DevCamper project. Each section provides step-by-step instructions to diagnose and fix problems.

How to Find and Kill Processes Running on Port 3000 and 5000

If you're developing the DevCamper project, you might encounter situations where port 3000 (commonly used for the React frontend) or port 5000 (commonly used for the API backend) is already in use by another process. Below are steps for MacOS/Linux, Windows, and PowerShell to identify and stop the processes occupying these ports.

For MacOS and Linux (Bash):

  1. Find the Process ID (PID) of the process occupying the port.

    • For port 3000, run:
      lsof -i :3000
    • For port 5000, run:
      lsof -i :5000

    This will return output that includes a PID (Process ID).

  2. Kill the process using the PID.

    • Once you've found the PID from the output, kill the process by running:
      kill -9 <PID>

    Example:

    kill -9 12345

For Windows (Command Prompt):

  1. Find the Process ID (PID) of the process using the port.

    • For port 3000, run:
      netstat -ano | findstr :3000
    • For port 5000, run:
      netstat -ano | findstr :5000

    This will return a list with the PID of the process.

  2. Kill the process using the PID.

    • Once you've got the PID, you can kill the process by running:
      taskkill /PID <PID> /F

    Example:

    taskkill /PID 12345 /F

For Windows (PowerShell):

  1. Find the Process ID (PID) of the process using PowerShell.

    • For port 3000, run:
      Get-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess
    • For port 5000, run:
      Get-Process -Id (Get-NetTCPConnection -LocalPort 5000).OwningProcess

    This command will return the PID (Process ID) along with the details of the process.

  2. Kill the process using PowerShell.

    • Once you've found the PID, you can kill the process by running:
      Stop-Process -Id <PID> -Force

    Example:

    Stop-Process -Id 12345 -Force

Other Common Issues

(You can add more sections for different common problems in this part of the Troubleshooting Guide.)


By following these steps, you can free up the ports and rerun your frontend or backend server without conflicts.

Clone this wiki locally