Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rstudio error starting Ubuntu 22.04 #13421

Open
benoitnabholz opened this issue Jul 26, 2023 · 17 comments
Open

Rstudio error starting Ubuntu 22.04 #13421

benoitnabholz opened this issue Jul 26, 2023 · 17 comments
Labels
bug startup Problems with starting up, installation, etc.

Comments

@benoitnabholz
Copy link

R Session Startup Failure Report

RStudio Version

RStudio 2023.06.1+524 "Mountain Hydrangea " (547dcf8, 2023-07-07) for Ubuntu Jammy

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.06.1+524 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36

Error message

[No error available]

Process Output

The R session exited with code 1.

Error output:

[No errors emitted]

Standard output:

[No output emitted]

Logs

/home/benoitnabholz/.local/share/rstudio/log/rsession-benoitnabholz.log

2023-07-26T08:29:36.943515Z [rsession-benoitnabholz] WARNING The tcp http listener initialized without signature validation: --verify-signatures option missing; LOGGED FROM: void rstudio::session::{anonymous}::initTcpHttpConnectionListener(const string&, const string&, rstudio::session::Options&, const string&, const string&) src/cpp/session/http/SessionPosixHttpConnectionListener.cpp:76
2023-07-26T08:29:36.944105Z [rsession-benoitnabholz] ERROR system error 2 (No such file or directory) [path: ]; OCCURRED AT rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) src/cpp/r/session/RDiscovery.cpp:62; LOGGED FROM: int main(int, char* const*) src/cpp/session/SessionMain.cpp:2474
2023-07-26T08:29:36.944105Z [rsession-benoitnabholz] ERROR system error 2 (No such file or directory) [path: ]; OCCURRED AT rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) src/cpp/r/session/RDiscovery.cpp:62; LOGGED FROM: int main(int, char* const*) src/cpp/session/SessionMain.cpp:2474

@benoitnabholz benoitnabholz added bug new New incoming issues, ready for initial review. labels Jul 26, 2023
@benoitnabholz
Copy link
Author

I didn't find any information regarding my problem.

Thank-you for your help.
Benoit

@ronblum
Copy link
Contributor

ronblum commented Aug 2, 2023

@benoitnabholz Thank you for raising this!

@sharon-wang Would you by chance have any leads, based on the logs provided?

@ronblum ronblum added startup Problems with starting up, installation, etc. and removed new New incoming issues, ready for initial review. labels Aug 2, 2023
@sharon-wang
Copy link
Member

This looks similar to the logs in #12963 (comment). The resolution proposed there is to ensure that desktop.ini is readable, but I'm not certain that's the same issue here.

The error message ERROR system error 2 (No such file or directory) [path: ]; OCCURRED AT rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) src/cpp/r/session/RDiscovery.cpp:62 seems to imply that R_HOME could not be found (empty path).

@benoitnabholz, a few questions for you:

  1. What was the last version of RStudio you used, where you didn't experience this startup issue? (if any)
  2. When running R directly in a terminal, does R.home() return a correct path to R, such as /usr/lib/R?
  3. Are you opening RStudio via the terminal (if so, are you using sudo or passing any parameters?), or are you clicking on the app executable?

@benoitnabholz
Copy link
Author

Dear @sharon-wang

  1. What was the last version of RStudio you used, where you didn't experience this startup issue? (if any)
    I guess the current version worked at some point (2023.06.1-524).

  2. When running R directly in a terminal, does R.home() return a correct path to R, such as /usr/lib/R?
    Yes

  3. Are you opening RStudio via the terminal (if so, are you using sudo or passing any parameters?), or are you clicking on the app executable?
    By clicking on an app but running from a terminal without "sudo" lead to the same error.

@sharon-wang
Copy link
Member

Noting that this may be related to #13184.

@RafaelReckmann
Copy link

I encountered the same problem:

R Session Startup Failure Report

RStudio Version

