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

조회 수: 7 (최근 30일)
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
Ricky Goloski
Ricky Goloski 2020년 7월 9일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

제품


릴리스

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by