This is most likely caused by a DNS issue where the Hostname is not getting resolved. When a connection test is performed an error similar to the one below will be displayed :
"java.net.UnknownHostException: The Hostname (BGL-RPADIYAT.ad.mathworks.com) could not be resolved. Set the Hostname manually in the mjs_def file and restart the mjs service"
To resolve this issue, please follow the below steps: # Stop the MJS Services. You can do so in the Windows Services or use the following commands in a Terminal for non-Windows machines
cd $MATLAB\toolbox\parallel\bin
./mjs stop
- Navigate to the mjs_def file.
- To locate the mjs_def file navigate to $MATLAB/toolbox/parallel/bin (where $MATLAB represents the folder where MATLAB is installed).
- Open this file with a text editor and modify the field "set HOSTNAME=%strHostname%.%strDomain%"
- Replace the default value with the Hostname,
- Restart the MATLAB Parallel Server services. You can do so in the Windows Services or use the following commands in a Terminal for non-Windows machines
cd $MATLAB\toolbox\parallel\bin
./mjs start
- Update the Admin Center.
This should resolve the issue.
NOTE: Starting in R2019a the following name changes occurred:
- MATLAB Distributed Computing Server was renamed to MATLAB Parallel Server
- mdce_def was renamed to mjs_def
- mdce binary was renamed to mjs
- mjs scripts are in $MATLAB/R20XXx/toolbox/distcomp/bin for R2019a and earlier
Best Answer