[R-sig-hpc] snow, socket cluster: problem with path to rscript

luke at stat.uiowa.edu luke at stat.uiowa.edu
Wed Apr 15 14:26:31 CEST 2009


On Wed, 15 Apr 2009, Matthieu Stigler wrote:

> Steve Weston a écrit :
>> On Tue, Apr 14, 2009 at 5:29 AM, Matthieu Stigler
>> <matthieu.stigler at gmail.com> wrote:
>>
>> 
>>> So it is now working for the local computer with. However, when trying to
>>> use the external computer, it seems to be working but nothing happens 
>>> after
>>> he asked for the last password...
>>> 
>> 
>> This tells you is that "something went wrong".  The basic strategy in this 
>> case
>> is to use the "outfile" option to hopefully capture an error message.  You 
>> might
>> need to set outfile differently for different slaves, particularly if
>> you're starting
>> more than one on the same machine, but I suggest just starting one slave
>> on 210 to avoid the issue.  So do something like:
>>
>> 
>>> host210 <- list(host = "mat at 192.100.100.210", rscript = 
>>> "/usr/bin/Rscript",
>>> 
>> +                       outfile="/tmp/log.txt")
>> 
>>> cl2 <- makeCluster(list(host210), type = "SOCK")
>>> 
>>
>> 
> Ok, thanks for pointing out this methid.
>
> I tried it and got following error message. This does not seem not be 
> computer specific (tried to do it to other host 213, and from other host 213 
> to 212, always same error message):
>
> starting worker for ubuntu:10187 
> Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b") 
> : 
> unable to open connection
>
> Calls: local ... slaveLoop -> recvData -> makeSOCKmaster -> socketConnection
>
> In addition: Warning message:
>
> In socketConnection(master, port = port, blocking = TRUE, open = "a+b") :
>
> ubuntu:10187 cannot be opened
>
> Execution halted
>
>
> Is it related to ssh or snow? I did not find any reference to that prob 
> googling for it...

It is an issue with your ability to make a socket connection to the
master. Most likely the master computer has a firewall that is
blocking connections to the port snow uses.  Try turning the firewall
off or at least enabling the port in the error message.

A simple test is to do

     socketConnection(port = 10187, server = TRUE)

in an R session on the master and

     telnet ubuntu 10187

in a shell on your worker machine (assumign your master is called
ubuntu) (or you can use R and

     socketConnection("ubuntu", port = 10187)

in an R session on the worker).

luke

>
> Thanks a lot for your help!!
>> If it hangs, go to another terminal, ssh to 192.100.100.210, and look at
>> the contents of /tmp/log.txt, and hopefully that will provide a clue to
>> the problem.
>> 
>> Another approach is to use the "manual" option.  That will print the
>> command that you should use to manually start each of the slaves.
>> You just ssh to that machine from another terminal, and cut and paste
>> the printed command to start the slave.  If you set "outfile" to an empty
>> string, then output messages will go right to that terminal.
>> 
>> --
>> Steve Weston
>> REvolution Computing
>> One Century Tower | 265 Church Street, Suite 1006
>> New Haven, CT  06510
>> P: 203-777-7442 x266 | www.revolution-computing.com
>> 
>
>

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      luke at stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu


More information about the R-sig-hpc mailing list