Why do I get a connection error when installing or activating MATLAB or other MathWorks products?

13.364 views (last 30 days)
I get an error that I cannot connect to MathWorks when running the MathWorks installer or the activation client; however, I can access the website. Why can't the MathWorks Installer or activation client connect to the MathWorks?
Connection Error
The application could not connect to MathWorks.
For more information on resolving this issue, see this Support Article.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 28 Apr 2022 at 4:00
Edited: MathWorks Support Team on 28 Apr 2022 at 12:24
Computer or network security software is preventing the MathWorks Installer and/or Activation Client from connecting to the MathWorks servers. This is known as a connection issue due one or more of the following: 
  • Antivirus Software
  • Proxy
  • Firewall

Antivirus Software

To temporarily disable your Antivirus on Windows:
  1. Locate the Antivirus protection program icon on the Windows system tray.
  2. Right-click the icon and select Disable, Stop, etc. to temporarily disable the program. In some cases, you may need to open the program and disable it using the program's menus.
 To temporarily disable your Antivirus on a Mac:
  1. Locate the Antivirus icon found on your Mac menu bar.
  2. Click Shut down or disable temporarily until installation and activation have completed.
To temporarily disable your Antivirus on a Linux:
  1. Locate the Antivirus protection program icon on the Linux system tray.
  2. Click Shut down or disable temporarily until installation and activation have completed.

Proxy

The MathWorks installer, activation client and update installer will try to automatically inherit your user proxy settings on Windows and MacOS.
To disable your Proxy in Internet Explorer:
  1. Click the Tools button and then select Internet Options.
  2. Click the Connections tab and then select LAN settings.
  3. Uncheck the check box for Use a proxy server for your LAN.
To disable your Proxy in Chrome:
  1. Open the Customize and Control Google Chrome menu by clicking on the three-dots icon at the top right of Google Chrome, select Settings on the right, find Advanced and finally select open proxy settings.
  2. Select the LAN Settings button.
  3. Deselect the checkbox for Use a proxy server for your LAN.
To disable your Proxy in Safari:
  1. Go to Menu and click on Preferences from the drop-down menu.
  2. Select the Advanced tab and then click on the Change Settings button.
  3. Deselect the checkbox for Use a proxy server for your LAN.
To disable your Proxy in Firefox:
  1. Click the Tools button and select Options.
  2. Go to the Advanced panel and select the Network tab.
  3. Click on Settings in the Connection Section and select No Proxy.
You will need to contact your IT Help Desk to troubleshoot this issue if you don't know your proxy settings or the error persists after entering your proxy settings. 

Firewall

You will need to contact your IT Help Desk if your organization is running a network firewall to configure it to bypass blocked connections to the MathWorks servers.The MathWorks installer needs to contact MathWorks servers on the following ports and addresses:
  • login.mathworks.com
  • services.mathworks.com
  • TCP ports 80 and 443
Your firewall needs to bypass blocked connections for both addresses over both ports. These servers do not use a Static IP Address and will resolve to a Dynamic IP Address. This means that users will not be able to white-list MathWorks servers via IP Address and will have to use the domain name. 

Offline procedures

To bypass connection errors when installing or activating MATLAB, you may perform an offline installation or activation. For instructions on performing either, please refer to the relevant support article before:
For information on performing an offline installation of an update or support package:

Contact US

If the MathWorks installer is still unable to connect after troubleshooting, and you would like further assistance with resolving the connection error, submit a service request.  Please include the troubleshooting steps you took to resolve the connection issue and include your installation log file. See this related article if you require assistance locating your log file:
  40 Comments

Sign in to comment.

More Answers (73)

Sean
Sean on 30 Jul 2014
When I received this error, it was not due to proxy settings or firewall settings. Rather, when I downloaded the installer, the download location was on a remote drive (a windows remote profile DFS location). I copied the setup file to the local drive, and it ran fine.
  18 Comments

Sign in to comment.


