How do I configure MATLAB Parallel Server using the MATLAB Job Scheduler to work within a firewall?

100 views (last 30 days)
I am installing MATLAB Parallel Server and Parallel Computing Toolbox. I plan on using the MATLAB Job Scheduler. 
My network has a firewall, and I would like to know which ports need to be opened.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Mar 2023 at 4:00
Edited: MathWorks Support Team on 14 Mar 2023 at 16:50
All ports listed here should be opened to inbound traffic from any machine unless otherwise stated. Outbound communication for cluster happens through ephemeral ports.
 

Table of Contents

  1. Cluster Machine Ports
  2. Client Machine Ports
  3. Admin Center
  4. Online Licensing
 

1. Cluster Machine Ports

These formulas should be calculated per machine and should reflect the number of each type of service running on that machine rather than across the entire cluster.
BASEPORT is set to 27350 by default in the mjs_def file found in: <MATLABROOT>/toolbox/parallel/bin/
nJ is the number of job managers running on the machine.
nW is the number of workers running on the machine.
 
NOTE: In R2019a and later, mdce_def was renamed to mjs_def.
R2018a+: 
BASEPORT to BASEPORT+6+nJ+4*nW
BASEPORT+1000 to BASEPORT+1000+2*nW (only to other cluster machines)
 
R2017a/b:
Port ranges in this version were simplified.
BASEPORT to BASEPORT+6+nJ+3*nW
BASEPORT+1000 to BASEPORT+1000+2*nW (only to other cluster machines)
 
R2015a - R2016b:
BASEPORT to BASEPORT+5+nJ+3*nW
BASEPORT+1000 to BASEPORT+1000+2*nW (only to other cluster machines)
Two additional required port ranges were introduced in these versions. The default value of these new port ranges are shown in brackets below:
JOBMANAGER_PEERSESSION_MIN_PORT to JOBMANAGER_PEERSESSION_MAX_PORT (14351 to 14383)
WORKER_PARALLELPOOL_MIN_PORT to WORKER_PARALLELPOOL_MAX_PORT (14384 to 14448)
To customize the jobmanager_peersession or worker_parallelpool ranges please follow the instructions in:
 
R2010b - R2014b:
BASEPORT to BASEPORT+5+nJ+3*nW
BASEPORT+1000 to BASEPORT+1000+2*nW (only to other cluster machines)
 

2. Client Machine Ports

These port ranges can be controlled using the function pctconfig in MATLAB on the client machine.
 
R2015a+:
No inbound port range needed.
 
R2009b - R2014b:
27370 to 27470
 
R2006b - R2009a:
27370 to 27371
 

3. Admin Center

TCP port 7 on the machine using Admin Center needs to be open for all connectivity tests to pass without warning. This port is not required for cluster setup or general cluster operation.
 

4. Online Licensing

TCP port 443 for https needs to be open for outbound communication from cluster machines if the cluster is set to use Online Licensing.
Additional note/update regarding R2019a:
  • mjs_def.bat is located in $MATLAB/R20XXx/toolbox/distcomp/bin for R2019a and earlier releases.
  • In R2019a and later, mdce_def was renamed to mjs_def.
  3 Comments

Sign in to comment.

More Answers (1)

Pierrot10
Pierrot10 on 20 Jul 2017
Hello Could you let me know how you installed MATLAB Distributed Computing Server on the nodes? On which OS did you install it?
Cheers and thanks

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!