【问题标题】:docker with shiny server pro issues有闪亮的服务器专业问题的码头工人
【发布时间】:2015-12-16 13:54:19
【问题描述】:

我在centos 上创建了两个带有闪亮服务器的码头工人:

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

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

它们主要是为开发而设计的:它们包括 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 配置中的错误,那就太好了。

【问题讨论】:

  • “不起作用”是什么意思?你有错误信息吗,复制者,docker eventsdocker logs your_container_id 显示什么?
  • @user2915097 更新了 supervisord 的错误日志
  • 你能发布你的主管配置吗?这很糟糕gave up: shinyserver entered FATAL state, too many start retries too quickly
  • @user2915097 Dockerfile 和 supervisor 配置都在我的 github 页面,链接到这篇文章

标签: r docker centos supervisord shiny-server


【解决方案1】:

我已经设法解决了这个问题。正如预期的那样,这是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

【讨论】:

    猜你喜欢
    • 2023-01-26
    • 2020-02-12
    • 1970-01-01
    • 2018-08-03
    • 1970-01-01
    • 1970-01-01
    • 2013-02-08
    • 2021-11-07
    • 2021-03-10
    相关资源
    最近更新 更多