Brett Hansell
Brett Hansell on 8 Oct 2019
  1. Under System Variables, select New.
  2. Set the first variable name "JAVA_TOOL_OPTIONS" with the value of "-Djava.net.preferIPv4Stack=true" (enter these without the quotation marks)
  3. select New again.
  4. Set the second variable name "JAVA_OPTIONS" with the value of "-Djava.net.preferIPv4Stack=true" (enter these without the quotation marks) and click on OK
  5. Click OK again on the previous screen and try the installer again.
  14 Comments

Sign in to comment.


Brian Zarling
Brian Zarling on 16 Feb 2015
I turned off my firewall and I still can't connect to Mathworks.
  6 Comments
Daniel Torres
Daniel Torres on 26 Aug 2020
I was getting installation errors left and right. I did an internet speed test and saw I was pulling only 10MB. I relocated my wireless dongle, retested, 150MB. Tried again - installed successfully.
Seems the installer is persnickity with your download speeds.

Sign in to comment.


khalid Houhou
khalid Houhou on 28 Feb 2018
I had this issue and it was not related to any network or connection. It was caused by a Malware I had in my PC called relevantknowledge. I uninstall it and it worked.
  10 Comments

Sign in to comment.


Gregg Casey
Gregg Casey on 29 Dec 2017
Had the same problem on my Mac and I have never had a problem like this on a Mac since I have used them. (Probably more than 8 years.) My laptop did not have the firewall turned on at all during all attempts. So this is probably just badly written software from Mathworks. What worked for me is to use my hotspot. That is all I changed - connect to my Karma hotspot and click "Next" again. Done. Note that I first did the same after connecting to my iPhone as a hotspot and that did not work. (Just clicked "next" and got the same error message.) However, that could have been that my phone was having a connection issue.
Mathworks- please look into this issue and fix it. The software should not require special proxy settings.
  4 Comments
Sam Kovnar
Sam Kovnar on 10 Mar 2022
I had pretty much the same issue. Went through all the previous solutions, nothing worked. I was on a 5G network, so I switched to a different one and it worked fine. No idea why this fixed it, but I'm just happy it worked. It wasn't an internet connectivity thing - if anything, the second network I tried was a little bit slower than the previous one.

Sign in to comment.


Chris Håkansson
Chris Håkansson on 23 Feb 2015
I had the same problem and followed all instructions above about filling in proxy-server information and deactivating the firewall etc. but nothing worked. Turned out all I needed to do was uncheck the box which indicates to use a proxy server. It is as mentioned in other links found in Control Panel/Internet Options/Connections/Lan Settings.
  4 Comments

Sign in to comment.


Yehya Jebbaoui
Yehya Jebbaoui on 28 Sep 2017
Turn off the Wifi of the institution you are in, then turn on Mobile hotspot on your phone to share the mobile connection (if you have 3G or 4G). You will pass the first steps and it will start downloading. When it starts downloading, switch to the wifi. It worked for me.
  6 Comments

Sign in to comment.


Caitlyn Hampel
Caitlyn Hampel on 24 May 2015
I had this problem as well, but I found that it was because my internet connection was too slow. So it only worked when I used a faster connection. Beware that the downloads during installation are rather large files, including the toolbox add-ons. Hope this information can be of help to others.
  3 Comments

Sign in to comment.


Jon
Jon on 16 Dec 2014
On a Mac (running 10.10 [Yosemite]) I still needed to temporarily disable the Firewall (under System Preferences > Security & Privacy) in order to complete activation.

Donald Niman
Donald Niman on 23 Feb 2015
This is what I did to successfully install Matlab (Home Use) on my Windows 7 x64 SP1 system. Note that I do not know which one of the following things helped to make things work; I just did all of them. Also note that I am not using a proxy server, if you are, this will probably not help you.
1. Turned off internet router and then turned it back on.
2. Restarted the PC in Safe Mode.
3. If applicable to you: The installation file was on hard drive volume D:\ and I moved it to C:\
4. From control panel->administrative tools->Services, I right-clicked "Windows Firewall" and selected "Stop".
5. I ran the Matlab installation file from c:\.
6. When the installation screen came up, I did not click on the button at the top right of the dialog. Instead, I clicked the "next" button at the bottom. (Of course, I am not using a proxy server.)
7. A dialog appears to enter your login credentials: do that and the installation will continue.
8. The installation will eventually complete and then you can activate it by following the on-screen directions.
9. I restarted the system normally and verified that Matlab was working.
(Hopefully, I did not leave anything out.)
  4 Comments

Sign in to comment.


Anna Smirnova
Anna Smirnova on 1 Jul 2018
Error : unable to connect to host. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Windows 7 64-bit. What am I doing wrong?

Matthias Finsterbusch
Matthias Finsterbusch on 2 Jul 2018
I am trying to install Matlab 2018b on a Win10 64bit System, getting the following error:
"Error : unable to connect to host. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
Any instructions how to handle this problem? Thanks in advance.

Jan
Jan on 14 Mar 2019
Create the two environment variables
  • "JAVA_TOOL_OPTIONS" with the value "-Djava.net.preferIPv4Stack=true"
  • "JAVA_OPTIONS" with the value "-Djava.net.preferIPv4Stack=true"
Run the installer. Afterwards the variables can be removed.
  3 Comments
Ani Padma
Ani Padma on 11 Jul 2020

Thanks a lot Jan, I tried all other suggested solutions with no success...I was even considering upgrading my laptop to a new one thinking it might be a hardware issue.However, this environment variables solution worked for me...Phew!!

Sign in to comment.


Jiawei Meng
Jiawei Meng on 15 May 2020
Guys, I just tried 16 times....Yes, I counted it and now it works. So don't give up....
However, I don't whether it is because my internet connection is bad or not? Because I literally changed nothing....

Dewi Mar'a
Dewi Mar'a on 20 Nov 2018
I am dealing with the same problem. After almost a week I tried to install matlab more than hundred times, then I got no solution at all. My windows firewall was off, no proxy setting, no anti virus installed, even no matlab installed yet.
I am getting deperate with this problem because my deadline project comes closer, and I wasted the time too much to deal with this problem.
finally I end up with the last solution left, I tried to uninstall my windows, and try to install matlab again. BAAAAMMM....it works. do anything to get out of this stuck step. if it ends with great result, why not ? haha
  1 Comment
lin hv
lin hv on 16 Aug 2019
I feel so sorry about that. I am still through this annoying problem, yet I have to spend my time on those matter more.

Sign in to comment.


ismail tepedag
ismail tepedag on 14 Jan 2019
Hey guys, I read everything and closed antivirus , firewall etc...
Then it did not work.
I tried repeatedly some 10 times then it worked miracleously. ?!
As a result, try try try...

Ceren Yurdakul
Ceren Yurdakul on 3 Jan 2021
I had the connection error. I literally tried every solution that people suggested above for days and non of them worked for me. I finally solved it like this:
I connected to the celluar data from my phone instead of WiFi. After using my phone's internet I chose my destination file and clicked next, it started downloading. Then I changed back to WiFi to avoid wasting my phone's internet and it continued downloading anyway.
That's how I fixed my connection error. I hope it works for yu too.

