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

90 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 29 Mar 2024 at 0:00
Edited: MathWorks Support Team on 29 Mar 2024 at 20:16
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. Hostname resolution
  2. Cluster Machine Ports
  3. Client Machine Ports
  4. Admin Center
  5. Online Licensing
 
 

1. Hostname resolution

If you are trying to connect to your cluster with a hostname, then this hostname must be able to resolve to the correct IP address. If it cannot resolve to the correct IP address or any IP address at all, consider making a connection to cluster with an IP address rather than a hostname (R2023a and later only).
To test if the IP address can be resolved, try pinging the hostname.
To make the MATLAB client connect to the cluster via IP address instead of hostname, modify the cluster profile appropriately.
 

2. 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)
 

3. 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
 

4. 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.
 

5. Online Licensing

If you plan to use Online Licensing, TCP port 443 for HTTPS needs to be open for outbound communication from all cluster machines.
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.

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!