check_win_release || Connection timed out after - r

I'm interested to check if my package is compatible with the windows platform. The library was developed on debian system Platform: x86_64-pc-linux-gnu (64-bit). In order to check windows' comparability I run devtools::check_win_release() which leads me to errors with connection time out:
It first asks for email confirmation to which I confirm.
Error in curl::curl_fetch_memory(url, handle = h) :
Timeout was reached: [win-builder.r-project.org] Connection timed out after 10001 milliseconds
I spoke to the IT admin and they have set a firewall for security measures and forbid interaction via curl or any other utilities. I've proxy settings set as suggested by the IT-admin but again they are in vain.
Is there any way I can check windows build?
I've tried options(timeout = 4000000) but the error persists.
R 4.0 devtools_2.3.1 testthat_2.3.2
There is no build_win
I'm using http://r-pkgs.had.co.nz/release.html as my resource.
Edit: Sys.getenv("http_proxy") and Sys.getenv("https_proxy") print the proxy settings set in the bash environment variable.

Related

How to connect R Studio to Tableau?

I'm trying to connect R Studio to Tableau Desktop to do some data analysis work, but an error has occurred during connection saying: localhost:6311: Connection refused
I'm using MacOS version 10.13.6
Coding on R:
install.packages("Rserve")
library(Rserve)
Rserve()
Try adding the following parameter to your Rserve() line which will hard-code the port:
Rserve(port = 6311)
If that doesn't work, it is worth troubleshooting the port with the following command in terminal (telnet might need to be installed as it is not installed by default):
telnet localhost 6311
the return from the telnet command should be
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Rsrv0103QAP1
More information on the above here
If the command returns a failure, the problem is certainly outside of Tableau.
Some thoughts from there would be to edit the R config file to explicitly accept remote connections.

R studio Mac Proxy issue

