Rstudio connect - timeout reach

Hi , want to make a Rstudio Connect connection with following command

connectUser(username = '', server = server)

where the server argument is the name of the server, which was added with the help of function addServer(...)

If I execute function connectUser with those arguments, i have following error:

Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [servername] Connection timed out after 10005 milliseconds
Timing stopped at: 0.004 0 10.01
Timing stopped at: 0.007 0.004 5.001

How can i solve this ? I also try

options(timeout = 1000000)

but it did not work.

Regards,
Tomas

Hi @tomasj7 ! Thanks so much for asking this question! Apologies for the delayed response!

This may be a question that is worth passing along to our support team (support@rstudio.com). If you do, please share the link to this community post so they have this background!

Are you trying to publish from RStudio Server to RStudio Connect? It sounds to me like wherever your R session is running does not have network access to the RStudio Connect host. Do you mind saying a little something about where your R code is running, what your architecture / networking looks like, etc.?

You can test this theory with something like:

httr::http_status(httr::GET("https://myserver.com"))
#> $category
#> [1] "Success"
#> 
#> $reason
#> [1] "OK"
#> 
#> $message
#> [1] "Success: (200) OK"
httr::content(httr::GET("https://myserver.com"))
#> {html_document}
#> <html lang="en">
#> [1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 ...
#> [2] <body>\n    <app-layout><standard-page><ui-view></ui-view></standard-page ...

Created on 2020-07-21 by the reprex package (v0.3.0)

Hi,

I have the same issue between RStudio Server (1.2.5033) and RStudio Connect (v1.8.2-10).
On RStudio Server

> httr::http_status(httr::GET("https://google.com"))
$category
[1] "Success"
$reason
[1] "OK"
$message
[1] "Success: (200) OK"

But for RStudio Connect

> httr::http_status(httr::GET("https://RSTUDIO_CONNECT_SERVER"))
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached: [RSTUDIO_CONNECT_SERVER] Connection timed out after 10001 milliseconds

rsconnect::addConnectServer was possible to do, but connectUser also return problem

> rsconnect::connectUser(account = 'myaccount', server = 'RSTUDIO_CONNECT_SERVER')
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached: [RSTUDIO_CONNECT_SERVER] Connection timed out after 10001 milliseconds
Timing stopped at: 0 0.012 10.01

And machines can ping each other.

But from local desktop version (RStudio IDE) everything working fine.

Thanks for any advice
Michal

This "timeout" issue here is canonically a network issue. In cloud environments like AWS, it typically means that the Security Group associated with the Connect instance is not letting traffic through on the port you are requesting (from the place you are requesting from - in this case RSP).

I would try taking a look at your networking security setup, what firewalls and such are present, and ensure that RStudio Server Pro can actually make requests to RStudio Connect.

Ok. Thanks for response.

I know that RStudio Connect used :3939 and RStudio Server :8787.

Is there some specific port or ports which should be open ?

Sorry for the delay here @michalslovik! I'm not sure why it didn't let me know that you had responded. Are you still experiencing trouble? If so, please open a support request by emailing support@rstudio.com !

Ultimately the ports you mention (if that is where the products are listening) should be open. You can test connectivity from the terminal on each server with netcat using something like:

nc -vz myconnecthost.com 3939
nc -vz myrstudiohost.com 8787

If this times out, it means that a connection to that host / port from the server you are currently on is not working for some reason or another. Security Groups are definitely the most common culprit.

1 Like