错误:有光泽的服务器 - 加载配置时出错:未知指令

时间:2017-07-12 00:50:06

标签: r shiny shiny-server

我在Ubuntu 16.04.2服务器上运行Shiny Server v1.5.3.838。早些时候,我遇到了闪亮的服务器端口3838的问题。所以,我试图在shiny-server.conf文件中修改它。但经过修改后,我收到了以下错误:

[ERROR] shiny-server - Error loading config: Unknown directive "" (/etc/shiny-server/shiny-server.conf:1:1) 

我撤消了shiny-server.conf文件中的更改。但是,这是我得到的同样的错误。

这是我的shiny-server.log文件说:

[2017-07-12 00:29:03.433] [INFO] shiny-server - Shiny Server v1.5.3.838 (Node.js v6.10.0)
[2017-07-12 00:29:03.439] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2017-07-12 00:29:03.516] [ERROR] shiny-server - Error loading config: Unknown directive "" (/etc/shiny-server/shiny-server.conf:1:1)
[2017-07-12 00:29:03.517] [INFO] shiny-server - Shutting down worker processes

以下是我的shiny-server.conf文件包含:

# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;

# Define a server that listens on port 3838
server {
  listen 3838;

  # Define a location at the base URL
  location / {

    # Host the directory of Shiny Apps stored in this directory
    site_dir /srv/shiny-server;

    # Log all Shiny output to files in this directory
    log_dir /var/log/shiny-server;

    # When a user visits the base URL rather than a particular application,
    # an index of the applications available in this directory will be shown.
    directory_index on;
  }
}

sudo systemctl status shiny-server返回,如下所示:

Loaded: loaded (/etc/systemd/system/shiny-server.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2017-07-12 11:31:22 UTC; 16min ago
Process: 7290 ExecStopPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
Process: 7276 ExecStartPost=/bin/sleep 3 (code=exited, status=0/SUCCESS)
Process: 7275 ExecStart=/bin/bash -c /opt/shiny-server/bin/shiny-server --pidfile=/var/run/shiny-server.pid >> /var/log/shiny-server.log 2>&1 (code=exited, status=0/SUCCESS)
Main PID: 7275 (code=exited, status=0/SUCCESS)

Jul 12 11:31:14 san1-droplet systemd[1]: Starting ShinyServer...
Jul 12 11:31:22 san1-droplet systemd[1]: Started ShinyServer.

我已经尝试了几件事,但不知道如何解决这个问题,并启动一个闪亮的服务器。

0 个答案:

没有答案