RStudio 2023.09.1+494 "Desert Sunflower " (cd7011d, 2023-10-16) for Ubuntu Jammy

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.09.1+494 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36

Error message

[No error available]

Process Output

The R session exited with code 1.

Error output:

[No errors emitted]

Standard output:

[No output emitted]

Logs

/home/rafael/.local/share/rstudio/log/rsession-rafael.log

2023-11-01T13:00:45.252756Z [rsession-rafael] WARNING The tcp http listener initialized without signature validation: --verify-signatures option missing; LOGGED FROM: void rstudio::session::{anonymous}::initTcpHttpConnectionListener(const string&, const string&, rstudio::session::Options&, const string&, const string&) src/cpp/session/http/SessionPosixHttpConnectionListener.cpp:76
2023-11-01T13:00:45.253029Z [rsession-rafael] ERROR system error 2 (No such file or directory) [path: ]; OCCURRED AT rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) src/cpp/r/session/RDiscovery.cpp:62; LOGGED FROM: int main(int, char* const*) src/cpp/session/SessionMain.cpp:2474
2023-11-01T13:00:45.253029Z [rsession-rafael] ERROR system error 2 (No such file or directory) [path: ]; OCCURRED AT rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) src/cpp/r/session/RDiscovery.cpp:62; LOGGED FROM: int main(int, char* const*) src/cpp/session/SessionMain.cpp:2474

@benoitnabholz
Copy link
Author

My problem persist and my R is installed in /usr/bin/ so it is not #13184 in my case.

@kevinushey
Copy link
Contributor

How was R installed on your machine? It looks like RStudio tries to infer some of R's environment variables from the R wrapper shell script, so I wonder if your script has some unexpected contents.

That is, what is the output of:

cat /usr/bin/R

on your machine?

@JM-CI
Copy link

JM-CI commented Apr 24, 2024

I am having the same issue using an R version provided by the package manager Spack. Inspecting the R wrapper script generated by Spack, all of the paths are resolveable, so it doesn't appear to be related to #13184
It is a non standard location (in this particular case /spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/bin/R) but as I say all of the requisite bits of R appear to be where they should be.
Any help resolving this would be appreciated, let me know if you need any more information.
ETA: This is with version 2023.12.0+369, "Ocean Storm" (33206f7, 2023-12-17) for RHEL 8

@JM-CI
Copy link

JM-CI commented Apr 24, 2024

Additionally, I can confirm that this build of R was built with --enable-R-shlib

@kevinushey
Copy link
Contributor

Do you see any errors in the system log when you try to start RStudio?

Can you share the output of:

cat /spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/bin/R

@JM-CI
Copy link

JM-CI commented Apr 25, 2024

Thanks for following up - I'm getting the error:
ERROR system error 2 (No such file or directory) [path: ]; OCCURRED AT rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) src/cpp/r/session/RDiscovery.cpp:69; LOGGED FROM: int main(int, char* const*) src/cpp/session/SessionMain.cpp:2494

And the contents of the file:

#!/bin/sh                                                                                                        
# Shell wrapper for R executable.                                                                                
                                                                                                                 
