重启后无法启动闪亮服务器

时间:2017-11-01 01:52:02

标签: ubuntu shiny-server

我在Ubuntu 16.04机器上安装了Shiny-server。它一直有效,直到我第一次重新启动机器。我不知道发生了什么,因为我仔细检查了配置文件并调整了一些参数,但我无法让它运行。所以,我决定重新安装它,但仍然没有运气。

enter image description here

光泽-server.service

[Unit]
Description=ShinyServer

[Service]
TimeoutStartSec=10
ExecStart=/bin/bash -c '/opt/shiny-server/bin/shiny-server --pidfile=/var/run/shiny-server.pid >> /var/log/shiny-server.log 2>&1'
# Needed to give SS a chance to write out to the PID file.
ExecStartPost=/bin/sleep 3
PIDFile=/var/run/shiny-server.pid
Type=simple

Environment="LANG=en_US.UTF-8"
ExecReload=/bin/kill -HUP $MAINPID
ExecStopPost=/bin/sleep 5
RestartSec=1


[Install]
WantedBy=multi-user.target

光泽-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;
}

光泽-server.log中

[32m[2017-11-01 01:01:43.874] [INFO] shiny-server - [39mShiny Server v1.5.5.872 (Node.js v6.10.3)
[32m[2017-11-01 01:01:43.878] [INFO] shiny-server - [39mUsing pidfile /var/run/shiny-server.pid
[32m[2017-11-01 01:01:43.879] [INFO] shiny-server - [39mUsing config file "/etc/shiny-server/shiny-server.conf"
[31m[2017-11-01 01:01:43.925] [ERROR] shiny-server - [39mError loading config: Unknown directive "utilization_scheduler" (/etc/shiny-server/shiny-server.conf:15:5)
[32m[2017-11-01 01:01:43.926] [INFO] shiny-server - [39mShutting down worker processes

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

该错误消息是由于尝试使用免费版本中的R Studio Pro功能引起的。如果您没有专业版,只需注释掉所有这些仅专业版的选项即可。