MATLAB "License Manager Error -X" in CI
FlexLM reported a numbered license error. The number tells you exactly what failed: -4 means all licenses in use, -5 means no such feature, -15 means cannot connect to the server, and -103 means the system clock or hostid does not match.
What this error means
MATLAB prints "License Manager Error -N" during startup or a -batch run and exits. The number and the linked lme page identify the precise cause.
License Manager Error -5
License checkout failed. No such feature exists.
Feature: MATLAB
License path: /usr/local/MATLAB/R2024a/licenses/Common causes
The feature or product is not licensed
Error -5 means the license has no entitlement for the product you invoked (a toolbox, or MATLAB itself for this token).
Server, seat, or clock mismatch
-4 means every seat is in use, -15 means the server is unreachable, and -103 means the hostid or system clock disagrees with the license.
How to fix it
Match the code to the remedy
- Read the exact -N number MATLAB printed.
- For -5, license the missing product or drop it from
products:in setup-matlab. - For -15, fix
MLM_LICENSE_FILE; for -4, free a seat or add capacity; for -103, correct the runner clock.
# -15: point at a reachable server
export MLM_LICENSE_FILE=27000@license.internal.example.com
matlab -batch "disp(license)"Request only licensed products in setup-matlab
Listing an unlicensed toolbox in products: triggers -5. Request only what your token covers.
- uses: matlab-actions/setup-matlab@v2
with:
products: >
MATLAB
Signal_Processing_ToolboxHow to prevent it
- Keep the runner clock synchronized to avoid -103.
- Request only products your license actually covers.
- Document which -N codes your team has seen and their fixes.