Unable to start MJS workers

2 views (last 30 days)
Andrew Martin
Andrew Martin on 8 Aug 2019
Edited: Etan H on 27 Jun 2021
Hello,
While trying to start MJS workers, I'm running into the following error:
java.lang.reflect.InvocationTargetException: null
which is caused by:
java.lang.IllegalArgumentException: matlabExecutable must be of the form '<release string>=<path to executable>;<release string>=<path to executable>;'. Actual string: %MATLAB_EXECUTABLE%
I tried the sollution suggested in:https://www.mathworks.com/matlabcentral/answers/427624-why-do-i-receive-the-error-matlabexecutable-must-be-of-the-form-release-string-path-to-executab
The error changed slightly, in that the "actual string: %MATLAB_EXECUTABLE%" was replaced with "actual string: /usr/local/MATLAB/R2017a/bin/matlab', indicating that I was editing the correct file.
The change I made was:
set.MATLAB_EXECUTABLE=/usr/local/MATLAB/R2017a/bin/matlab
Any help would be greatly appreciated. The system is a CentOS 6.10 system. I'm running Matlab 2017a.

Answers (3)

Andrew Martin
Andrew Martin on 8 Aug 2019
Oddly enough, rebooting the servers appears to have resolved this issue. I reverted my change of set.MATLAB_EXECUTABLE as well, and all is well.

Kojiro Saito
Kojiro Saito on 8 Aug 2019
Edited: Kojiro Saito on 8 Aug 2019
How about seting
MATLAB_EXECUTABLE=/usr/local/MATLAB/R2017a/bin/glnxa64/matlab
(not bin/matlab, but bin/glnxa64/matlab) in
/var/lib/mdce/Checkpoint\wrapper-phoenix-environment.config file?

Etan H
Etan H on 27 Jun 2021
Edited: Etan H on 27 Jun 2021
In case it helps anyone, what worked for me was modifying the environment file ...
[user@host ~]# sudo nano /etc/environment
... such that it included this:
MATLAB_EXECUTABLE="R2020b=/usr/local/MATLAB/R2020b/bin/matlab"
This way it matches what the error message is noting, i.e. <release string>=<path to executable>. I'm not trying to run multiple MSJ job managers or anything, so I don't completely understand why this is necessary; but, that seemed to do the trick, and I guess it's now set up such that I could specify multiple MATLAB versions if/when I want to.
Setting that var to the full executable path (e.g. MATLAB_EXECUTABLE=/usr/local/MATLAB/R2017a/bin/glnxa64/matlab) did not work for me. Rebooting the server also did not work for me. It seems like that var should automatically be set somewhere/sometime by MATLAB job service/manager scripts, which may explain why unsetting MATLAB_EXECUTABLE and rebooting the server made things work for @Andrew Martin. I'm working within an AWS EC2 instance running Amazon's "Linux 2" distro (which is RHEL/CentOS-like), though; so, maybe that makes things different.
I think the environment file is the proper way to set that var (for this specific distro, at least) but if you wanted/needed to, it could instead live somewhere like /etc/bashrc or some user-specific location.

Categories

Find more on MATLAB Parallel Server in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!