Skip to content

[BUG] turtlebot3 with nvidia profile has port collision with cpu version #18

@bburda

Description

@bburda

Description

When attempting to run the TurtleBot3 demo with NVIDIA GPU acceleration using docker compose --profile nvidia up, Docker fails with a port binding error because both the default CPU service and the NVIDIA service try to bind to port 8080 simultaneously.

Steps to Reproduce

  1. Navigate to demos/turtlebot3_integration/
  2. Run: ./run-demo.sh --nvidia
    OR
    docker compose --profile nvidia up
  3. Observe error

Expected vs Actual Behavior

Expected:

  • NVIDIA GPU-accelerated demo starts successfully on port 8080
  • Only the nvidia-profile service runs

Actual:

  • Error: ports are not available: exposing port TCP 0.0.0.0:8080 -> 127.0.0.1:0: listen tcp 0.0.0.0:8080: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted
  • Both services attempt to start, causing port conflict

Root Cause

The default turtlebot3-demo service had no profile assigned, so it started automatically along with the turtlebot3-demo-nvidia service when using --profile nvidia. Both services tried to bind to port 8080.

Environment

  • OS: Linux (Docker host)
  • Docker Compose: v2.x
  • NVIDIA GPU: Required for reproduction

Solution

Assign profile cpu to the default service and update run-demo.sh to use --profile cpu by default. This ensures only one service runs at a time based on the specified profile.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions