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

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

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 to one or more of the following: 
  • Antivirus Software
  • VPN
  • Proxy
  • Firewall
  • Date and Time

Antivirus Software

Update your antivirus software (AV): Ensure that your AV is up to date with the latest virus definitions and software updates. Sometimes outdated AV can cause false positives. This will most likely require speaking with your internal IT.
Alternatively, you can try temporarily disabling your Antivirus. 

VPN

Some Virtual Private Networks (VPN) will interfere with the installer working correctly. If you have one, try disabling it and then running the installer again. Disabling it will vary depending on what VPN you are using. Refer to your VPN's documentation if you are unsure how to do this.

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. Please visit the link below for ports and domain information.
Which ports and addresses do MathWorks products and MathWorks Online Services use?https://www.mathworks.com/matlabcentral/answers/97265

Date and Time

If the date and time of your computer is wrong, you may encounter a "Connection Error" after clicking next on the destination screen during installation. To fix this issue, change the date and time on your computer to the correct date and time.
 

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 articles below:
For information on performing an offline installation of an update or support package:

9 Comments

the "setx" should be run at a Windows command prompt.
I see a site pointing out that Windows 10 has a bug in it's GUI interface for setting environment variables, with the bug fixed in the Anniversary Edition. This would not have affected setx though. https://www.winhelponline.com/blog/set-user-environment-variable-setx-windows-10/
_____________________________________________________________
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
_____________________________________________________________
Firewalls generally use static configuration based on IP. You can still enter a FQDN at first but the firewall will resolve once when declaring the rule at the first time and will not refresh the rule afterwards.
For instance, last year in septembre we allowed these three IPs on TCP/443:
login.mathworks.com is an alias for login.wsroute.mathworks.com.
login.wsroute.mathworks.com has address 52.211.100.21
login.wsroute.mathworks.com has address 34.249.255.69
services.mathworks.com is an alias for services.mathworks.com.edgekey.net.
services.mathworks.com.edgekey.net is an alias for e1597.b.akamaiedge.net.
e1597.b.akamaiedge.net has address 23.38.74.164
Today (november, 2019) we have to update firewall rules to match these ones:
login.mathworks.com is an alias for login.wsroute.mathworks.com.
login.wsroute.mathworks.com has address 54.246.157.59
login.wsroute.mathworks.com has address 52.19.137.137
ervices.mathworks.com is an alias for services.mathworks.com.edgekey.net.
services.mathworks.com.edgekey.net is an alias for e1597.b.akamaiedge.net.
e1597.b.akamaiedge.net has address 104.80.20.48
So our wish is that MatLab's hosts will remain on the same IPs as long as possible...
Are the support packages for R2025a currently offline? I am trying on two different computers that never had issues before, but I can't download any support package like Matlab support package for USB webcams or Support Package for GenICam Interface etc. I tried reinstallation, disabling windows defender, adding the java-thing system environment variable, but nothing works. On the same computer, installing the same support package for 2024b works.
@William Thielicke I do not know, but it would not surprise me if offline support has not been configured for R2025a pre-release yet. It has only been a small number of MATLAB releases since support packages became available for pre-release versions.
@Walter Roberson, thanks, but what surprises me, is that it already worked a few days ago with 2025a.

Sign in to comment.

More Answers (7)

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.

1 Comment

Which drive are you asking about, Rojitha Goonesekere ?
Try looking in ~/Downloads/MathWorks/R2019b/ perhaps? That is where the installer tosses the installation program and archives .

Sign in to comment.

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

2 Comments

I just had the same problem for R2016a -- first authentication attempt said that it could not connect to Mathworks, second authentication attempt worked fine.
I have have since had this difficulty a number of times: the first authentication attempt for registering fails, but the second one succeeds.

Sign in to comment.

Products

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!