I have downloaded and installed R (3.4.1)and R studio (1.0.153) on MAC OS ( El Captain). I am facing trouble setting up the proxy. I am trying to install some packages from CRAN.
I referred to https://support.rstudio.com/hc/en-us/articles/200488488-Configuring-R-to-Use-an-HTTP-or-HTTPS-Proxy
I was able to set up proxy and used properties
http_proxy=http://MYSERVER:MYPORT
http_proxy_user=user:passwd
I enabled options(internet.info = 0) option to get a trace of internet access from R Studio.
While the proxy server set up looks good in logs, its not able to get authentication.
Here are the logs:
Connected to MYSERVER port MYPORT (#0)
> GET http://cran.rstudio.com/src/contrib/PACKAGES.gz HTTP/1.1
Host: cran.rstudio.com
User-Agent: R (3.4.1 x86_64-apple-darwin15.6.0 x86_64 darwin15.6.0)
Accept: */*
Proxy-Connection: Keep-Alive
Pragma: no-cache
* The requested URL returned error: 407 Proxy Authentication Required
* Closing connection 0
Warning: unable to access index for repository http://cran.rstudio.com/src/contrib:
cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
(Please note: I have replaced the proxy server and port )
I tried changing the
http_proxy_user=ask
As suggested in one of the work around I read, but that also didn't work.
Could anyone suggest how to set up proxy authentication properly in R studio on Mac?
I have Eclipse installed on my local using the same proxy port and authentication and it is able to download stuff fine.
I am able to hit the url http://cran.rstudio.com/src/contrib/PACKAGES.gz directly in firefox.
I was finally able to make it work. The user id and password was accepted by adding them in the same property
http_proxy=http://username:password#proxyServer:port
This created another issue, my password contained # char, which is why the proxy url was messed up. I referred to another post on stacktrace which suggested to try urlencoding the "#" in the password to %40, With this change, it finally went through the proxy.
options(internet.info = 0) helped look through the detailed log which helped solve the issue.

How to make a client / server connection using Rserver and Windows Server 2008

I am searching for a robust solution to perform extensive computations on a remote server, dedicated to computational tasks. The server is on Windows 2008 R2 and has R x64 3.4.1 installed on it. I've searched for free solutions and am now focusing on the Rserver/RSclient packages solutions.
However, I can't connect any client (using RSclient) to the instanced server.
This is how I'm proceeding at the moment from the server side:
library(Rserve)
run.Rserve(config.file = "Rserv.conf")
using the following Rserv.conf file:
port 6311
remote enable
plaintext enable
control enable
r-control enable
The server is now intanciated using the Rsession (It's a bit ugly, but will change that latter on):
running Rserve in this R session (pid=...), 1 server(s)
Now, i'm trying to connect using a remote computer (Client-side) using:
library(RSclient)
c = RS.connect(host = "...")
The connection then seems to succeed, checking for c:
> c
Rserve QAP1 connection 0x000000000fbe9f50 (socket 764, queue length 0)
The error occurs when i try to eval anything, for example:
> RS.server.eval(c,"0<1")
Error in RS.server.eval(c, "0<1") : command failed with status code 0x4e: no control line present (control commands disabled or server shutdown)
I've read the available guides but still failed in connecting. What is wrong? It seems to be related to control lines but I authorized them in the config file.
for me the problem was solved by initiating the Rserve instance with the command:
R CMD Rserve --RS-port 9000 --RS-enable-remote --RS-enable-control
instead of starting it in the R environment (library(Rserve), run.Rserve(config.file = "Rserv.conf")). You may try this on Windows as well.
Refer https://github.com/s-u/Rserve/wiki/rserve.conf.
port 6311
remote enable -> it should be remote true
plaintext enable
control enable
r-control enable
Likewise refer the link and try with actual values

Error during cross platform communication between Node.js and R using Rserve on AWS. Error:connect ETIMEDOUT

I want to pass my R script from my node.js application to an Amazon EC2 instance running Ubuntu and Rserve; which would then execute and evaluate the R script and return the processed output back to my node.js application.
I found two reliable options:
1) RIO - (Used this)
2) rserve-client
Before proceeding to connect with Rserve, I made sure it was initiated and running.
ubuntu#ip-172-31-37-254:~$ sudo netstat -nltp|grep Rserve
tcp 0 0 0.0.0.0:6311 0.0.0.0:* LISTEN 5978/Rserve
Enabled the remote connection parameter for Rserve and got it started successfully.
library(Rserve)
Rserve(args="--RS-enable-remote")
Starting Rserve:
/usr/lib/R/bin/R CMD /usr/local/lib/R/site-library/Rserve/libs//Rserve --RS-enable-remote
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
Rserv started in daemon mode.
1) Tried a test script using RIO package from my Node.js application
var rio = require("rio");
console.log("Connecting..");
rio.e({
host : "ec2-52-40-113-159.us-west-2.compute.amazonaws.com",
port : "6311",
command: "pi / 2 * 2",
callback: function (err, res) {
if (!err) {
console.log(res);
} else {
console.log("Rserve call failed. " + err);
}
}
// path :"/usr/local/lib/R/site-library"
});
Note: As stated here, I have the host parameter updated accordingly.
Error while running the app:
node app.js
Connecting..
Rserve call failed. Error: connect ETIMEDOUT 52.40.113.159:6311
I'm not sure, why is it that I am unable to connect. Is there any step that I am missing? Would also appreciate if there is any alternate package or way of accomplishing this task. Thanks.
The issue in your use case is proper ports not open in your Security groups.
You will have to open port 6311 and 5978 in the EC2 security group and the issue will go.
Instead of making port 6311 and 5878 open to world you can add below rules to EC2 security group.
Type: Custom TCP Rule, Protocol: TCP, Port Range: 6311, Source: Node.js Server IP
Type: Custom TCP Rule, Protocol: TCP, Port Range: 5978, Source: Node.js Server IP

R host requests machine to get a license message

When I run my R script I get this message:
20141118161918 INFO: 'snx1app011:40001' host requests to '10.61.24.59' machine to get a license
Have you see that and do you know what it means?
Thank you,
Marc

Resources