Christopher Silva
Christopher Silva on 12 Apr 2021
I tried absolutely all the solutions that were up but nothing worked for me (I have macOS Catalina 10.15.7). However, what apparently worked for me was very simple. All you have to do is go to "System Preferences", then go to the logo "Java" (if you don’t have Java, download it here: https://www.java.com/en/download/). After that, a configuration window will open, then you go to "General", then "Network Settings" and change it to "Direct Connection".
Pd: make sure you update Java before this.
Pd2: if like me, you tried all (literally all) the solutions in the above entries and nothing worked, and this solution either did or did not serve you because it was already configured with "Direct Connection", I think you should contact mathworks support.

Walter Roberson
Walter Roberson on 17 Apr 2021
Data point for MacOS Catalina:
I have not had difficulty downloading or authenticating to Mathworks until just now. I was installing R2017b onto MacOS Catalina; the download worked, but when I went to register the license, it gave me an error message (that linked to this topic.)
I looked in MacOS security settings, and reviewed everything, but did not find anything relevant. I did happen to notice that my Kensington Trackball manager was blocked from accessing the network, so I authorized that, but I really doubt that made any difference.
I went back to try the authentication again, and this time it worked without problem.
I don't think authorizing the trackball was at all relevant; I think it was just the trying again that made the difference.
  1 Comment
Walter Roberson
Walter Roberson on 25 Apr 2021
I just had the same problem for R2016a -- first authentication attempt said that it could not connect to Mathworks, second authentication attempt worked fine.

Sign in to comment.


jynik
jynik on 30 Sep 2021
Edited: jynik on 30 Sep 2021
I have created a workaround for this issue that is more approprate for fellow Linux users of older MATLAB releases. (I have up to R2017a.)
As noted in my earlier post, I believe this issue (at least one cause of it as of today) is an incompatibility in the TLS version/cipher suites supported in the Java environment bundled in older installers, versus the those required by the CDN servers MathWorks is using for downloads. However, the way I circumvented TLS failures to investigate this is not an appropriate methodology for others to use, as it inherently suppresses very important security verification failues that would occur if someone were performing a MitM attack.
Instead, following scipt leverages the OpenJDK 8 Java already installed on an Ubuntu 20.04.2 LTS system. If my assment of the problem is indeed correct, then the idea is that this already includes the neccessary TLS >= 1.2 cipher suite support in order to make the connection to esd.mathworks.com.
The workaround procedure is as follows:
  • Install openjdk-8-jre on your system. On Ubuntu 20.04.2 LTS this can be done via: sudo apt install openjdk-8-jre
  • Note: OpenJDK >= 11 will not work due to java.xml.bind deprection
  • Start the MATLAB installer via: ./install -v
  • Close the installer now that it has unpacked files.
  • Make note of the JRE_LOC path that is printed, as this where installer files have been unpacked.
  • Edit the provided script to update items marked "CHANGEME" appropriately.
  • Run the script, which should launch the MATLAB installer using the system's Java installation.
  • With any luck, your "Conntection failed" error is gone.
  • You presumably now have multiple Java installations on your machine. Be aware of that, should it then become a root cause of a completely different issue. ;)
The script is pasted below and availble as a GitHub gist.
Please use at your own discretion -- it has undergone no QA beyond the ever unreliable "works for me" test. :)
And importantly, please review the script thoroughly before running it. I'm just some random stranger on the Internet, after all.
Best of luck, fellow MATLAB adventurers.
#!/bin/bash
#
# Attempt to run MATLAB installer using system Java installation, rather than
# that bundled inside the installer, in an attempt to work around the
# activation/download connection error:
#
# https://www.mathworks.com/matlabcentral/answers/92634-why-do-i-get-a-connection-error-when-installing-or-activating-matlab-or-another-mathworks-product#answer_797409
#
# Tested on Ubuntu 20.04.2 LTS with openjdk-8-jre:
# openjdk version "1.8.0_292"
# OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10)
# OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
#
# Note: OpenJDK >= 11 will not work due to java.xml.bind deprecation.
# See: https://stackoverflow.com/a/43574427
#
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# CHANGE ME - Remove these two lines
echo "Please review this script and update items as needed."
exit 1
# CHANGE ME
# Directory containing install script and other installer files
INSTALLER_DIR="${HOME}/path_to/matlab"
# CHANGE ME
# The NNNN value in shown in the mathworks_NNNN portion of JRE_LOC
# when you run `install -v`
PID="6124"
# CHANGE ME
SYSTEM_JAVA="/usr/lib/jvm/java-8-openjdk-amd64/bin/java"
#-------------- The remainder should, in theory, work as-is. ---------------