ERROR blpapi_platformtransporttcp.cpp:671 - Connection issue in R - r

Currently following instructions from rblpapi-intro.Rmd (version date: 2015-08-13) I am wondering why:
library(Rblpapi)
blpConnect()
returns:
17FEB2016_14:27:17.296 7432:8884 ERROR
blpapi_platformtransporttcp.cpp:671 blpapi.session.transporttcp.{3}.
<localhost:8194> Connection failed
17FEB2016_14:27:17.296 7432:8884 WARN blpapi_platformcontroller.cpp:371
blpapi.session.platformcontroller.{3} Platform: 0 failed 1 consecutive
connect attempts, stopped trying to reconnect.
Error: Failed to start session.
given the below default values:
ip: 127.0.0.1
port: 8194
Factually, there is nothing wrong with those values as I've used them in Matlab using con=blp(port,ip2,time) and the connection succeeds perfectly.
EDIT:
The below function has finally worked! a bit weird, as I override the default ip value from blpConnect() by the same value.
blpConnect(host = getOption("blpHost", "127.0.0.1"),
port = getOption("blpPort", 8194L), default = TRUE)
Thus it looks like blpConnect() did'nt pointed to the default ip and port values for some reasons.

Related

Why curl package in R is not connecting to the internet?

EDIT: Despite having confirmed that this error is ISP-related. I still do not understand why system curl works fine. (error in curl (R) occurs in any site)
EDIT: Currently after a ISP visit. It works fine with cable, but wifi functioning is limited to a ISP router. Error persists with wifi with a personal router or the ISP modem.
Could it be something related to closed ports? (Which would be closed only in the problematic ISP)
I am getting a normal result in system console for:
curl -I https://www.gnu.org/
However the curl package in R gives: (error using the problematic ISP only)
con <- curl("https://gnu.org")
readLines(con)
# Error in readLines(con) :
# Timeout was reached: [gnu.org] Resolving timed out after 10000 milliseconds
The RCurl package works fine, but what I am trying to use requires curl (R)

How to resolve "Error: could not receive data from server" - database connection in r?

I am running into
Error: could not receive data from server: Software caused connection abort (0x00002745/10053)
upon trying to connect to a postgres database using the DBI package in R. Note that i am in a work environment, so subject to a corporate firewall. Can that explain the error or is there something else that could be happening?
Here is the code I'm using
# Connect to trayaway dev
con <- DBI::dbConnect(
RPostgres::Postgres(),
host = host, port = 5432, dbname = "postgres",
user = user, password = password
)
error below:
Error: could not receive data from server: Software caused connection abort (0x00002745/10053)
solution was found- i tried the same code using wiFi and the code works - when hardwired, connection string fails to connect to database - so this is a corporate firewall issue - thank you,

Got Connect Failed error when request to tf serving server,and it's all good in windows

I make a server and request successfully in windows,then I put them to the linux which is the develop machine of company.
And I Got Connect Failed error when I run the clien.py. I have changed the host IP to localhost,0.0.0.0,127.0.0.1 and the IP of develop machine,but it doesn't work.
And I tried the docker inspect command,but the IPAddress is empty like "".
And I changed the port to 8500,8501,4321 and still got the error.
I tried make proxy to the company,the request returns a Name resolution failure error.So I think maybe the cause is the net of company?
Any answer would be very appreciate!
The Error Message:
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Connect Failed"
debug_error_string = "{"created":"#1551677753.381330483","description":"Failed to create subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":2721,"referenced_errors":[{"created":"#1551677753.381328206","description":"Pick Cancelled","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":241,"referenced_errors":[{"created":"#1551677753.381303114","description":"Connect Failed","file":"src/core/ext/filters/client_channel/subchannel.cc","file_line":689,"grpc_status":14,"referenced_errors":[{"created":"#1551677753.381278484","description":"Failed to connect to remote host: OS Error","errno":111,"file":"src/core/lib/iomgr/tcp_client_posix.cc","file_line":205,"os_error":"Connection refused","syscall":"connect","target_address":"ipv4:0.0.0.0:8501"}]}]}]}"

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.

websocket connection does not work

I seem to be in struggle with the websockets in R. I wanted to download the streaming data from the BitCoin exchange MtGox directly to R, but R cannot establish the connection.
The websocket specs are defined as:
Host: websocket.mtgox.com or socketio.mtgox.com
Port: 80 or 443 ( ssl )
Namespace: /mtgox (Including beginning slash)
url for more details: https://en.bitcoin.it/wiki/MtGox/API/Streaming
and my code is:
require(websockets)
con = websocket("https://socketio.mtgox.com/mtgox",port=443)
and I always end up with an error:
> con = websocket("https://socketio.mtgox.com/mtgox",port=443)
Error in websocket("https://socketio.mtgox.com/mtgox", port = 443) :
Connection error
Does anyone have an idea what is wrong?
Many thanks.
I've looked at the source code and manual here - https://github.com/rstudio/R-Websockets
The R Websocket library is out of date and not compliant with the WebSocket protocol as it stands.
So you'd need to fix the library or find an alternate one. Fixing the library isn't that hard depending on your ability. I managed to do it here -
https://github.com/zeenogee/R-Websockets
My one is (lazily) hard-coded to MtGox - use at own risk! You'd need to remove the current WebSocket library and install this one. Don't forget Your code is only doing the basic connection. There are a couple more steps to see actual data -
set_callback("receive", function(DATA,WS,HEADER) cat(rawToChar(DATA)), con)
service (con)

Resources