[R-SIG-Mac] Question Regarding R, Mac OS X, and Proxy Servers:

Stranathan, Dan dds at stowers-institute.org
Thu May 1 17:47:57 CEST 2008


Hello everyone

I have a R question for you. I am new to the wide world of all things R and I am not a scientist or a programmer per se. I'm a Systems Administrator trying to troubleshoot a network issue with R - Specifically related to proxy servers.

Background:
My Institute has a Linus-based Squid proxy server that brokers all http traffic through it. We have 2 versions of the proxy server. One proxy server (used for 99% of our staff) requires the user to manually type a password when prompted. Not all applications are "smart" enough to understand a proxy can since it requires the 2-way process of password negotiation, etc. Our 2nd Proxy server is basically a "wide open door" to the Internet. Only certain managers and the IT dept are allowed to use this proxy. It doesn't require a password at all.

As you may know, the main way to configure proxy settings in OS X is via the System Preferences (the Network Pane has a tab for proxy settings). You can also configure these settings from the Terminal via the networksetup and systemsetup commands too. Both ways achieve the same result. You can also configure your shell session to be "proxy-aware" using the UNIX http_proxy variable in your .bash_profile (I describe this more below)

So far, both Mac OS X 10.4 (Tiger) and 10.5 (Leopard) have worked quite well with our proxy servers. In fact, all "proxy aware" applications such as Safari, iTunes, WebDAV, etc work great (As long as you know your password of course). Even the curl and wget  commands work from the Terminal with once the proper configurations have been made.

My R Problem:
The GUI version of R 2.7.0 (and possibly earlier versions?) does not work with our proxy server correctly. I have tried both of our proxy servers (secure and open) and neither one will allow R to route out to the Internet. Other apps like Safari, curl, etc have no problem getting to the R update site (cran.r-project.org).

Certain command line tools will not honor the Mac OS X global proxy settings. When this happens I usually just add an environmental proxy setting with the "export http_proxy=<my proxy server>" to my .bash_profile, etc and I can get around this problem quite easily. I stumbled across this because the R command line tools (in Terminal and X11) were not honoring the Mac OS X global proxy settings at first, so I had to implement the setting I just described. It works great now. But... I still cant get the R GUI app to peacefully co-exist with my proxy servers, regardless of how I configure the Mac OS X GUI system proxy or the shell environment. Here is the error I get in the R GUI window:

Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : unable to connect to 'cran.r-project.org' on port 80.
>



If you can offer any suggestions I would greatly appreciate them!


Thanks!

-Dan



More information about the R-SIG-Mac mailing list