docker 闪亮的服务器专业版问题
docker with shiny server pro issues
我在 centos
上创建了两个带有闪亮服务器的 docker:
这些 docker 在 centos
上,因为假设最终 运行 在 RHEL
上作为 Linux 的受支持版本(也许 docker化的或本地的)。目前他们提供了一种方便的测试和开发方式。
它们主要是为开发而设计的:它们包括 R
、RStudio Server
和 Shiny Server
:可能不是 Docker 纯粹主义者会做或推荐的(可能是产品版本将基于docker compose).
我遇到的问题是 Docker 和 shiny server
- 免费版工作正常,Docker 和 shiny server pro
不工作(也许是 supervisord 的问题?)。
2015-09-19 12:40:10,379 CRIT Supervisor running as root (no user in config file)
2015-09-19 12:40:10,385 INFO supervisord started with pid 1
2015-09-19 12:40:10,387 INFO spawned: 'shinyserver' with pid 8
2015-09-19 12:40:10,388 INFO spawned: 'rserver' with pid 9
2015-09-19 12:40:10,404 INFO success: rserver entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2015-09-19 12:40:10,405 INFO exited: rserver (exit status 0; expected)
2015-09-19 12:40:10,405 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:10,955 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:10,955 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:11,959 INFO spawned: 'shinyserver' with pid 31
2015-09-19 12:40:12,236 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:12,236 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:14,243 INFO spawned: 'shinyserver' with pid 37
2015-09-19 12:40:14,520 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:14,521 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:17,533 INFO spawned: 'shinyserver' with pid 43
2015-09-19 12:40:17,807 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:17,808 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:18,811 INFO gave up: shinyserver entered FATAL state, too many start retries too quickly
2015-09-19 12:40:43,272 CRIT received SIGTERM indicating exit request
这很令人惊讶,因为代码库很常见(当然)。也许是关于进程如何生成的问题?
如果有人能帮助我找到 shiny server pro
配置中的错误,那就太好了。
我已经设法解决了这个问题。正如预期的那样,这是 supervisord.conf
.
的错误配置
Shiny 服务器需要以 root 身份启动,我错误地使用 user=shiny
而不是 user=root
。我很惊讶这在免费版中没有产生错误。
为了后代,这里是使它工作的主管配置:
[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
pidfile = /tmp/supervisord.pid
[program:rserver]
user=root
command=/usr/lib/rstudio-server/bin/rserver
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
startsecs=0
autorestart=false
exitcodes=0
[program:shinyserver]
user=root
startsecs = 0
command=/bin/bash -c "exec shiny-server >> /var/log/shiny-server.log 2>&1"
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
autorestart=false
redirect_stderr=true
dockerfile等可用on my github page smartinsightsfromdata
我在 centos
上创建了两个带有闪亮服务器的 docker:
这些 docker 在 centos
上,因为假设最终 运行 在 RHEL
上作为 Linux 的受支持版本(也许 docker化的或本地的)。目前他们提供了一种方便的测试和开发方式。
它们主要是为开发而设计的:它们包括 R
、RStudio Server
和 Shiny Server
:可能不是 Docker 纯粹主义者会做或推荐的(可能是产品版本将基于docker compose).
我遇到的问题是 Docker 和 shiny server
- 免费版工作正常,Docker 和 shiny server pro
不工作(也许是 supervisord 的问题?)。
2015-09-19 12:40:10,379 CRIT Supervisor running as root (no user in config file)
2015-09-19 12:40:10,385 INFO supervisord started with pid 1
2015-09-19 12:40:10,387 INFO spawned: 'shinyserver' with pid 8
2015-09-19 12:40:10,388 INFO spawned: 'rserver' with pid 9
2015-09-19 12:40:10,404 INFO success: rserver entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2015-09-19 12:40:10,405 INFO exited: rserver (exit status 0; expected)
2015-09-19 12:40:10,405 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:10,955 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:10,955 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:11,959 INFO spawned: 'shinyserver' with pid 31
2015-09-19 12:40:12,236 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:12,236 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:14,243 INFO spawned: 'shinyserver' with pid 37
2015-09-19 12:40:14,520 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:14,521 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:17,533 INFO spawned: 'shinyserver' with pid 43
2015-09-19 12:40:17,807 INFO exited: shinyserver (exit status 8; not expected)
2015-09-19 12:40:17,808 INFO received SIGCLD indicating a child quit
2015-09-19 12:40:18,811 INFO gave up: shinyserver entered FATAL state, too many start retries too quickly
2015-09-19 12:40:43,272 CRIT received SIGTERM indicating exit request
这很令人惊讶,因为代码库很常见(当然)。也许是关于进程如何生成的问题?
如果有人能帮助我找到 shiny server pro
配置中的错误,那就太好了。
我已经设法解决了这个问题。正如预期的那样,这是 supervisord.conf
.
Shiny 服务器需要以 root 身份启动,我错误地使用 user=shiny
而不是 user=root
。我很惊讶这在免费版中没有产生错误。
为了后代,这里是使它工作的主管配置:
[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
pidfile = /tmp/supervisord.pid
[program:rserver]
user=root
command=/usr/lib/rstudio-server/bin/rserver
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
startsecs=0
autorestart=false
exitcodes=0
[program:shinyserver]
user=root
startsecs = 0
command=/bin/bash -c "exec shiny-server >> /var/log/shiny-server.log 2>&1"
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
autorestart=false
redirect_stderr=true
dockerfile等可用on my github page smartinsightsfromdata