gpt4 book ai didi

ubuntu - 重新启动后无法启动 Shiny 的服务器

转载 作者:行者123 更新时间:2023-12-04 18:33:52 29 4
gpt4 key购买 nike

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

enter image description here

Shiny 的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

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

Shiny 的服务器日志
[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

任何帮助将不胜感激。

最佳答案

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

关于ubuntu - 重新启动后无法启动 Shiny 的服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47047080/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com