Matlab license error when running container in GitLab Runner

조회 수: 6 (최근 30일)
Tim
Tim 2023년 9월 1일
답변: Jacob Mathew 2025년 6월 12일
I encountered strange behavior when trying to set up a Matlab pipeline inside of a GitLab Runner. I used the instructions here to build the docker image. It worked fine from the command prompt on the Linux Machine. However, when I used that image with the Gitlab runner, I received a license check out error (see output below). My first thought was the Gitlab runner machine could not access the network license server, although the command line test was also from the Gitlab runner machine. I installed netcat onto the Matlab image and had to remove the ENTRYPOINT ["matlab"] at the bottom of the Dockerfile so I could run the nc command in the Gitlab job.
Removing that ENTRYPOINT (and launching matlab from within the Gitlab job) solved the problem and the question is why did that work. Does anyone have thoughts? The Dockerfile from Mathworks has that ENTRYPOINT command in there so it must be something with the way Matlab and Gitlab interact.
Thanks!
MATLAB is selecting SOFTWARE OPENGL rendering.
License checkout failed.
License Manager Error -1
The license file cannot be found.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/1
Diagnostic Information:
Feature: MATLAB
License path: if [ -x /usr/local/bin/bash ]; then
exec /usr/local/bin/bash
elif [ -x /usr/bin/bash ]; then
exec /usr/bin/bash
elif [ -x /bin/bash ]; then
exec /bin/bash
elif [ -x /usr/local/bin/sh ]; then
exec /usr/local/bin/sh
elif [ -x /usr/bin/sh ]; then
exec /usr/bin/sh
elif [ -x /bin/sh ]; then
exec /bin/sh
elif [ -x /busybox/sh ]; then
exec /busybox/sh
else
echo shell not found
exit 1
fi
Licensing error: -1,359. System Error: 2
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

답변 (1개)

Jacob Mathew
Jacob Mathew 2025년 6월 12일
Hey Tim,
The error distinctly says that it is not able to read the license file while you are mentioning that you are using a network license server. There is a distinciton between the two where if you have a license file you will have to copy the LIC file into the docker container using the COPY command. Otherwise, you will have to set the correct address to the network licese server. You can refer to the following documentation to ensure that the license server or the license file is correctly configured:
Additionally, ensure that your network firewall or other administrative privileges are not blocking the Docker container from communicating with the licensing server. This could be a possibility as you mentioned that the ENTRYPOINT command did not successfully launch MATLAB but you were able to do so from GitLab Runner, where the GitLab Runner would have higher privileges to allow network or write access needed to get the container to run.

카테고리

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

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by