Skip to content

vLLM Error: unrecognized arguments: serve

Fix vLLM CLI error: unrecognized arguments: serve caused by Docker ENTRYPOINT duplication or legacy OpenAI entrypoint flags across vLLM containers.

Quick answer

unrecognized arguments: serve happens for one of two reasons: the vllm/vllm-openai Docker image already sets ENTRYPOINT ["vllm", "serve"] so passing "serve" in CMD duplicates the subcommand, or the installed vLLM release is older and uses python3 -m vllm.entrypoints.openai.api_server.

Symptom
api_server.py: error: unrecognized arguments: serve
Root cause
Duplicated subcommand between Docker image ENTRYPOINT and container args, or mismatch between vllm serve syntax and installed vLLM version.
Recommended fix
Inspect the container image ENTRYPOINT via docker inspect --format='{{json .Config.Entrypoint}}' <image>.
How Denpex helps
Denpex investigates vLLM Error: unrecognized arguments: serve using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
Infrastructure#vllm#docker#cli#kubernetes#entrypoint

What this failure is

The vLLM argparse CLI parser rejected the token 'serve' as an unknown positional argument when launching the OpenAI-compatible serving entrypoint.

Live diagnosis, no signup

Is this what broke your run? Paste your log.

You're reading about vLLM Error: unrecognized arguments: serve. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.

Before uploading, review cloud data handling and local options.

training_logs.txt
No log to hand? Try one:

Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.

3 free cloud diagnoses per day

Why it happens (the mechanism)

Official vLLM Docker images changed their ENTRYPOINT across releases to invoke vllm serve automatically, while Kubernetes manifests and Helm charts still pass args: ["vllm", "serve", ...] or ["serve", "--model", ...]. Conversely, older Python wheels lack the vllm serve subcommand.

What you'll observe

  • vLLM container immediately exits with exit code 2 and error: unrecognized arguments: serve
  • Kubernetes pods enter CrashLoopBackOff on initial deploy after bumping vLLM image tag

Common symptoms and what they mean

Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.

SymptomPossible explanation
vllm: error: unrecognized arguments: serveDuplicated subcommand between Docker image ENTRYPOINT and container args, or mismatch between vllm serve syntax and installed vLLM version.
api_server.py: error: unrecognized arguments: serveDuplicated subcommand between Docker image ENTRYPOINT and container args, or mismatch between vllm serve syntax and installed vLLM version.

Which systems are affected

  • vLLM Docker containers (vllm/vllm-openai)
  • Kubernetes Deployments, Helm charts, and Slurm job wrappers

How to confirm this is the problem

Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.

  • ✓Run the container with --help first, then confirm vLLM starts cleanly and GET /health returns HTTP 200.

Root cause

  • Duplicated subcommand between Docker image ENTRYPOINT and container args, or mismatch between vllm serve syntax and installed vLLM version.

The fix and how to prevent it

How to fix it

  • Inspect the container image ENTRYPOINT via docker inspect --format='{{json .Config.Entrypoint}}' <image>.
  • If ENTRYPOINT is already ["vllm", "serve"] or ["python3", "-m", "vllm.entrypoints.openai.api_server"], pass only the model and flags (e.g. ["--model", "YOUR_MODEL"]) without repeating "serve".
  • Alternatively, override command/entrypoint explicitly in Kubernetes (command: ["vllm", "serve"]) so behavior never drifts across image tags.
  • Check python3 -c "import vllm; print(vllm.__version__)" if running outside the official image.

Step-by-step remediation

  1. 1Run docker inspect to verify whether vllm serve or api_server is already the container ENTRYPOINT.
  2. 2Remove the duplicate serve token or explicitly set command: ["vllm", "serve"].
  3. 3Confirm startup succeeds and GET /health responds with HTTP 200.

How to prevent it

  • Set explicit command and args in Kubernetes manifests rather than relying on upstream image ENTRYPOINT defaults
  • Pin vLLM image digests rather than floating :latest tags