R_HOME_DIR=/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/rlib/R           
if test "${R_HOME_DIR}" = "/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/l
   case "linux-gnu" in                                                                                           
   linux*)                                                                                                       
     run_arch=`uname -m`                                                                                         
     case "$run_arch" in                                                                                         
        x86_64|mips64|ppc64|powerpc64|sparc64|s390x)                                                             
          libnn=lib64                                                                                            
          libnn_fallback=lib                                                                                     
        ;;                                                                                                       
        *)                                                                                                       
          libnn=lib                                                                                              
          libnn_fallback=lib64                                                                                   
        ;;                                                                                                       
     esac                                                                                                        
     if [ -x "/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/${libnn}/R/bin
        R_HOME_DIR="/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/${libnn}
     elif [ -x "/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/${libnn_fall
        R_HOME_DIR="/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/${libnn_
     ## else -- leave alone (might be a sub-arch)                                                                
     fi                                                                                                          
     ;;                                                                                                          
  esac                                                                                                           
fi                                                                                                               
                                                                                                                 
if test -n "${R_HOME}" && \                                                                                      
   test "${R_HOME}" != "${R_HOME_DIR}"; then                                                                     
  echo "WARNING: ignoring environment value of R_HOME"                                                           
fi                                                                                                               
R_HOME="${R_HOME_DIR}"                                                                                           
export R_HOME                                                                                                    
R_SHARE_DIR=/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/rlib/R/share    
export R_SHARE_DIR                                                                                               
R_INCLUDE_DIR=/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/rlib/R/include
export R_INCLUDE_DIR                                                                                             
R_DOC_DIR=/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/rlib/R/doc        
export R_DOC_DIR                                                                                                 
                                                                                                                 
# Since this script can be called recursively, we allow R_ARCH to                                                
# be overridden from the environment.                                                                            
# This script is shared by parallel installs, so nothing in it should                                            
# depend on the sub-architecture except the default here.                                                        
: ${R_ARCH=}                
                                                                                                                 
usage="                                                                                                          
Usage: R [options] [< infile] [> outfile]                                                                        
   or: R CMD command [arguments]                                                                                 
                                                                                                                 
Start R, a system for statistical computation and graphics, with the                                             
specified options, or invoke an R tool via the 'R CMD' interface.                                                
                                                                                                                 
Options:                                                                                                         
  -h, --help            Print short help message and exit                                                        
  --version             Print version info and exit                                                              
  --encoding=ENC        Specify encoding to be used for stdin                                                    
  --encoding ENC                                                                                                 
  RHOME         Print path to R home directory and exit                                                          
  --save                Do save workspace at the end of the session                                              
  --no-save             Don't save it                                                                            
  --no-environ          Don't read the site and user environment files                                           
  --no-site-file        Don't read the site-wide Rprofile                                                        
  --no-init-file        Don't read the user R profile                                                            
  --restore             Do restore previously saved objects at startup                                           
  --no-restore-data     Don't restore previously saved objects                                                   
  --no-restore-history  Don't restore the R history file                                                         
  --no-restore          Don't restore anything                                                                   
  --vanilla     Combine --no-save, --no-restore, --no-site-file,                                                 
            --no-init-file and --no-environ                                                                      
  --no-readline         Don't use readline for command-line editing                                              
  --max-ppsize=N        Set max size of protect stack to N                                                       
  --min-nsize=N         Set min number of fixed size obj's (\"cons cells\") to N                                 
  --min-vsize=N         Set vector heap minimum to N bytes; '4M' = 4 MegaB                                       
  -q, --quiet           Don't print startup message                                                              
  --silent              Same as --quiet                                                                          
  -s, --no-echo         Make R run as quietly as possible                                                        
  --interactive         Force an interactive session                                                             
  --verbose             Print more information about progress                                                    
  -d, --debugger=NAME   Run R through debugger NAME                                                              
  --debugger-args=ARGS  Pass ARGS as arguments to the debugger                                                   
  -g TYPE, --gui=TYPE   Use TYPE as GUI; possible values are 'X11' (default)                                     
            and 'Tk'.                                                                                            
  --arch=NAME       Specify a sub-architecture                                                                   
  --args                Skip the rest of the command line                                                        
  -f FILE, --file=FILE  Take input from 'FILE'                                                                   
  -e EXPR               Execute 'EXPR' and exit                                                                  
                                                                                                                 
FILE may contain spaces but not shell metacharacters.                                                            
                                                                                                                 
Commands:                                                                                                        
  BATCH         Run R in batch mode                                                                              
  COMPILE       Compile files for use with R                                                                     
  SHLIB         Build shared library for dynamic loading                                                         
  INSTALL       Install add-on packages                                                                          
  REMOVE        Remove add-on packages                                                                           
  build         Build add-on packages                                                                            
  check         Check add-on packages                                                                            
  LINK          Front-end for creating executable programs                                                       
  Rprof         Post-process R profiling files                                                                   
  Rdconv        Convert Rd format to various other formats                                                       
  Rd2pdf        Convert Rd format to PDF                                                                         
  Rd2txt        Convert Rd format to pretty text                                                                 
  Stangle       Extract S/R code from Sweave documentation     
  Sweave        Process Sweave documentation                                                                     
  Rdiff         Diff R output ignoring headers etc                                                               
  config        Obtain configuration information about R                                                         
  javareconf        Update the Java configuration variables                                                      
  rtags                 Create Emacs-style tag files from C, R, and Rd files                                     
                                                                                                                 
Please use 'R CMD command --help' to obtain further information about                                            
the usage of 'command'.                                                                                          
                                                                                                                 
Options --arch, --no-environ, --no-init-file, --no-site-file and --vanilla                                       
can be placed between R and CMD, to apply to R processes run by 'command'                                        
                                                                                                                 
Report bugs at <https://bugs.R-project.org>."                                                                    
                                                                                                                 
## some systems have a more portable sed, e.g. /usr/xpg4/bin/sed on Solaris,                                     
## so make sure that is used.                                                                                    
SED=/usr/bin/sed                                                                                                 
export SED                                                                                                       
                                                                                                                 
error () {                                                                                                       
  echo "ERROR: $*" >&2                                                                                           
  exit 1                                                                                                         
}                                                                                                                
                                                                                                                 
### Argument loop                                                                                                
args=                                                                                                            
debugger=                                                                                                        
debugger_args=                                                                                                   
gui=                                                                                                             
while test -n "${1}"; do                                                                                         
  case ${1} in                                                                                                   
    RHOME|--print-home)                                                                                          
      echo "${R_HOME}"; exit 0 ;;                                                                                
    CMD)                                                                                                         
      shift;                                                                                                     
      export R_ARCH                                                                                              
      . "${R_HOME}/etc${R_ARCH}/ldpaths"                                                                         
      exec sh "${R_HOME}/bin/Rcmd" "${@}" ;;                                                                     
    -g|--gui)                                                                                                    
      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then                                                         
    gui="${2}"                                                                                                   
        args="${args} ${1} ${2}"                                                                                 
    shift                                                                                                        
      else                                                                                                       
    error "option '${1}' requires an argument"                                                                   
      fi                                                                                                         
      ;;                                                                                                         
    --gui=*)                                                                                                     
      gui=`echo "${1}" | ${SED} -e 's/[^=]*=//'`                                                                 
      args="${args} ${1}"                                                                                        
      ;;                                                                                                         
    -d|--debugger)                                                                                               
      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then                                                         
    debugger="${2}"; shift                                                                                       
      else                                                                                                       
    error "option '${1}' requires an argument"                                                                   
      fi                                                                                                         
      ;;                                                                                                         
    --debugger=*)                                                                                                
      debugger=`echo "${1}" | ${SED} -e 's/[^=]*=//'` ;;                                                         
    --debugger-args=*)                                                                                           
      debugger_args=`echo "${1}" | ${SED} -e 's/[^=]*=//'` ;;                                                    
    -h|--help)                                                                                                   
      echo "${usage}"; exit 0 ;;                                                                                 
    --args)                                                                                                      
      break ;;                                                                                                   
    --arch)              
      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then                                                         
    R_ARCH="/${2}"                                                                                               
        shift                                                                                                    
      else                                                                                                       
        error "option '${1}' requires an argument"                                                               
      fi                                                                                                         
      ## check sub-architecture here for a better error message                                                  
      if ! test -d ${R_HOME}/etc${R_ARCH}; then                                                                  
        error "sub-architecture '${1}' is not installed"                                                         
      fi                                                                                                         
      ;;                                                                                                         
    --arch=*)                                                                                                    
      r_arch=`echo "${1}" | ${SED} -e 's/[^=]*=//'`                                                              
      R_ARCH="/${r_arch}"                                                                                        
      ## check sub-architecture here for a better error message                                                  
      if ! test -d ${R_HOME}/etc${R_ARCH}; then                                                                  
        error "sub-architecture '${r_arch}' is not installed"                                                    
      fi                                                                                                         
      ;;                                                                                                         
    -e)                                                                                                          
      TAB=`printf "\t"`                                                                                          
      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then                                                         
    a=`(echo "${2}" && echo) | ${SED} -e 's/ /~+~/g' | \                                                         
          ${SED} -e :a -e N -e '$!ba' -e 's/\n/~n~/g' -e 's/~n~$//g' -e "s/$TAB/~t~/g"`                          
        shift                                                                                                    
      else                                                                                                       
    error "option '${1}' requires a non-empty argument"                                                          
      fi                                                                                                         
      args="${args} -e $a"                                                                                       
      ;;                                                                                                         
    -f)                                                                                                          
      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then                                                         
    a=`echo "${2}" | ${SED} -e 's/ /~+~/g'`; shift                                                               
      else                                                                                                       
    error "option '${1}' requires a filename argument"                                                           
      fi                                                                                                         
      args="${args} -f $a"                                                                                       
      ;;                                                                                                         
    --file=*)                                                                                                    
      a=`echo "${1}" | ${SED} -e 's/[^=]*=//' | ${SED} -e 's/ /~+~/g'`                                           
      args="${args} --file=$a"                                                                                   
      ;;                                                                                                         
    --no-environ)                                                                                                
      R_ENVIRON=''                                                                                               
      export R_ENVIRON                                                                                           
      R_ENVIRON_USER=''                                                                                          
      export R_ENVIRON_USER                                                                                      
      args="${args} ${1}"                                                                                        
      ;;                                                                                                         
    --no-site-file)                                                                                              
      R_PROFILE=''                                                                                               
      export R_PROFILE                                                                                           
      args="${args} ${1}"                                                                                        
      ;;                                                                                                         
    --no-init-file)                                                                                              
      R_PROFILE_USER=''                                                                                          
      export R_PROFILE_USER                                                                                      
      args="${args} ${1}"                                                                                        
      ;;                                                                                                         
    --vanilla)                                                                                                   
      R_ENVIRON=''                                                                                               
      export R_ENVIRON                                                                                           
      R_ENVIRON_USER=''                                                                                          
      export R_ENVIRON_USER                 
      R_PROFILE=''                                                                                               
      export R_PROFILE                                                                                           
      R_PROFILE_USER=''                                                                                          
      export R_PROFILE_USER                                                                                      
      args="${args} ${1}"                                                                                        
      ;;                                                                                                             *)                                                                                                           
      args="${args} ${1}" ;;                                                                                     
  esac                                                                                                           
  shift                                                                                                          
