This is an issue where the variables set within the mjs_def file are not used to initialize the port ranges used by MATLAB Job Scheduler and the workers. These port ranges only exist in MATLAB Parallel Server versions R2015a to R2016b.
Please see the following external bug report for this issue:
To work around this issue please use the following flags for the terminal interface method of starting an MATLAB Job Scheduler cluster. These flags need to be added to the call for ./mjs with their desired values.
The appropriate flag for each variable:
JOBMANAGER_PEERSESSION_MIN_PORT = -jobmanagerpeersessionminport
JOBMANAGER_PEERSESSION_MAX_PORT = -jobmanagerpeersessionmaxport
WORKER_PARALLELPOOL_MIN_PORT = -workerparallelpoolminport
WORKER_PARALLELPOOL_MAX_PORT = -workerparallelpoolmaxport
For example, to start MJS with a custom port range of 14384-14848 for starting parallel pools on workers, type the following command into a command prompt (where <MATLABROOT> is the root of your MATLAB Parallel Server installation):
mdce start -workerparallalpoolminport 14384 -workerparallelpoolmaxport 14848
These flags only need to be included in the start up of the mjs service on each node of the cluster. After this point you are able to return to using admin center to start the job manager and workers.
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