MATLAB: Does the MPS Dashboard installation process output a ‘Command failed… pg_ctl’ error message on a Windows machine

MATLAB Production Server

When running the .\setup.bat install for the MPS Dashboard installation, why do I get the following error:
server error: Command failed: C:\Windows\system32\cmd.exe /s /c ""C:\Program Files\MATLAB\MATLAB Production Server\R2017a\dashboard\PostgreSQL\bin\pg_ctl" -w -D "C:\mps\dashboard\data" init"

Best Answer

This error can occur if Visual C++ Redistributable Packages for Visual Studio 2013 is not installed properly.  To verify, run the following command in the Command Prompt:
 
"C:\Program Files\MATLAB\MATLAB Production Server\R2017a\dashboard\PostgreSQL\bin\pg_ctl" -w -D "<MPSDASHBOARDINSTALLATIONDIR>\dashboard\data" init
If the following error message is outputted, then Visual C++ Redistributable Packages for Visual Studio may not be installed:
MSCVR120.DLL is missing
To resolve this error, you must install Visual C++ Redistributable Packages for Visual Studio 2013. After installing the package, you can attempt the MPS Dashboard installation again.  A successful install of the Dashboard will result in the following output:
cleaning workspace...
cleaned workspace
creating workspace...
created workspace
initializing database...
initiated database at <MPSDASHBOARDINSTALLATIONDIR>\data
starting database server...
started database server
stopping database server...
stopped database server
Successfully installed MATLAB Production Server Dashboard.
If you are still unable to set up MPS dashboard and the output from the command above is empty and does not mention the missing DLL, then try the following steps:
  1. Add $MPS_ROOT\bin\win64 to your system PATH, where $MPS_ROOT is the directory where you have MATLAB Production Server installed. The $MPS_ROOT\bin\win64 folder contains DLLs that MATLAB Production Server uses.
  2. Also make sure any postgresql process running in the host is terminated and that the dashboard setup process is executed in admin mode.