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.
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.
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.
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.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
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.
| Symptom | Possible explanation |
|---|---|
| vllm: error: unrecognized arguments: serve | Duplicated subcommand between Docker image ENTRYPOINT and container args, or mismatch between vllm serve syntax and installed vLLM version. |
| api_server.py: error: unrecognized arguments: serve | Duplicated 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
- 1Run docker inspect to verify whether vllm serve or api_server is already the container ENTRYPOINT.
- 2Remove the duplicate serve token or explicitly set command: ["vllm", "serve"].
- 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.
Searchable error signature
api_server.py: error: unrecognized arguments: serve
vllm serve: error: unrecognized arguments: serveUse 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 logsNo 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
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 / Stack | Recommendation | Notes |
|---|---|---|
| vllm/vllm-openai Docker image | Set explicit command: ["vllm", "serve"] in K8s | Prevents upstream ENTRYPOINT changes from breaking manifests. |
| Bare-metal / venv | Verify vllm --help before scripting | Use vllm serve on modern builds. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| Container manifest | Pinned image tag + explicit command/args | Floating :latest + implicit ENTRYPOINT breaks pods |
| Startup speed | Immediate clean argument parse | CrashLoopBackOff 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 extensionvLLM 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 errorsFrequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
Why does vllm/vllm-openai reject vllm serve in Kubernetes args?
How do I pass the model name cleanly in Kubernetes?
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.
Related Infrastructure errors
Dual ISP BGP Route Withdrawal Causing Complete GPU Cloud Region Outage
Infrastructure · critical
Routine UPS Maintenance Triggering Cascading Power and Cooling Failure Across GPU Cloud Region
Infrastructure · critical
Remediation Storm Prevention via Circuit Breaker Pattern in AutoClusters
Infrastructure · high
Network Storage Volume Causing Process Hangs on H100 GPU Nodes
Infrastructure · high