bwlewis / rredis

R client for Redis
http://illposed.net/
93 stars 25 forks source link

Error setting TCP_NODELAY #35

Open r2evans opened 8 years ago

r2evans commented 8 years ago

On startup, I am consistently getting a fail on the first attempt to connect, but it works on the subsequent attempt(s):

library(rredis)
ref <- redisConnect(returnRef=TRUE)
# Error in .openConnection(host = host, port = port, nodelay = nodelay,  : 
#   Error setting TCP_NODELAY
ref <- redisConnect(returnRef=TRUE)

I get the error with or without returnRef, with non-default host/port, and with timeout specified or not. I've started R with --vanilla --no-site-file --no-init-file to ensure I'm not poisoning it somehow.

It does not fail with nodelay=FALSE.

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rredis_1.7.0

loaded via a namespace (and not attached):
[1] compiler_3.2.3 tools_3.2.3   
bwlewis commented 8 years ago

This was fixed in the dev version, not yet on cran. I really need to update that.

try

devtools::install_github("bwlewis/rredis")

I think that should work. I'll try to get the cran package updated...

On Feb 27, 2016 12:57 AM, "r2evans" notifications@github.com wrote:

On startup, I am consistently getting a fail on the first attempt to connect, but it works on the subsequent attempt(s):

library(rredis) ref <- redisConnect(returnRef=TRUE)

Error in .openConnection(host = host, port = port, nodelay = nodelay,

:

Error setting TCP_NODELAY

ref <- redisConnect(returnRef=TRUE)

I get the error with or without returnRef, with non-default host/port, and with timeout specified or not. I've started R with --vanilla --no-site-file --no-init-file to ensure I'm not poisoning it somehow.

sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 15.10

locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] rredis_1.7.0

loaded via a namespace (and not attached): [1] compiler_3.2.3 tools_3.2.3

— Reply to this email directly or view it on GitHub.

unoexperto commented 7 years ago

I have same problem but interestingly enough it fails only when I run from Rscript but works under Rstudio.

rmanak commented 6 years ago

same issue here!