Mathematica Internet Connectivity

Introduction

Mathematica provides important functionality through accessing the internet. Most Mathematica functions that provide computable data operate by loading data over the internet. Some functions require real-time access to the internet; others update a local data repository by accessing the internet when required. Mathematica also requires internet access when you explicitly use Import to read from a URL, or when you use web services. The Mathematica documentation system also supports automatic updating via the internet.

When you call a data function like FinancialData, Mathematica gets the data it needs from the internet. When you click a link to a documentation notebook or call a data function like CountryData, Mathematica knows whether a newer version of the information is available on a Wolfram Research Paclet Server, and if so it will download and install the update automatically. In the case of smaller paclets like documentation notebooks, this is often so fast that you will not even notice it happening.

Mathematica acts like a web browser when it accesses the internet, so if you can browse the web from your computer, you should be able to use Mathematica's internet connectivity features, although in some cases additional configuration may be required.

Internet Connectivity Dialog

The Internet Connectivity dialog, accessed from the Help menu, allows you to configure a number of settings related to the paclet system, and Mathematica's use of the internet in general.

The Allow Mathematica to Access the Internet checkbox can be turned off to prevent Mathematica from even attempting to use the internet. You will not be able to get load-on-demand updates to documentation, and some data collection functions will not operate.

The Test Internet Connectivity button is useful to see if Mathematica is properly configured for internet use. After clicking the button, you should see a dialog within a few seconds (perhaps slightly longer if it fails) reporting success or failure. If the test succeeds, then Mathematica's internet functionality should work properly. If it fails, consult "Troubleshooting Connectivity Problems".

The Proxy Settings section allows you to specify a proxy server if necessary. In many cases, Mathematica is able to inherit the proxy settings configured globally for your system or browser. This is the default setting, and most users will leave it as is. If you know that you do not need to go through a proxy server to access the internet, you can click the Direct connection to the Internet checkbox. You can also manually configure proxy settings if necessary. Contact your system administrator for the values to use. Most users will only need to set the HTTP proxy.

The Automatically check for documentation updates checkbox and the Automatically check for data updates checkbox can be turned off to disable load-on-demand updates to documentation and data files. This will not interfere with the operation of Mathematica, except that you will not receive updates to the documentation or data paclets as they become available.

The Update Local Indices from the Wolfram Research Server button will cause Mathematica to read information from the Wolfram Research Paclet Server that describes the versions of the paclets that are available. Mathematica uses this information to decide whether an update is available to a given resource when you access that resource. Mathematica reads this information on a weekly basis automatically, but you can force an update using this button. You might want to do this to be sure you will get the absolute latest data from data collection functions like CountryData, ChemicalData, AstronomicalData, etc.

Troubleshooting Connectivity Problems

If you get error messages or dialogs that report internet connectivity problems while running Mathematica, the first thing to do is try the Test Internet Connectivity button in the Internet Connectivity dialog, accessible from the Help menu. If the test succeeds, then Mathematica is correctly configured for general internet use, and the problem probably lies elsewhere (such as trying to access an incorrect URL). If the test fails, try the following steps:

1.  Test network connectivity by seeing if other programs on your computer can access the internet. For example, launch a web browser and see if it works. If it fails, then the network might be unavailable, or you might have connectivity problems beyond what can be configured in Mathematica.

2.  Check proxy settings, as in "Proxy Settings".

3.  Check firewall settings, as in "Firewall Settings".

Proxy Settings

Incorrect proxy settings are a common cause of problems with internet connectivity. Many users on a company network cannot directly access the internet, but instead must pass through a proxy server, which acts like a gateway to the internet. By default, Mathematica will attempt to use systemwide proxy settings, if your operating system has such settings. For example, on Windows, Mathematica will use the proxy settings configured for Internet Explorer. On Mac OS X, proxy settings are configured in the Network Preferences panel.

Mathematica's proxy settings are configured in the Internet Connectivity dialog. The default setting, described in "Internet Connectivity Dialog", is Use proxy settings from my system or browser. If this does not work for you, try the Direct connection to the Internet choice. If that does not work, then contact your system administrator for proxy settings to enter into the text fields. If you can successfully surf the web with a web browser, you can find its proxy settings dialog and read the values it is using. Many users will only need to set the HTTP proxy.

If your system or browser is configured to get proxy settings from a configuration script, then Mathematica will not be able to use these settings, and you will have to manually configure its proxy settings.

If Mathematica is configured to Use proxy settings from your system or browser, and your browser functions but Mathematica cannot connect, see if your system proxy settings have a Use same proxy server for all protocols checkbox and try unchecking it. Mathematica will attempt to use a SOCKS proxy if one is set, and if your HTTP proxy does not also handle SOCKS traffic, Use same proxy server for all protocols is not a correct setting for your system. An incorrectly configured SOCKS proxy can cause very long timeouts, so if the Test Network Connectivity button fails after a minutes-long delay, an incorrect SOCKS proxy configuration is likely the problem. Mathematica does not require a SOCKS proxy, so the SOCKS Host field can be left blank, but if you supply a value, either manually or via the system setting Use the same proxy server for all protocols, it must be correct.

Firewall Settings

Because Mathematica acts like a web browser when it accesses the internet, most company firewalls will not interfere with it. Some users, however, have so-called "personal" firewalls on their machines (ZoneAlarm, Norton, etc., or the one built into Microsoft Windows). If configured with strict settings, these firewalls might interfere with Mathematica's attempts to use the internet.

These types of firewalls will generally display a dialog box warning you that a program is trying to use the internet and allow you to accept or reject it. If you see such a dialog, it might report that the program is the Mathematica kernel or the Java Runtime Environment that is bundled in the Mathematica layout. Configure the firewall to always allow such requests.

Further Information

If the information in this document is not sufficient to help you solve connectivity problems, consult the troubleshooting guide at http://support.wolfram.com/technotes/networkconnectivityissues.html

New to Mathematica? Find your learning path »
Have a question? Ask support »