Skip to content
Latchkey

JMeter "jmeter: command not found" in CI

The shell could not find a jmeter executable. CI runners do not ship JMeter by default, so the step must install Apache JMeter and put its bin directory on PATH before invoking it.

What this error means

A step calling jmeter -n ... fails with "jmeter: command not found" and exit code 127, before any test plan runs.

JMeter
/home/runner/work/_temp/script.sh: line 1: jmeter: command not found
Error: Process completed with exit code 127.

Common causes

JMeter is not installed on the runner

The base runner image has no Apache JMeter, so the launcher script does not exist on PATH.

Installed but bin not on PATH

JMeter was downloaded to a directory whose bin was never added to PATH, so the bare jmeter name does not resolve.

How to fix it

Download JMeter and add it to PATH

  1. Download and extract an Apache JMeter release in a setup step.
  2. Add its bin directory to GITHUB_PATH.
  3. Then invoke jmeter -n -t plan.jmx.
.github/workflows/ci.yml
- run: |
    curl -sL https://dlcdn.apache.org/jmeter/binaries/apache-jmeter-5.6.3.tgz | tar xz
    echo "$PWD/apache-jmeter-5.6.3/bin" >> "$GITHUB_PATH"
- run: jmeter -n -t plan.jmx -l results.jtl

Invoke JMeter by absolute path

If you do not modify PATH, call the launcher with its full path.

Terminal
./apache-jmeter-5.6.3/bin/jmeter -n -t plan.jmx -l results.jtl

How to prevent it

  • Install JMeter in a setup step; runners do not ship it.
  • Add the JMeter bin directory to GITHUB_PATH.
  • Pin a JMeter version so the download URL stays valid.

Frequently asked questions

What causes ""jmeter: command not found""?
The base runner image has no Apache JMeter, so the launcher script does not exist on PATH.
How do I fix "jmeter: command not found"?
Download JMeter and add it to PATH

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card