【问题标题】:shiny server cannot be started after restart重新启动后无法启动闪亮的服务器
【发布时间】:2018-04-13 07:28:36
【问题描述】:

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

闪亮的服务器服务

[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

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

闪亮的服务器日志

[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

任何帮助将不胜感激。

【问题讨论】:

  • 您找到解决方案了吗?我遇到了同样的问题:在我重新启动服务器之前工作正常,现在什么也没有。
  • @jogall 不,对不起。

标签: ubuntu shiny-server


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2020-10-04
    • 1970-01-01
    • 2016-08-01
    • 2011-04-21
    • 2017-05-24
    • 1970-01-01
    • 2014-09-23
    • 2020-01-24
    相关资源
    最近更新 更多