title: can't open sockets for parallel cluster
body: <p>I am trying to use the <code>parallel</code> package, and found that <code>makeCluster</code> fails to complete. I've traced the hang to the following line in <code>newPSOCKnode</code> : </p>
  
  <pre><code>con &lt;- socketConnection("localhost", port = port, server = TRUE, 
      blocking = TRUE, open = "a+b", timeout = timeout)
  </code></pre>
  
  <p>That command stalls (granted the default timeout is a large value).  My suspicion is this is due to some "overzealous IT rules" laid down on our work computers, but would welcome any suggestions as to how to trace (and fix) the source of the problem.  This is Windows7-64, "Enterprise", R 3.0.1 .  </p>
  
  <p>More info:  inside debugging session, I set <code>timeout &lt; - 10</code>, but it still hangs -- as though <code>socketConnection</code> is getting trapped somewhere that it can't even check the timeout value.</p>
  
  <p>Here's my dump at the same point as Richie Cotton's data:</p>
  
  <pre><code>Browse[3]&gt; ls.str()
  arg :  chr "parallel:::.slaveRSOCK()"
  cmd :  chr "\"C:/Users/carl.witthoft/Documents/R/R-3.0.1/bin/x64/Rscript\" -e \"parallel:::.slaveRSOCK()\" MASTER=localhost PORT=11017 OUT="| __truncated__
  env :  chr "MASTER=localhost PORT=11017 OUT=/dev/null TIMEOUT=2592000 METHODS=TRUE XDR=TRUE"
  machine :  chr "localhost"
  manual :  logi FALSE
  master :  chr "localhost"
  methods :  logi TRUE
  options : &lt;environment: 0x000000000ccac6a0&gt; 
  outfile :  chr "/dev/null"
  port :  int 11017
  rank :  int 1
  renice :  int NA
  rscript :  chr "\"C:/Users/carl.witthoft/Documents/R/R-3.0.1/bin/x64/Rscript\""
  timeout :  num 2592000
  useXDR :  logi TRUE
  </code></pre>
  
  <p>So aside from a different port number, I think everything matches up.</p>
  
  <p>Next trick:  I opened a shell and ran <code>netsh advfirewall firewall add rule name="Open Port 11017" dir=in action=allow protocol=TCP localport=11017</code>  and got an "OK" response.
  I ran <code>netstat -a -n</code>  and found the following line:  </p>
  
  <p><code>TCP    0.0.0.0:11017          0.0.0.0:0              LISTENING</code></p>
  
  <p>But running <code>makePSOCKcluster</code>  still hangs at the same place. </p>
  
  <p>NEXT:
  I tried running <code>R</code> from the command line (via cygwin bash), and the error message I get is <code>Error in loadhistory(file) : no history mechanism available
  Execution halted</code> , after which -C returns me to the R-prompt.</p>