MATLAB: When starting a MATLAB Production Server instance, why to do I receive “Server process exited with return code: 7”

MATLAB Production Server

Why do I receive the following error message when trying to start MATLB Production Server instance using "mps-start"?
 Server process exited with return code: 7'
 

Best Answer

In cases where there are more than one instance running on the same machine you will need to specify a new port in the main_config file located in the instance folder
C:\MPS\mps_instance\config\
The default port is 9910. You will need to verify if this port is already in use. Once the change has been made you may try starting the instance again.
If the port was previously used by MATLAB Production Server, but is not free, then we kill the process listening to this port as shown:
Windows:
1. Search the task manager for mps_master_app.exe, select it and kill it.
 Linux:
PID of the Server process and kill it gracefully as show:
1. Execute the following command on the terminal:
netstat -aon | grep <Port>
2. You can then gracefully kill this process using the 'kill' command as shown:
kill -15 <PID>