done                                                                                                             
                                                                                                                 
. "${R_HOME}/etc${R_ARCH}/ldpaths"                                                                               
                                                                                                                 
R_binary="${R_HOME}/bin/exec${R_ARCH}/R"                                                                         
export R_ARCH                                                                                                    
                                                                                                                 
case "${gui}" in                                                                                                 
Tk|tk|X11|x11)                                                                                                   
  ;;                                                                                                             
"")                                                                                                              
  ;;                                                                                                             
*)                                                                                                               
  error "unknown GUI ${gui}"                                                                                     
esac                                                                                                             
                                                                                                                 
## R_HOME may have moved, so check                                                                               
if test -x "${R_HOME}"; then                                                                                     
  :                                                                                                              
else                                                                                                             
  error "R_HOME ('${R_HOME}') not found"                                                                         
fi                                                                                                               
                                                                                                                 
## Startup                                                                                                       
if test -z "${debugger}"; then                                                                                   
  exec "${R_binary}"  ${args} "${@}"                                                                             
else                                                                                                             
  ## Ideally, we would like the debugger to start R with additional                                              
  ## ('inferior') arguments, but not all debuggers can do this.  We know                                         
  ## about valgrind and some versions of GDB , and deal with these.                                              
  ## Otherwise, to be on the safe side, we disregard non-debugger                                                
  ## command line args.                                                                                          
  args_ok=no                                                                                                     
  case "`${debugger} --version 2>/dev/null`" in                                                                  
    "GNU gdb"*)                                                                                                  
      if ${debugger} --help 2>/dev/null | \                                                                      
          grep ' *--args' >/dev/null; then                                                                       
    args_ok=yes                                                                                                  
    debugger_args="${debugger_args} --args"                                                                      
      fi                                                                                                         
      ;;                                                                                                         
    valgrind*)                                                                                                   
      args_ok=yes                                                                                                
      ;;                                                                                                         
  esac                                                                                                           
  if test -n "${args}${*}" && test "${args_ok}" = no; then                                                       
    args=`expr "${args} ${*}" : " *\(.*\)"`                                                                      
    echo "*** Further command line arguments ('${args}') disregarded"                                            
    echo "*** (maybe use 'run ${args}' from *inside* ${debugger})"                                               
    echo ""                                                                                                      
    exec ${debugger} ${debugger_args} "${R_binary}"                                                              
  else                                                                                                           
    exec ${debugger} ${debugger_args} "${R_binary}" ${args} "${@}"                                               
  fi                                             
