Closed GenosseFlosse closed 1 year ago
Are you sure the licence file that is being used by the network manager is updated for use with 2023b?
What's the result of running the following command:
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName mathworks/matlab:r2023b -batch ver
Thank you @GenosseFlosse for that information! We will dig deeper, and get back to you.
Hey, thanks for taking the time :) The Result is the following (I Xed out our license server):
Licensing MATLAB using the license manager XXXXX@licenseXXXXX.XXXXXX.de.
Running matlab -licmode file -batch "ver"
-----------------------------------------------------------------------------------------------------
MATLAB Version: 23.2.0.2365128 (R2023b)
MATLAB License Number: XXXXXX
Operating System: Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 23.2 (R2023b)
Addition: Yeah, we use the same network license for our desktop MATLAB versions. They work fine! Addition: Deleted old comment: License number was visible
The same issue seems to be present on the official docker containers of mathworks.
Calling matlab -batch ver
:
C:\Users\GenosseFlosse>docker run --init --rm -e MLM_LICENSE_FILE=XXXXX@licenseXXXXX.XXXXXX.de mathworks/matlab:r2023a matlab -batch ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.14.0.2337262 (R2023a) Update 5
MATLAB License Number: XXXXXX
Operating System: Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.14 (R2023a)
C:\Users\GenosseFlosse>docker run --init --rm -e MLM_LICENSE_FILE=XXXXX@licenseXXXXX.XXXXXX.de mathworks/matlab:r2023b matlab -batch ver
Please enter your MathWorks Account email address and press Enter:
Sign-in failed. Would you like to retry? y/n [n]
C:\Users\GenosseFlosse>
So calling matlab -batch ver
instead of just -batch ver
seems to result in matlab ignoring the MLM_LICENSE_FILE
in 2023b.
Here the log when just calling -batch ver
(everything works):
C:\Users\GenosseFlosse>docker run --init --rm -e MLM_LICENSE_FILE=XXXXX@licenseXXXXX.XXXXXX.de mathworks/matlab:r2023b -batch ver
Licensing MATLAB using the license manager XXXXX@licenseXXXXX.XXXXXX.de.
Running matlab -licmode file -batch "ver"
-----------------------------------------------------------------------------------------------------
MATLAB Version: 23.2.0.2365128 (R2023b)
MATLAB License Number: XXXXXX
Operating System: Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 23.2 (R2023b)
C:\Users\GenosseFlosse>docker run --init --rm -e MLM_LICENSE_FILE=XXXXX@licenseXXXXX.XXXXXX.de mathworks/matlab:r2023a -batch ver
Licensing MATLAB using the license manager XXXXX@licenseXXXXX.XXXXXX.de.
Running matlab -batch "ver"
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.14.0.2337262 (R2023a) Update 5
MATLAB License Number: XXXXXX
Operating System: Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.14 (R2023a)
C:\Users\GenosseFlosse>
It should be possible to call matlab -batch someScript
since in the example CI config for matlab on gitlab this is the case.
And the behaviour of the container should be consistent throughout releases for us (customers) to be able to test against new releases easily. Thank you for being lightning fast in your response here on GH!
Hi @GenosseFlosse , thank you for the info and the quick responses :+1:
I am glad to hear that everything works when just calling -batch ver
, without the matlab
- can I confirm that you now have a solution that works for you across the range of releases you wish to test? Please let us know if you have any further issues.
The issue is still present and I do not consider it solved. I would like to explain, why: As you can see, I call matlab explicitly inside the container and explicitly test for the presence of my test result after matlab exited.
script: - matlab -batch test - test -e testres.mat
This is no longer possible since r2023b and I wish it to be possible. Using
script:
- -batch test
- test -e testres.mat
gives the following gitlab error:
$ -batch test
/usr/bin/bash: line 133: -batch: command not found
Is it an acceptable solution to update the script command to:
script:
- matlab -licmode file -batch test
- test -e testres.mat
This change should work with all releases of MATLAB in your test matrix...
Yes that worked! Thank you!
Still the example gitlab CI with matlab needs an update then...
I'm glad that worked!
We will notify the teams that own the gitlab CI templates about this issue, and also remember to consider this workflow for future versions of mathworks/matlab
containers.
Thank you for reporting the issue, and please let us know if we can be of any further assistance!
Hey there!
I am using matlab containers as described in building-on-matlab-docker-image.
My Gitlab-CI calls:
Curiously, until 2023a, everything is working okay. But using 2023b, matlab does not use the network license I provide but instead asks me to put in an E-Mail address. To further debug the issue I ran the container for 2023b on Docker Desktop:
This is the same behaviour I encounter in Gitlab CI
Running the container for 2023a on Docker Desktop:
This is also the same behaviour I encounter for 2023a in the Gitlab CI.
So here is what I don't understand: Why does one container work and the other doesn't although everything is configured the same and called the same? Did something change in the default entrypoint?