MATLAB "License checkout failed" in CI
MATLAB launched but could not check out a license: the runner has no license file, cannot reach a license server, and no batch licensing token was supplied. Headless MATLAB refuses to run without a valid license.
What this error means
A MATLAB step fails with "License checkout failed" followed by a "License Manager Error" number and a diagnostic URL. MATLAB then exits non-zero and the job stops.
License checkout failed.
License Manager Error -15
MATLAB is unable to connect to the license server.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/R2024a/15Common causes
No license reachable from the CI runner
The runner is not on your network, so a network license server (MLM_LICENSE_FILE) is unreachable, and no local license file exists.
No batch licensing token supplied
On hosted runners you must pass a batch licensing token to matlab-actions/setup-matlab; without it, MATLAB has nothing to check out.
How to fix it
Supply a batch licensing token
- Create a batch licensing token in the MathWorks license center for your license.
- Store it as a repository or organization secret.
- Pass it to setup-matlab so headless jobs can check out a license.
- uses: matlab-actions/setup-matlab@v2
with:
products: MATLAB
- uses: matlab-actions/run-command@v2
with:
command: mytests
env:
MLM_LICENSE_TOKEN: ${{ secrets.MATLAB_BATCH_TOKEN }}Point at a reachable license server
For self-hosted runners on your network, set MLM_LICENSE_FILE to port@host of the license server.
export MLM_LICENSE_FILE=27000@license.internal.example.com
matlab -batch "runtests"How to prevent it
- Keep the batch licensing token in a CI secret, never in the workflow file.
- Use matlab-actions/setup-matlab so licensing is wired for headless runs.
- For self-hosted runners, confirm the license server is reachable before jobs run.