agentleFS
carla-simulatorcarla-simulator/carla/Skills/setup/check-carla-ports/SKILL.md

check-carla-ports

Skill15k starsChanged 21 months agoMITView on GitHub

Reports which network ports CARLA and its tooling use on this machine and which are already taken — the simulator's RPC/streaming/secondary trio, the Traffic Manager, the Unreal MCP server, Alpamayo, NuRec and Cosmos — and names the process holding each one. Use before starting a second simulator or Traffic Manager, when a bind error appears ("failed to create because of bind error", "CARLA server failed to start on RPC port"), when a client connects to the wrong instance, or to pick a free port for a parallel run.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about carla-simulator/carla

The biggest 5 of 87 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 87

Talked about on GitHub, YouTube, Stack Overflow and Hacker News (87 times).

On GitHub · 50

45 more on GitHub

On YouTube · 25

20 more on YouTube

On Stack Overflow · 10

5 more on Stack Overflow

The file

Files
SKILL.md

Which ports does CARLA use, and what is holding them?

Paths. scripts/… below is relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.

The failure this prevents: a bind error is read as a broken install. CARLA's components do not search for a free port when theirs is taken. The simulator exits, and the Traffic Manager retries the same port twenty times and then raises. Both messages describe the symptom, neither names the process at fault — and on a developer machine the culprit is usually another CARLA, an editor, or a tool that defaults to the same number.

Docs/ref_ports.md is the full reference. This skill answers the live question: what is in use right now.

Instructions

Progress:
- [ ] Step 1: bash scripts/check_env.sh     (only fails with no ss and no lsof)
- [ ] Step 2: check — the CARLA ports and who holds them
- [ ] Step 3: act — free the port, or move the service that wants it

Step 1 — prerequisites

bash scripts/check_env.sh

Step 2 — check

bash scripts/ports.sh check

Prints one row per CARLA port with its expected role and the process actually listening:

PORT    STATE      ROLE                                          LISTENER
2000    IN USE     CARLA RPC server (-carla-rpc-port)            UnrealEditor 48250
2001    IN USE     CARLA sensor streaming (RPC+1)                UnrealEditor 48250
2002    IN USE     CARLA multi-GPU secondary router (RPC+2)      UnrealEditor 48250
8000    free       Traffic Manager RPC                           -
6256    IN USE     Unreal MCP server (editor only)               UnrealEditor 48250
8010    free       NVIDIA Cosmos example server                  -
8767    free       Alpamayo 2 Super model service                -

Read the LISTENER column, not the ROLE column. ROLE is what CARLA expects on that port; LISTENER is what is really there. A mismatch between them is the bug, and check calls out the common one — an editor serving MCP on the Traffic Manager's 8000.

Other subcommands:

CommandDoes
ports.sh checkthe CARLA ports only (default)
ports.sh listevery listening TCP port on the machine, CARLA roles named
ports.sh free PORTexits 0 if free, 1 if taken; for scripting
ports.sh role PORTwhat CARLA uses that port for

Non-default bases come from the environment, so a server on another port still reports correctly:

PORT=3654 TM_PORT=8050 bash scripts/ports.sh check

Step 3 — act

Pick by which side is easier to move.

SymptomFix
CARLA server failed to start on RPC port NClose the other simulator, or launch with -carla-rpc-port=M. Streaming and secondary follow at M+1 and M+2, so space parallel servers at least 3 apart
trying to create rpc server for traffic manager; but the system failed to create because of bind error.Free the port, or pass --traffic-manager-port M / client.get_trafficmanager(M). The Traffic Manager never falls back by itself
A client attaches to a simulator it should notTwo servers share an RPC port, or the client's port is wrong. ports.sh list shows every one
unreal-mcp fails with ECONNREFUSEDThe editor is not running, or it predates the move to 6256. Restart it and reconnect with /mcp

Never free a port by killing a process you did not start. An editor on these ports usually holds someone's unsaved level. Report what holds it and let the user decide.

Gotchas

  • The Traffic Manager lives in a client, not in the simulator. The first client to call get_trafficmanager(port) becomes its server; later clients on the same port attach to it. A free 8000 with vehicles already on autopilot means they are driven from another process.
  • ports.sh only sees TCP. ROS 2 is DDS over UDP, and its ports come from the domain id (7400 + 250 × domain), not from a port argument. Separate two ROS 2 stacks with ROS_DOMAIN_ID, not with ports.
  • A 0.0.0.0 bind is reachable from the network; 127.0.0.1 is not. The simulator binds all interfaces, the Unreal MCP server only localhost.
  • Unreal's own ports are not CARLA's. 1981/1989 are UnrealTraceServer and 1985/8558 are Zen Server; they appear whenever the editor runs and are nothing to do with a CARLA bind error.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.