Executing a Jenkins Build (invoking the Matlab compiler in Windows Shell) returns license error: "Error: Could not check out a Compiler license"

7 Ansichten (letzte 30 Tage)
I'm trying to set up a Jenkins build to "Execute Windows batch command" when changes are pushed to a remote repository (that's resident on my company's file server). The machine hosting Jenkins polls (Poll SCM) the remote repo hourly for changes, pulls any changes, and runs the build. The build task is to execute a python script (called matlabbuilder.py) with some flags to compile matlab files from a specified directory. matlabbuilder.py achieves this by calling os.system("mcc -ev myscript.m -d C:\outputdir").
Though I could use the Jenkin's "Execute shell" build option to execute a matlab command to do the compilation, I prefer using the python script because it allows me to code features (like the ability to walk through a directory tree and compile all matlab files encountered). There's also an issue with executing the `matlab.exe -nosplash -nodesktop -r MATLAB_command` directly where matlab will open up the GUI application instead of remaining in the windows shell.
When the build triggers, I get the following error in Jenkin's console output:
E:\Builds\Python\ProjectBuilder>python3 matlabbuilder.py build C:\Users\omstest.MARINETEAM\Desktop\2010-036_BP_MaddogSpar_MatlabPlotters_copy --globexpr "*.m" --excludedir .git testfiles --recurse --verbose
Error: Could not check out a Compiler license: Invalid host.
The hostid of this system does not match the hostid specified in the license file.
Feature: Compiler
Hostid: =7CB21967:6F6D7374657374
License path: C:\Windows\system32\config\systemprofile\AppData\Roaming\MathWorks\MATLAB\R2012a_licenses;C:\Program Files\MATLAB\R2012a\licenses\license.dat;C:\Program Files\MATLAB\R2012a\licenses\license_OMSTESTPC_211275_R2012a.lic;
FLEXnet Licensing error:-9,57 For further information, refer to the FLEXnet Licensing documentation, available at "www.flexerasoftware.com"..
This is strange because my 2012a Matlab license has been validated. Also, if I were to open up a windows shell and directly execute:
python3 matlabbuilder.py build C:\Users\omstest.MARINETEAM\Desktop\2010-036_BP_MaddogSpar_MatlabPlotters_copy --globexpr "*.m" --excludedir .git testfiles --recurse --verbose
the command would run just fine!
Computer OS (Hosting Jenkins): Windows 7 Professional, x64
  1 Kommentar
Ricky Goloski
Ricky Goloski am 9 Jul. 2020
Bump
I'm encountering a similar issue. I can invoke MATLAB via a batch file just fine from a windows command shell, but through Jenkins it fails to launch. The Activation Module instead hangs in the background (as though the license is not set up properly), and the execution fails.
I am running on Windows 10 Pro, R2018a.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Manage Products finden Sie in Help Center und File Exchange

Produkte


Version

R2012a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by