fi                                                                                                               
                                                                                                                 
### Local Variables: ***                                                                                         
### mode: sh ***                                                                                                 
### sh-indentation: 2 ***                                                                                        
### End: ***               

@JM-CI
Copy link

JM-CI commented Apr 25, 2024

So from a bit of digging in src/cpp/r/session/RDiscovery.cpp, line 69 as referenced in the error, it appears the problem is specifically that the R doc dir is not found:

   if (rDocDir.empty() || !FilePath(rDocDir).exists())
      return core::pathNotFoundError(rDocDir, ERROR_LOCATION);

However, if I list the directory:

ls -la /spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/rlib/R/doc/
total 2625
drwxr-sr-x  4 root root     23 Nov 24 11:23 .
drwxr-sr-x 10 root root     12 Nov 24 11:23 ..
-rw-r--r--  1 root root   1013 Nov 24 11:23 AUTHORS
-rw-r--r--  1 root root   3283 Nov 24 11:23 BioC_mirrors.csv
-rw-r--r--  1 root root  18011 Nov 24 11:23 COPYING
-rw-r--r--  1 root root  26240 Nov 24 11:23 COPYRIGHTS
-rw-r--r--  1 root root  17125 Nov 24 11:23 CRAN_mirrors.csv
-rw-r--r--  1 root root 117076 Nov 24 11:23 FAQ
drwxr-sr-x  3 root root     26 Nov 24 11:23 html
-rw-r--r--  1 root root   2530 Nov 24 11:23 KEYWORDS
-rw-r--r--  1 root root   3047 Nov 24 11:23 KEYWORDS.db
drwxr-sr-x  3 root root     10 Nov 24 11:23 manual
-rw-r--r--  1 root root 150704 Nov 24 11:23 NEWS
-rw-r--r--  1 root root  93568 Nov 24 11:23 NEWS.0
-rw-r--r--  1 root root 294278 Nov 24 11:23 NEWS.1
-rw-r--r--  1 root root 641791 Nov 24 11:23 NEWS.2
-rw-r--r--  1 root root 432443 Nov 24 11:23 NEWS.2.rds
-rw-r--r--  1 root root 325075 Nov 24 11:23 NEWS.3
-rw-r--r--  1 root root 561103 Nov 24 11:23 NEWS.3.rds
-rw-r--r--  1 root root 398427 Nov 24 11:23 NEWS.pdf
-rw-r--r--  1 root root 258981 Nov 24 11:23 NEWS.rds
-rw-r--r--  1 root root   1253 Nov 24 11:23 RESOURCES
-rw-r--r--  1 root root   3914 Nov 24 11:23 THANKS

It all appears to be there alright, so I'm not really sure what the problem is!

@JM-CI
Copy link

JM-CI commented Apr 25, 2024

If I manually override the doc location on the command line the session appears to start but when I try to connect to the server I get the spinning wheel and "R is taking longer to start than usual", with no logs in either the system log or the user that I'm starting as.

@kevinushey
Copy link
Contributor

Apologies, but to confirm, are you using RStudio Desktop or Server?

If desktop, we run the following script to try and determine these paths (such as R_DOC_DIR):

const rQueryScript = String.raw`
cat("\x1E", sep = "")
writeLines(sep = "\x1F", c(
format(getRversion()),
R.home(),
R.home("doc"),
R.home("include"),
R.home("share"),
paste(R.version$crt, collapse = ""),
.Platform$r_arch,
Sys.getenv("${kLdLibraryPathVariable}"),
Sys.getenv("R_PLATFORM")
))`;

Does R.home("doc") return the expected path from an R session as well? (Could it possibly be getting overridden in an installation's .Rprofile somewhere?)

The script for RStudio Server is similar, but a bit smaller:

// call R to determine the locations - if a path to R is not given
// then just use the default on the command line - this should
// only be the case when a module is specified
std::string rCommand = !rScriptPath.empty() ? rScriptPath : "R";
std::string command = rCommand +
" --vanilla -s -e \"cat(paste("
"R.home('home'),"
"R.home('share'),"
"R.home('include'),"
"R.home('doc'),sep=':'))\"";

@JM-CI
Copy link

JM-CI commented May 1, 2024

Sorry for the delayed response - it is RStudio Server.

> R.home("doc")
[1] "/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/rlib/R/doc"

As I say if I manually override the doc location with the rsession flag --r-doc-dir-override=/spack/opt/spack/linux-rocky8-zen/gcc-8.5.0/r-4.3.0-t2dnho7xg7oaqwpvvvcsxdfzdfbomcwf/rlib/R/doc/ the session starts up but appears to hang immediately after startup, with any connection yielding a spinning wheel and eventually the message that R is taking longer to start than usual.

@xuanblo
Copy link

xuanblo commented May 6, 2024

(base) [guest@ip~]$ l /home/guest/miniconda3/envs/scRNA/bin/R
-rwxrwxr-x 1 guest guest 9.1K Apr 30 22:53 /home/guest/miniconda3/envs/scRNA/bin/R
(base) [guest@ip ~]$ cat /etc/rstudio/rserver.conf
# Server Configuration File
www-port = 8787
rsession-which-r=/home/guest/miniconda3/envs/scRNA/bin/R
centos 7
(base) [guest@ip ~]$ l /home/guest/miniconda3/envs/scRNA/bin/R
-rwxrwxr-x 1 guest guest 9.1K Apr 30 22:53 /home/guest/miniconda3/envs/scRNA/bin/R
(base) [guest@ip ~]$ sudo rstudio-server verify-installation
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/var/log/rstudio/rstudio-server/rserver.log'.
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/tmp/ef48-12a5-542f-19de/.local/share/rstudio/log/rsession-rstudio-server.log'.
2024-05-06T16:15:43.197082Z [rsession-rstudio-server] ERROR system error 2 (No such file or directory) [path: /home/guest/miniconda3/envs/scRNA/lib/R]; OCCURRED AT rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) src/cpp/r/session/RDiscovery.cpp:62; LOGGED FROM: int main(int, char* const*) src/cpp/session/SessionMain.cpp:2494

run on centos 7

i give 'rsession-which-r=/home/guest/miniconda3/envs/scRNA/bin/R', but why 'rstudio-server verify-installation' report 'path: /home/guest/miniconda3/envs/scRNA/lib/R' can't find?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug startup Problems with starting up, installation, etc.
Projects
None yet
Development

No branches or pull requests

7 participants