I'm not an R expert by any means, but I am required to support our end users and we're seeing an intermittent issue:
Cannot Connect to R
RStudio can't establish a connection to R.
I've installed R (4.3.2 (64-bit), but also happens with R 4.3.1) and then R Studio Desktop 2023.12.1+402 (and 2023.06.2+561), in that order.
I've blown away the RStudio directories from both appdata\local and appdata\Roaming and the issue persists. Usually a restart of the machine will fix it.
rdesktop.log:
2024-02-09T06:18:44.042Z ERROR Failed to load http://127.0.0.1:22597: Error: ERR_CONNECTION_TIMED_OUT (-118) loading 'http://127.0.0.1:22597/'
2024-02-09T06:18:54.540Z ERROR Exceeded timeout
2024-02-09T06:19:18.751Z ERROR Failed to load http://127.0.0.1:22597: Error: ERR_CONNECTION_TIMED_OUT (-118) loading 'http://127.0.0.1:22597/'
2024-02-09T06:19:32.097Z ERROR Main window closed unexpectedly
rsession-USERID.log:
2024-02-09T06:18:21.372143Z [rsession-USERID] ERROR Unable to retrieve user home path. HRESULT: 0x80070003; LOGGED FROM: class rstudio::core::FilePath __cdecl rstudio::core::system::userSettingsPath(const class rstudio::core::FilePath &,const class std::basic_string<char,struct std::char_traits,class std::allocator > &,bool) src/cpp/core/system/Win32System.cpp:341
The user's home drive does exist. There are no denies in the Firewall.
I ran a RStudio Diagnostics Report. Results below:
RStudio Diagnostics Report
WARNING: This report may contain sensitive security information and / or
personally identifiable information. Please audit the below and redact any
sensitive information before submitting your diagnostics report.
Generated: Fri Feb 9 17:44:18 2024
RStudio Version
2023.12.1+402
Session Information
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_Australia.utf8 LC_CTYPE=English_Australia.utf8
[3] LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Australia.utf8
time zone: Australia/Sydney
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] testthat_3.1.5 devtools_2.4.5 usethis_2.1.6
loaded via a namespace (and not attached):
[1] miniUI_0.1.1.1 compiler_4.3.2 crayon_1.5.2 brio_1.1.3
[5] promises_1.2.0.1 Rcpp_1.0.9 stringr_1.4.1 callr_3.7.2
[9] later_1.3.0 fastmap_1.1.0 mime_0.12 R6_2.5.1
[13] htmlwidgets_1.6.2 profvis_0.3.7 shiny_1.7.4 rlang_1.1.1
[17] cachem_1.0.6 stringi_1.7.8 httpuv_1.6.6 fs_1.5.2
[21] pkgload_1.3.0 memoise_2.0.1 cli_3.4.1 magrittr_2.0.3
[25] ps_1.7.1 digest_0.6.29 processx_3.7.0 rstudioapi_0.14
[29] xtable_1.8-4 remotes_2.4.2 lifecycle_1.0.3 prettyunits_1.1.1
[33] vctrs_0.6.3 glue_1.6.2 urlchecker_1.0.1 sessioninfo_1.2.2
[37] pkgbuild_1.3.1 purrr_1.0.0 tools_4.3.2 ellipsis_0.3.2
[41] htmltools_0.5.4
System Information
sysname : Windows
release : 10 x64
version : build 19044
nodename : COMPUTERNAME
machine : x86-64
login : USERID
user : USERID
effective_user : USERID
Platform Information
OS.type : windows
file.sep : /
dynlib.ext : .dll
GUI : Rgui
endian : little
pkgType : win.binary
path.sep : ;
r_arch : x64
Environment Variables
ALLUSERSPROFILE : C:\ProgramData
APPDATA : C:\Users\USERID\AppData\Roaming
CLICOLOR_FORCE : 1
CommonProgramFiles : C:\Program Files\Common Files
CommonProgramFiles(x86) : C:\Program Files (x86)\Common Files
CommonProgramW6432 : C:\Program Files\Common Files
COMPUTERNAME : COMPUTERNAME
ComSpec : C:\Windows\system32\cmd.exe
CUDA_PATH : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA_PATH_V10_1 : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CURL_CA_BUNDLE : C:/PROGRA~1/R/etc/curl-ca-bundle.crt
DEVOPS_TOKEN : *** redacted ***
DriverData : C:\Windows\System32\Drivers\DriverData
FPS_BROWSER_APP_PROFILE_STRING : Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING : Default
GFORTRAN_STDERR_UNIT : -1
GFORTRAN_STDOUT_UNIT : -1
GIT_ASKPASS : rpostback-askpass
HOME : \PATHTHATDOESEXIST\USERID
HOMEDRIVE : H:
HOMEPATH :
HOMESHARE : \PATHTHATDOESEXIST\USERID
LOCALAPPDATA : C:\Users\USERID\AppData\Local
LOGONSERVER : \SERVERNAME
MSYS2_ENV_CONV_EXCL : R_ARCH
NUMBER_OF_PROCESSORS : 8
OneDrive : C:\Users\USERID\OneDrive - ORGANIZATION
OneDriveCommercial : C:\Users\USERID\OneDrive - ORGANIZATION
ORIGINAL_XDG_CURRENT_DESKTOP : undefined
OS : Windows_NT
PATH : c:\rtools43\x86_64-w64-mingw32.static.posix\bin;c:\rtools43\usr\bin;C:\Program Files\R\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\SASHome\x86\Secure\ccme4;C:\Program Files\SASHome\Secure\ccme4;C:\Program Files\MiKTeX\miktex\bin\x64;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\Users\USERID\AppData\Local\Microsoft\WindowsApps;C:\ProgramData\Anaconda3;C:\Program Files\RStudio\resources\app\bin\quarto\bin;C:\Program Files\RStudio\resources\app\bin\postback
PATHEXT : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE : AMD64
PROCESSOR_IDENTIFIER : Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
PROCESSOR_LEVEL : 6
PROCESSOR_REVISION : 8c01
ProgramData : C:\ProgramData
ProgramFiles : C:\Program Files
ProgramFiles(x86) : C:\Program Files (x86)
ProgramW6432 : C:\Program Files
PROMPT : $P$G
PSModulePath : C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC : C:\Users\Public
PYTHONIOENCODING : utf-8
R_ARCH : /x64
R_CLI_HAS_HYPERLINK_IDE_HELP : true
R_CLI_HAS_HYPERLINK_IDE_RUN : true
R_CLI_HAS_HYPERLINK_IDE_VIGNETTE : true
R_COMPILED_BY : gcc 12.3.0
R_DOC_DIR : C:/PROGRA~1/R/doc
R_HOME : C:/PROGRA~1/R
R_INCLUDE_DIR : C:/PROGRA~1/R/include
R_LIBS_SITE : C:/PROGRA~1/R/site-library
R_LIBS_USER : C:\Users\USERID\AppData\Local/R/win-library/4.3
R_RTOOLS43_PATH : c:/rtools43/x86_64-w64-mingw32.static.posix/bin;c:/rtools43/usr/bin
R_RUNTIME : ucrt
R_SHARE_DIR : C:/PROGRA~1/R/share
R_USER : //\PATHTHATDOESEXIST/USERID
RMARKDOWN_MATHJAX_PATH : C:/Program Files/RStudio/resources/app/resources/mathjax-27
RS_LOCAL_PEER : \.\pipe\35727-rsession
RS_LOG_LEVEL : WARN
RS_RPOSTBACK_PATH : C:/Program Files/RStudio/resources/app/bin/rpostback.exe
RS_SHARED_SECRET : *** redacted ***
RSTUDIO : 1
RSTUDIO_CLI_HYPERLINKS : true
RSTUDIO_CONSOLE_COLOR : 256
RSTUDIO_CONSOLE_WIDTH : 80
RSTUDIO_DESKTOP_EXE : C:\Program Files\RStudio\rstudio.exe
RSTUDIO_MSYS_SSH : C:/Program Files/RStudio/resources/app/bin/msys-ssh-1000-18
RSTUDIO_PANDOC : C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools
RSTUDIO_PROGRAM_MODE : desktop
RSTUDIO_SESSION_PID : 18768
RSTUDIO_SESSION_PORT : 35727
RSTUDIO_USER_IDENTITY : USERID
RSTUDIO_WINUTILS : C:/Program Files/RStudio/resources/app/bin/winutils
SESSIONNAME : Console
SSH_ASKPASS : rpostback-askpass
SystemDrive : C:
SystemRoot : C:\Windows
TEMP : C:\Temp
TERM : xterm-256color
TMP : C:\Temp
TMPDIR : C:\ProgramData\Anaconda3\TEMP
UATDATA : C:\Windows\CCM\UATData{GUID}
USERDNSDOMAIN : *** redacted ***
USERDOMAIN : company
USERDOMAIN_ROAMINGPROFILE : company
USERNAME : *** redacted ***
USERPROFILE : C:\Users\USERID
windir : C:\Windows
R Version
platform : x86_64-w64-mingw32
arch : x86_64
os : mingw32
crt : ucrt
system : x86_64, mingw32
status :
major : 4
minor : 3.2
year : 2023
month : 10
day : 31
svn rev : 85441
language : R
version.string : R version 4.3.2 (2023-10-31 ucrt)
nickname : Eye Holes
R Home
C:/PROGRA~1/R
R Search Path
.GlobalEnv
tools:rstudio
package:stats
package:graphics
package:grDevices
package:utils
package:datasets
package:testthat
package:devtools
package:usethis
package:methods
Autoloads
package:base
R Library Paths
C:/Program Files/R/library
Loaded Packages
base : C:/PROGRA~1/R/library/base
brio : C:/Program Files/R/library/brio
cachem : C:/Program Files/R/library/cachem
callr : C:/Program Files/R/library/callr
cli : C:/Program Files/R/library/cli
compiler : C:/Program Files/R/library/compiler
crayon : C:/Program Files/R/library/crayon
datasets : C:/Program Files/R/library/datasets
devtools : C:/Program Files/R/library/devtools
digest : C:/Program Files/R/library/digest
ellipsis : C:/Program Files/R/library/ellipsis
fastmap : C:/Program Files/R/library/fastmap
fs : C:/Program Files/R/library/fs
glue : C:/Program Files/R/library/glue
graphics : C:/Program Files/R/library/graphics
grDevices : C:/Program Files/R/library/grDevices
htmltools : C:/Program Files/R/library/htmltools
htmlwidgets : C:/Program Files/R/library/htmlwidgets
httpuv : C:/Program Files/R/library/httpuv
later : C:/Program Files/R/library/later
lifecycle : C:/Program Files/R/library/lifecycle
magrittr : C:/Program Files/R/library/magrittr
memoise : C:/Program Files/R/library/memoise
methods : C:/Program Files/R/library/methods
mime : C:/Program Files/R/library/mime
miniUI : C:/Program Files/R/library/miniUI
pkgbuild : C:/Program Files/R/library/pkgbuild
pkgload : C:/Program Files/R/library/pkgload
prettyunits : C:/Program Files/R/library/prettyunits
processx : C:/Program Files/R/library/processx
profvis : C:/Program Files/R/library/profvis
promises : C:/Program Files/R/library/promises
ps : C:/Program Files/R/library/ps
purrr : C:/Program Files/R/library/purrr
R6 : C:/Program Files/R/library/R6
Rcpp : C:/Program Files/R/library/Rcpp
remotes : C:/Program Files/R/library/remotes
rlang : C:/Program Files/R/library/rlang
rstudioapi : C:/Program Files/R/library/rstudioapi
sessioninfo : C:/Program Files/R/library/sessioninfo
shiny : C:/Program Files/R/library/shiny
stats : C:/Program Files/R/library/stats
stringi : C:/Program Files/R/library/stringi
stringr : C:/Program Files/R/library/stringr
testthat : C:/Program Files/R/library/testthat
tools : C:/Program Files/R/library/tools
urlchecker : C:/Program Files/R/library/urlchecker
usethis : C:/Program Files/R/library/usethis
utils : C:/Program Files/R/library/utils
vctrs : C:/Program Files/R/library/vctrs
xtable : C:/Program Files/R/library/xtable
Installed Packages
Package LibPath Version
1 abind C:/Program Files/R/library 1.4-5
2 absmapsdata C:/Program Files/R/library 1.3.3
3 alfred C:/Program Files/R/library 0.2.0
4 antiword C:/Program Files/R/library 1.3.1
5 anytime C:/Program Files/R/library 0.3.9
6 companybrand C:/Program Files/R/library 0.3.1
7 arrow C:/Program Files/R/library 12.0.1
8 arsenal C:/Program Files/R/library 3.6.3
9 askgpt C:/Program Files/R/library 0.0.2
10 askpass C:/Program Files/R/library 1.1
11 assertthat C:/Program Files/R/library 0.2.1
12 AzureAuth C:/Program Files/R/library 1.3.3
13 AzureGraph C:/Program Files/R/library 1.3.2
14 backports C:/Program Files/R/library 1.4.1
15 base C:/Program Files/R/library 4.3.2
16 base64enc C:/Program Files/R/library 0.1-3
17 basictabler C:/Program Files/R/library 1.0.2
18 bbmle C:/Program Files/R/library 1.0.25
19 bdsmatrix C:/Program Files/R/library 1.3-6
20 beeswarm C:/Program Files/R/library 0.4.0
21 bench C:/Program Files/R/library 1.1.2
22 BH C:/Program Files/R/library 1.78.0-0
23 bigD C:/Program Files/R/library 0.2.0
24 BiocManager C:/Program Files/R/library 1.30.22
25 bit C:/Program Files/R/library 4.0.4
26 bit64 C:/Program Files/R/library 4.0.5
27 bitops C:/Program Files/R/library 1.0-7
28 blob C:/Program Files/R/library 1.2.3
29 bookdown C:/Program Files/R/library 0.34
30 boot C:/Program Files/R/library 1.3-28.1
31 brew C:/Program Files/R/library 1.0-8
32 brio C:/Program Files/R/library 1.1.3
33 broom C:/Program Files/R/library 1.0.1
34 BSDA C:/Program Files/R/library 1.2.1
35 bslib C:/Program Files/R/library 0.4.0
36 butcher C:/Program Files/R/library 0.3.0
37 cachem C:/Program Files/R/library 1.0.6
38 Cairo C:/Program Files/R/library 1.6-0
39 callr C:/Program Files/R/library 3.7.2
40 caret C:/Program Files/R/library 6.0-93
41 caTools C:/Program Files/R/library 1.18.2
42 cellranger C:/Program Files/R/library 1.1.0
43 checkmate C:/Program Files/R/library 2.1.0
44 chron C:/Program Files/R/library 2.3-58
[snip]