#問題:
An error has occurred\
The application failed to start.
The application exited during initialization.
#1. 檢查R包的安裝
- 是否調(diào)用的所有R包都已安裝
使用root安裝蛔溃,在個(gè)人用戶下安裝是不行的。
$ 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;不是這個(gè)路徑疚顷,就檢查權(quán)限旱易,可用chmod修改。