Skip to content

[Bug]: Sometime port kill is not working #4

@shekhardtu

Description

@shekhardtu

Bug Description

When running oats start, it should kill the already running port if autoKill is enabled but intermittently it failed to free up the port. Please fix this issue.

🚀 Starting backend service...
⚠️ Port 4000 is already in use for backend
✖ Failed to free port 4000 after killing processes
✖ Failed to free port 4000

❌ Failed to start services

Steps to Reproduce

  1. Run backend on 4000 port.
  2. Now run oats start
  3. It will show unable to free up the port.
  4. Then shutdown the oats.

Expected Behavior

It should free up the port. Run the application on the same port.

Actual Behavior

🚀 Starting backend service...
⚠️ Port 4000 is already in use for backend
✖ Failed to free port 4000 after killing processes
✖ Failed to free port 4000

❌ Failed to start services

oats.config.json

Error Logs

oats Version

Latest

Node.js Version

21.x

Operating System

macOS

Package Manager

npm

Environment

  • This happens in a monorepo setup
  • This happens in a Docker container
  • This happens in CI/CD environment
  • I'm using TypeScript
  • I'm using a custom tsconfig.json

Additional Context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Existing Issues

  • I have searched the existing issues and this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions