shiny server The application fai

作者: JeremyL | 来源:发表于2020-10-15 21:49 被阅读0次

    #问题:

    An error has occurred\
    The application failed to start.
    
    The application exited during initialization.
    

    #1. 检查R包的安装

    • 是否调用的所有R包都已安装

    使用root安装,在个人用户下安装是不行的。

    $ sudo su - -c "R -e \"install.packages('WGCNA', repos='http://cran.rstudio.com/', dependencies = TRUE)\""
    

    或,下载到本地:

    $ su
    $ R CMD INSTALL WGCNA_1.69-81.tar.gz
    

    注:检查所有安装的包

    #2.修改配置文件

    • shiny-server配置
    • shiny-server 配置文件
    $ vi  /etc/shiny-server/shiny-server.conf
    # Define the user we should use when spawning R Shiny processes
    run_as shiny;
    
    # Define a top-level server which will listen on a port
    server {
      # Instruct this server to listen on port 3838
      listen 3838;
    
      # Define the location available at the base URL
      location / {
        #### PRO ONLY ####
        # Only up tp 20 connections per Shiny process and at most 3 Shiny processes
        # per application. Proactively spawn a new process when our processes reach 
        # 90% capacity.
        utilization_scheduler 20 .9 3;
        #### END PRO ONLY ####
    
        # Run this location in 'site_dir' mode, which hosts the entire directory
        # tree at '/srv/shiny-server'
        site_dir /srv/shiny-server;
        
        # Define where we should put the log files for this location
        log_dir /var/log/shiny-server;
        
        # Should we list the contents of a (non-Shiny-App) directory when the user 
        # visits the corresponding URL?
        directory_index on;
      }
    }
    
    # Setup a flat-file authentication system. {.pro}
    auth_passwd_file /etc/shiny-server/passwd;
    
    # Define a default admin interface to be run on port 4151. {.pro}
    admin 4151 {
      # Only permit the user named `admin` to access the admin interface.
      required_user admin;
    }
    
    • run_as shiny: shiny改为linux用户名
    • 检查app路径,一般是:/srv/shiny-server;不是这个路径,就检查权限,可用chmod修改。

    相关文章

      网友评论

        本文标题:shiny server The application fai

        本文链接:https://www.haomeiwen.com/subject/elfapktx.html