Skip to content

Latest commit

 

History

History
136 lines (94 loc) · 2.99 KB

File metadata and controls

136 lines (94 loc) · 2.99 KB

Port Conflict Resolution - Automatic Handling

What Was Fixed

Your Local Nexus Controller now automatically handles port conflicts on startup. You'll never have to manually kill processes again.

What Changed

All startup scripts now include automatic port conflict detection and resolution:

Updated Scripts

  1. run.ps1 - Manual startup script

    • Automatically detects processes using port 5010
    • Stops conflicting processes before starting
    • Shows clear status messages
  2. start.bat - Windows batch file startup

    • Calls run.ps1 with port conflict handling
    • Works from any location
  3. tools/auto_start_controller.ps1 - Auto-start on boot

    • Handles port conflicts during Windows startup
    • Ensures clean application start after reboot
  4. tools/auto_start_and_launch_all.ps1 - Full automation

    • Clears port conflicts
    • Starts controller
    • Launches all registered services
  5. tools/setup_auto_start.ps1 - Auto-start setup

    • Now uses the improved controller script
    • Configures Windows Task Scheduler properly

How It Works

When you start the application:

  1. Script checks if port 5010 is in use
  2. If a process is found, it's automatically stopped
  3. A brief pause ensures the port is released
  4. Your application starts cleanly

Setup Auto-Start on Reboot

To ensure the controller starts automatically when you reboot Windows:

Run Setup Script

cd tools
.\setup_auto_start.ps1

This will:

  • Configure Windows Task Scheduler
  • Create necessary startup files
  • Set up automatic port conflict resolution
  • Start the controller on user login

Verify Auto-Start

After setup, check the status:

Get-ScheduledTask -TaskName "Local Nexus Controller"

Disable Auto-Start

If you need to disable it:

cd tools
.\disable_auto_start.ps1

Manual Startup

You can still start the controller manually anytime:

Option 1: PowerShell

.\run.ps1

Option 2: Batch File

start.bat

Both methods now include automatic port conflict resolution.

What Happens on Reboot

After configuring auto-start:

  1. You log in to Windows
  2. Task Scheduler launches the controller
  3. Port conflicts are automatically resolved
  4. Application starts cleanly
  5. Dashboard is available at http://127.0.0.1:5010

Troubleshooting

If the application won't start:

  1. Check if Python is in your PATH:

    python --version
  2. Verify the virtual environment exists:

    Test-Path .\.venv
  3. Reinstall dependencies:

    .\.venv\Scripts\python.exe -m pip install -r requirements.txt

View Task Scheduler logs:

Get-ScheduledTask -TaskName "Local Nexus Controller" | Get-ScheduledTaskInfo

Next Steps

Your system is now fully configured for:

  • Automatic port conflict resolution
  • Clean startup on reboot
  • Reliable operation

Just run the setup script once, and everything will work automatically going forward.