gpt4 book ai didi

r - docker 与 shiny server pro 问题

转载 作者:太空宇宙 更新时间:2023-11-03 17:15:58 24 4
gpt4 key购买 nike

我在 centos 上创建了两个带有 Shiny 服务器的 docker:

  • Docker with shiny server - 免费版 here
  • Docker with shiny server pro(使用临时许可证)here

这些 docker 在 centos 上,因为它被假定最终将在 RHEL 上作为受支持的 Linux 版本(可能是 docker 化的或 native 的)运行。目前,它们提供了一种方便的测试和开发方式。

它们主要用于开发:它们包括 RRStudio ServerShiny Server:可能不是 Docker 纯粹主义者会做的或推荐(可能生产版本将基于 docker compose)。

我遇到的问题是,虽然带有 shiny server 的 Docker - 免费版工作正常,带有 shiny server pro 的 Docker 不工作(也许是 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

关于r - docker 与 shiny server pro 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32668559/

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