Error 5201 even after performing solutions available
104 views (last 30 days)
Show older comments
After installing MATLAB (and a couple of toolboxes) in a new pc using my academic licence, the error 5201 appeared.
I went to the guide directed by the 'Help' option of the error message and performed all the recommended steps: Uninstalled/Reinstalled MathWorks Service Host, checked and allowed MATLAB and the MathWorks Service Host on my security software (Windows Defender) and verified if my Windows version was up to date (at the end of each step I always restarted my computer) and even tried reinstalling MATLAB. Noteworthy, I tried all these steps both in my workplace and at home to test if there was a connection problem.
Despite all these approaches, the error still pops up.
I could use MATLAB without problems in my old pc, but due to a malfunction I can no longer run it there so it was uninstalled.
Is there any possibility that an old file there or the fact that I had a previous installation is hindering the transition to the new device?
How can I solve this?
Thank you in advance!
4 Comments
Manikanta Aditya
on 3 Jul 2024
Try to use MATLAB Online, and see it that also gives same issue once.
Accepted Answer
Rushikesh
on 3 Sep 2024
Edited: Rushikesh
on 9 Oct 2024
Error 5201 is most likely associated with the MathWorksServiceHost and MATLABConnector processes, which are essential for MATLAB licensing and startup.
1. Sometimes, the PC login name can also cause such errors. Ensure that your PC login name consists only of single-byte characters, i.e., single-byte alphanumeric characters (a-z, A-Z, 0-9) and underscores (_), especially if you are using MathWorksServiceHost version lower than 2024.9.
2. Ensure that the MathWorksServiceHost (MSH) and MATLAB Connector versions you are using are up to date. Although you mentioned that you already tried reinstalling MSH, MATLAB might install a compatible MSH that is not the latest version. You can check the installed version at:
“%LOCALAPPDATA%\MathWorks\ServiceHost\LatestInstall.info”
To perform a clean installation of the latest ServiceHost and MATLAB Connector (by terminating the MSH and connector processes, followed by uninstalling them), please refer to the following MATLAB answer: https://www.mathworks.com/matlabcentral/answers/1815365-how-do-i-uninstall-and-reinstall-the-mathworks-service-host
3. In case of MathWorksServiceHost processes is not starting up correctly or has permission issues then follow below approach
1) Open the Task Manager and end any MATLABs
2) Next, end any MATLABConnector processes
3) Finally, end any MathWorksServiceHost processes
4) Ensure none of the above processes are running
5) Remove the entire folder "%LOCALAPPDATA%\MathWorks\ServiceHost\"
6) Remove the entire folder "%LOCALAPPDATA%\MathWorks\MATLABConnector\" (Note: This is a hidden folder) and then restart MATLAB.
4. However, if the issue persists, I recommend contacting MATLAB customer support and sending them detailed logs generated by 'ServiceHost' to get a better solution. You can contact MathWorks customer support by referring to the following link:
To generate accurate logs, Follow above solution no. 3 and continue with below steps
1) Remove the file "%LOCALAPPDATA%\Temp\mlctr_<user>.log"
2) Now, go through the workflow which triggers the issue (i.e. start MATLAB)
3) Send all the logs generated in "%LOCALAPPDATA%\MathWorks\ServiceHost\logs"
Let me know if it helps.
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!