search for: socketconnection

Displaying 20 results from an estimated 102 matches for "socketconnection".

2003 Feb 07
1
Bug in socketConnection (PR#2535)
Platform: Windows Version: 1.6.2 When first called, socketConnection gives an error. On subsequent calls it performs correctly. Thus the first call has the effect of "priming" the connection. Eg > socketConnection(port=50) Error in socketConnection(port = 50) : unable to open connection In addition: Warning message: localhost:50 cannot be opened >...
2018 Mar 09
2
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
BACKGROUND: While troubleshooting random, occasionally occurring, errors from parallel::makePSOCKcluster("localhost", port = 11000); Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, : cannot open the connection I had another look at parallel:::newPSOCKnode(), which is used internally to set up each background worker. It is designed to, first launch the background worker as: system('R --slave --no-...
2018 Mar 09
2
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
...e parallel:::.slaveRSOCK() attempt to connect multiple times before failing, e.g. makeSOCKmaster <- function(master, port, timeout, useXDR, maxTries = 10L, interval = 1.0) { port <- as.integer(port) for (i in seq_len(maxTries)) { con <- tryCatch({ socketConnection(master, port = port, blocking = TRUE, open = "a+b", timeout = timeout) }, error = identity) if (inherits(con, "connection")) break Sys.sleep(interval) } if (inherits(con, "error")) stop(c...
2019 Mar 18
2
SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
...makeCluster()'. First, let's make sure there are no other R processes running: $ ps aux | grep -E "exec[/]R" Then, lets create a PSOCK cluster for which connection will fail (because port 80 is reserved): $ Rscript -e 'parallel::makeCluster(1L, port=80)' Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, : cannot open the connection Calls: <Anonymous> ... makePSOCKcluster -> newPSOCKnode -> socketConnection In addition: Warning message: In socketConnection("localhost", port = port, server = TRUE, bl...
2018 Mar 10
1
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
...mes before failing, e.g. >> >> makeSOCKmaster <- function(master, port, timeout, useXDR, maxTries >> = 10L, interval = 1.0) { >> port <- as.integer(port) >> for (i in seq_len(maxTries)) { >> con <- tryCatch({ >> socketConnection(master, port = port, blocking = TRUE, >> open = "a+b", timeout = timeout) >> }, error = identity) >> if (inherits(con, "connection")) break >> Sys.sleep(interval) >> } >>...
2016 Jan 15
1
Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b", : cannot open the connection
...the following error message and R Session is getting hanged. cl<-makePSOCKcluster(c(rep("soumen at 10.10.2.32",1)),outfile='',homogeneous=FALSE,port=11001) soumen at 10.10.2.32's password: starting worker pid=2324 on soumen-HP-ProBook-440-G2:11001 at 12:11:59.349 Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b",? : ? cannot open the connection Calls: <Anonymous> ... doTryCatch -> recvData -> makeSOCKmaster -> socketConnection In addition: Warning message: In socketConnection(master, port = port, blocking = TRUE, open = "a+b&...
2018 Mar 09
0
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
I just noticed that parallel:::.slaveRSOCK() passes 'timeout' to socketConnection() as a character, i.e. there's a missing timeout <- as.integer(timeout), cf. port <- as.integer(port) and useXDR <- as.logical(value): > parallel:::.slaveRSOCK function () { makeSOCKmaster <- function(master, port, timeout, useXDR) { port <- as.integer(port)...
2018 Mar 09
0
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
...to connect > multiple times before failing, e.g. > > makeSOCKmaster <- function(master, port, timeout, useXDR, maxTries > = 10L, interval = 1.0) { > port <- as.integer(port) > for (i in seq_len(maxTries)) { > con <- tryCatch({ > socketConnection(master, port = port, blocking = TRUE, > open = "a+b", timeout = timeout) > }, error = identity) > if (inherits(con, "connection")) break > Sys.sleep(interval) > } > if (inherits(con, &q...
2004 May 27
0
blocking question with socketConnections
...to make a multi-part form request with binary data. I am running R 1.8.1 on Linux ReadHat. The sockectConnection is initialized with open="a+b" and blocking=TRUE. After writing the Post request using writeChar and writeBin and flushing the connection I use socketSelect to check if the socketConnection is availabe for reading. This call consistently takes 15 seconds or so (15.01 seconds; checked using system.time). After this the response is read using readChar no problem. However, when I perform the same operation using an HTML form the whole operation takes approximately one second. I get t...
2011 Nov 22
0
snow package, socketConnection error, SSH, in Windows 7 x64
...cygwin and set a password-less SSH Login. In R session after starting ssh service: > system("ssh 10.10.5.15 date") Tue Nov 22 16:22:36 AST 2011 But when I make connection: > con <- makeSOCKcluster(rep('10.10.5.15',2), port = 22, master = '10.10.5.15') Error in socketConnection(port = port, server = TRUE, blocking = TRUE, : cannot open the connection In addition: Warning message: In socketConnection(port = port, server = TRUE, blocking = TRUE, : port 22 cannot be opened Firewall is turned off. My R sesioninfo: R version 2.14.0 Patched (2006-00-00 r00000) Platfo...
2013 Jun 10
1
Sending Email with Attachment
...hmentObject <- mime_part(x= attachment,name= attachmentName) body <- "Email Body" bodywithAttachement <- list(body, attachmentObject) sendmail(from=from,to=to,subject=subject,msg= bodywithAttachement,control=mailControl) However it gives me following Error: Error: Error in socketConnection(host = server, port = port, blocking = TRUE) : cannot open the connection In addition: Warning message: In socketConnection(host = server, port = port, blocking = TRUE) : blu-m.hotmail.com:25 cannot be opened I have also tried the other library i.e. mail but it does not support attaching t...
2019 Mar 27
0
SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
The problem causing the stray worker processes when the master fails to open a server socket to listen to connections from workers is not related to timeout in socketConnection(), because socketConnection() will fail right away. It is caused by a bug in checking the setup timeout (PR 17391). Fixed in 76275. Best Tomas On 3/18/19 2:23 AM, Henrik Bengtsson wrote: > (Bcc: CRAN) > > This is a proposal helping CRAN and alike as well as individual > developers...
2008 May 08
1
problem with caretNWS on linux
Hi, I am using caretNWS on a RHEL x86_64 system and I am getting an error message that is nearly identical to the one occuring in http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/caretNWS-00check.txt Error in socketConnection(serverHost, port = port, open = "a+b", blocking = TRUE) : unable to open connection Calls: system.time ... .local -> tryCatch -> tryCatchList -> socketConnection In addition: Warning message: In socketConnection(serverHost, port = port, open = "a+b", blocking = TRUE...
2013 Oct 03
1
Problem with makePSOCKcluster R3.0.1
...on machines. I have a passwordless between machines and ssh is correct. In the R 2.15.1 release this function works correctly. Installing R 3.0.1 on my EC2 machines makePSOCKcluster does not produce the cluster. If I run the function with outfile="" option, I obtain this message Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b", : cannot open the connection Calls: <Anonymous> ... doTryCatch -> recvData -> makeSOCKmaster -> socketConnection In addition: Warning message: In socketConnection(master, port = port, blocking = TRUE, open = "a+b&q...
2009 May 18
2
readBin on binary non-blocking connections (Windows & Unix differences/bugs)
R-devel: I am encountering a consistency issue using socketConnection and readBin with *non-blocking* connections on Unix and Windows XP (no Vista to test). I am a bit confused by the behavior of *non-blocking* connections under Windows specifically. When calling readBin on a non-blocking connection when there is no data to read on the socket, the connection under...
2019 Jun 04
2
MacOS parallel::makeCluster fails
...5.3434fe0c5c6.pid"), silent = TRUE)' -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11867 OUT=/dev/null TIMEOUT=60 XDR=TRUE [local output] - Exit code of system() call: 0 [local output] Waiting for worker #1 on ?localhost? to connect back [local output] Detected a warning from socketConnection(): ?problem in listening on this socket? Killing worker process (PID 903) if still alive Worker (PID 903) was successfully killed: TRUE Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, : Failed to launch and connect to R worker on local machine ?local...
2012 Dec 19
1
problem with opening more than one SOCK cluster with package snow
...ore than one cluster on the same machine via different R instances started via submitting LSF jobs to a cluster. Does anyone have an idea how to solve this or where to start digging for solutions? The error messages are: library(snow) cl <- makeCluster(8, type = "SOCK") Error in socketConnection(port = port, server = TRUE, blocking = TRUE, : cannot open the connection Calls: run.call ... makeCluster -> makeSOCKcluster -> newSOCKnode -> socketConnection In addition: Warning message: In socketConnection(port = port, server = TRUE, blocking = TRUE, : port 10187 cannot be ope...
2009 Jul 27
1
Writing to a UDP server from R?
Hello, I have used socketConnection to connect to a TCP server. I havent figured out a way to do the same with a UDP server. i.e I have a server listening on 9000, communicating via UDP. I would like to , from R, send packets to this server, This does not work u <- socketConnection('localhost',9000) Error in socketConne...
2005 Feb 17
1
socket problems (maybe bugs?)
...eeded by a header line). When experimenting, i encountered some problems (with R-2.0.1 under different Linuxes (SuSE and Gentoo)). Since the default mode for socket connections is non-blocking, i first tried socketSelect() in order to see whether the socket is ready for reading: # Server: s <- socketConnection(port=2222, server=TRUE, open="w+b") writeLines("test", s) writeBin(1:10, s, size=4, endian="big") # Client, variation 1: s <- socketConnection(port=2222, server=FALSE, open="w+b") socketSelect(list(s)) readLines(s, n=1) # works, "test" is re...
2007 Aug 14
1
makeSOCKcluster
...he path of the script and the script name like so: script<-"/rootpath/home/cluster/me/R-2.5.1/library/snow/RSOCKnode.sh". This worked, and the next print statement following the system call in the snow file now prints to the screen. But again R hangs, this time at the line: con <- socketConnection(port = port, server=TRUE, blocking=TRUE, open="a+b"). Troubleshooting step2: Attempted manual socketConnection via R commands: > con<-socketConnection("ip.path.to.node1",port=22) > showConnections() description class mode text i...