[R] remoting ESS/R with tramp
Tom Roche
Tom_Roche at pobox.com
Fri Jan 13 01:42:21 CET 2012
Tom Roche Thu, 12 Jan 2012 11:56:25 -0500
>>> * I have access to the cluster [where I want to run R] configured
>>> [in my linux laptop's .ssh/config] such that I can `ssh t` from
>>> commandline.
Note also that I'm using keychain
http://www.cyberciti.biz/faq/ssh-passwordless-login-with-keychain-for-scripts/
such that no password/passphrase is required.
Rodney Sparapani Thu, 12 Jan 2012 12:09:18 -0600 (rearranged)
>> This may be no solace, but it just works for me out of the box.
Tom Roche Thu, 12 Jan 2012 16:27:00 -0500
> [That] validates my belief that [remoting ESS/R with tramp rather
> than ssh.el] *should* work. (And also that some ESS docs, e.g.,
> http://ess.r-project.org/Manual/ess.html#ESS-processes-on-Remote-Computers
> need updating. I mean, [tramp has] been part of GNU emacs since ...
> 21? 22?)
>> I just remotely tramp a file. Then, in that buffer do a M-x R
>> For me, that opens a remote R session; no ssh.el required.
> When you do `M-x R`, what prompt and default response do you get?
I'd very much like to know what works because ...
> I'm thinking I need to play with tramp method ...
... I get the same results with tramp method=ssh as with (the default)
tramp method=scpc:
+ Opening an R file on the cluster succeeds.
- Starting R from the resulting tramp buffer fails with either of two
messages in buffer=*Messages*
> Cannot read history file /scpc:t:/home/me/.Rhistory
> Cannot read history file /ssh:t:/home/me/.Rhistory
and the same/invariant message in buffer=*R*
*R*
> env: R: No such file or directory
>
> Process R exited abnormally with code 127 at Thu Jan 12 18:00:14 2012
(more on this @ end).
I also tried bypassing my .ssh/config alias, and explicitly opening
C-x C-f /scpc:me at fq.server.name:/home/me/onlyOrigDN2.r
but `M-x R` then fails with
*Messages*
> Cannot read history file /scpc:me at fq.server.name:/home/me/.Rhistory
Which gave me the brilliant idea to check whether the file
me at fq.server.name:/home/me/.Rhistory
existed--and it didn't !-) So I
* `C-x C-c` my local emacs
* ran `ssh t` in a gnome-terminal
* ran `R` on the cluster
* ran `q()` from the R session
* verified I had ~/.Rhistory
* restarted local emacs
* `C-x C-f /t:/home/me/onlyOrigDN2.r`
* `M-x R`
Opening the file still works, and starting R still fails, but now
somewhat differently: I get a loop of
*Messages*
> Opening connection for t using scpc... \
> Tramp: Opening connection for t using scpc...done
> Tramp: Encoding region using function `base64-encode-region'...done
> Tramp: Decoding region into remote file /scpc:t:/home/me/.Rhistory...done
> trying to (re)start process R for language S ...
> Type C-h m for help on ESS version 5.14
> Tramp: Encoding remote file /scpc:t:/home/me/.Rhistory...done
> Tramp: Decoding remote file /scpc:t:/home/me/.Rhistory with function base64-decode-region...
> Wrote /tmp/tramp.4087Mwl
> Tramp: Decoding remote file /scpc:t:/home/me/.Rhistory with function base64-decode-region...done
> Tramp: Inserting local temp file `/tmp/tramp.4087Mwl'...done
> Tramp: Opening connection for t using scpc...
at which point I get the same ESS prompt and default response in the
minibuffer (or I quit with `C-g`). Arrggghhhh!
So definitely ESS or tramp has some error-handling issues, but I'm
also guessing I might have a configuration problem, too. I note above
that I get
*R*
> env: R: No such file or directory
>
> Process R exited abnormally with code 127 at Thu Jan 12 18:00:14 2012
each time I try/fail to start R remotely. But
local:~ $ ssh t
...
remote:~ $ which R
/usr/local/R-2.14.0/bin/R
remote:~ $ $(which R) --version
R version 2.14.0 (2011-10-31)
...
remote:~ $ /usr/bin/env R --version
R version 2.14.0 (2011-10-31)
looks fine to me. I'm wondering, what might make tramp unable to start
R other than R being unavailable (which is plainly not the case)?
Permissions? but
remote:~ $ ls -alh $(which R)
-rwxr-xr-x 1 admin staff 8.6K Nov 23 16:06 /usr/local/R-2.14.0/bin/R
looks good to me.
Your assistance is appreciated, Tom Roche <Tom_Roche at pobox.com>
More information about the R-help
mailing list