Why do Jenkins builds with MATLAB fail on a Windows machine?

8 vues (au cours des 30 derniers jours)
When I try to run code on a Windows machine using the Jenkins plugin for MATLAB, the build fails with this error message: 
ERROR: MATLAB error Exit Status: 0x00000001
Why is this message displayed? Is there a way to fix the problem? 

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 12 Mai 2023
Modifié(e) : MathWorks Support Team le 12 Mai 2023
The exit code suggests that MATLAB did not run successfully. This error might be because of a potential MATLAB licensing error. To run MATLAB code or Simulink models, Jenkins needs access to a valid MATLAB or Simulink license. 
When you install Jenkins using either 'installer.exe' or 'jenkins.msi', it becomes a Windows service. As a Windows service application, Jenkins can be accessed using Windows system credentials. If your Windows system credentials are different from your MATLAB license credentials, Jenkins cannot access MATLAB and fails the build. 
To enable the Jenkins service application to access MATLAB, follow these steps:
  1. In Windows Task Manager, select the Services tab, and then locate Jenkins.
  2. Right-click on the Jenkins service and select Open Services. This will open a new window with all the services.
  3. In the Services window, right-click the Jenkins service and select Properties
  4. In the Jenkins Properties window, select the Log On tab. Then select This account, and enter your username and password with valid MATLAB license. 
  5. Restart Jenkins so that it can use the provided username and password when invoking MATLAB. Then, rerun your build. 
For more information about running MATLAB with Jenkins, please refer to this page.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by