Skip to content

JMeter Works in GUI Fails in CLI

Fix JMeter plans that pass in GUI but fail in non-GUI CLI: working directory, CSV paths, -J properties, plugins, headless network, and result paths.

Difficulty
intermediate
Guide type
troubleshooting
Estimated read time
6 min read
Last verified version
Verified JMeter 5.6
  • Green samples in the GUI with a few threads

  • Same .jmx fails under:

    Terminal window
    jmeter -n -t plan.jmx -l results.jtl
  • Failures often show missing files, wrong host, plugin/class errors, or connection errors only on the CI agent

Official stance: use GUI to build and debug; use non-GUI for real load (best practices). CLI is required in CI/CD and containers.

CauseDetail
Working directoryRelative CSV, keystore, or payload paths resolve from different cwd
PropertiesGUI used defaults or GUI-set props; CLI missing -J / -q
Plugins missingCI image or server install lacks lib/ext JARs (plugins)
Headless networkAgent cannot reach SUT (ConnectException)
Different user.propertiesLocal custom props not present on the agent
Output paths-o report dir already exists / not writable
Java version skewDifferent JVM behaviour or TLS defaults
  1. Run CLI on the same machine as the successful GUI run first:

    Terminal window
    cd /path/to/plan-dir
    jmeter -n -t plan.jmx -l results.jtl -j jmeter.log -e -o report/
  2. Open jmeter.log for file-not-found, class-not-found, or SSL lines.

  3. Make CSV and resource paths stable (relative to plan location or absolute). CSV Data Set is the documented multi-user pattern (best practices).

  4. Parameterize hosts and threads with `\${__P(name,default)}` and pass the same -J flags you expect in CI (functions).

  5. Mirror plugins into the CLI environment; restart after installs.

  6. In Docker/K8s, mount plans and outputs explicitly (Docker guide); use qainsights/jmeter or your pinned image consistently.

  7. Only after local CLI is green, run the same command in CI with the same properties and network access.

ResourceUse when
CI/CD load testingPipeline patterns
Plugins essentialsMissing elements in CLI
ConnectExceptionNetwork only in CI
Properties cheat sheetEnv differences

No. Always prove non-GUI once. Production and CI never use the GUI for load.

GUI often starts with a cwd near the plan or last open file. CLI cwd is wherever you launched the process. Prefer plan-relative layout and document the launch directory.

Same engine, different resource profile (no GUI listeners). Functional failures are usually path/property/plugin/network differences, not -n itself.

On this page