Save this diagnosis and catch the next crash automatically

All root cause, fix, and prevention steps above are free to read. Create a free account with any email or GitHub to keep your saved diagnosis history across the encyclopedia and run cloud checks, or use a work email below for the 30-day Team evaluation. No card required.

Or start a 30-day free Team trial (work email)

Verified work email unlocks all 14 fleet diagnostic tools, Slack alerts, and team history for 30 days. No card and no automatic charge.

Use your company email, for example alex@yourcompany.com.

Who qualifies?

Company email domains activate the free 30-day Team evaluation (up to 50 diagnoses a day) after an email and domain check, whatever mail provider you use. If we cannot verify your domain automatically, support reviews it: write to support@denpex.com. Free local diagnosis in the editor extension needs no account.

Using a personal email (Gmail, Outlook, Naver, QQ) or solo cluster? Create a free $0 account (no work email required) to save 7-day history and unlock AI fallback, or send a cluster crash log for a live walkthrough.
Already have an account? Sign in

Searchable error signature

search key
api_server.py: error: unrecognized arguments: serve
vllm serve: error: unrecognized arguments: serve

Use this text as a lookup key in logs and upstream issue trackers. It is not presented as a captured customer log. Confirm the cause from your own preceding events, versions, configuration and the cited references.

Diagnose your own log automatically

The root cause and fix steps above stay free. Create a free account to analyze full job logs, attribute the first failed rank, and keep saved incident history.

Sign up free. Analyze your cluster logs

No credit card. Daily allowance follows verified trust tier. Instant access.

Why the recommended fix works

Inspecting ENTRYPOINT and pinning explicit container commands eliminates subcommand duplication across vllm/vllm-openai image tags.

Code examples

snippet
docker inspect --format='{{json .Config.Entrypoint}}' vllm/vllm-openai:latest
python3 -c "import vllm; print(vllm.__version__)"

This snippet illustrates the entry-specific check. Verify the installed versions, permissions, target and workload context before using it. A command or API example is not proof of recovery.

Best practices by model family

Model / StackRecommendationNotes
vllm/vllm-openai Docker imageSet explicit command: ["vllm", "serve"] in K8sPrevents upstream ENTRYPOINT changes from breaking manifests.
Bare-metal / venvVerify vllm --help before scriptingUse vllm serve on modern builds.

With the fix vs without the fix

DimensionWith the fixWithout the fix
Container manifestPinned image tag + explicit command/argsFloating :latest + implicit ENTRYPOINT breaks pods
Startup speedImmediate clean argument parseCrashLoopBackOff with exit code 2

Diagnostic note

“Many teams hit this right after switching from python -m vllm.entrypoints.openai.api_server to vllm/vllm-openai Docker images whose ENTRYPOINT already invokes api_server or vllm serve.”

Diagnose this failure in VS Code

Select the traceback or open the failed terminal, then run Denpex locally to inspect matched failure patterns, supporting evidence and next checks without uploading the log. Verify recommendations against your workload before changing production.

Install the free VS Code extension

vLLM errors in context

vLLM failures cross request, model, KV cache, worker, kernel and host boundaries. The hub compares common signatures and evidence checks that help distinguish possible causes.

Compare related vllm errors

Frequently asked questions

Questions engineers and on-call staff commonly ask about this failure.

Why does vllm/vllm-openai reject vllm serve in Kubernetes args?
Because the Docker image ENTRYPOINT already prepends the executable/subcommand. Adding "serve" inside args passes it as a duplicate positional argument.
How do I pass the model name cleanly in Kubernetes?
Override command: ["vllm", "serve"] and pass args: ["YOUR_MODEL", "--gpu-memory-utilization", "0.90"].

Don't just read the fix, diagnose your run

The encyclopedia explains documented failure patterns. Denpex investigates your logs, configuration and stack, shows the supporting evidence, and asks for missing details when needed.