我使用
安装了opencpu Docker镜像 docker pull opencpu/ubuntu-16.04
。
第一次成功开始。但是如果我终止进程并尝试使用命令
再次启动它docker run -it imageID
每次都会被终止。需要有关如何成功启动它的建议。
Desktop$ docker run -it d98852787b8e
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.4. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 08 06:34:52.836970 2018] [ssl:warn] [pid 11] AH01909: 172.17.0.4:443:0 server certificate does NOT include an ID which matches the server name
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.4. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 08 06:34:52.849109 2018] [ssl:warn] [pid 11] AH01909: 172.17.0.4:443:0 server certificate does NOT include an ID which matches the server name
[Thu Mar 08 06:34:52.849219 2018] [core:warn] [pid 11] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Mar 08 06:34:52.851132 2018] [mpm_prefork:notice] [pid 11] AH00163: Apache/2.4.18 (Ubuntu) mod_R/1.2.7 R/3.2.2 OpenSSL/1.0.2g mod_apreq2-20090110/2.8.0 configured -- resuming normal operations
[Thu Mar 08 06:34:52.851152 2018] [core:notice] [pid 11] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
[Thu Mar 08 06:34:52.872738 2018] [mpm_prefork:notice] [pid 11] AH00170: caught SIGWINCH, shutting down gracefully
Using locale: en_US.UTF-8
Using locale: en_US.UTF-8
AppArmor not available. Running OpenCPU without security profile but with rlimits.
Using locale: en_US.UTF-8
AppArmor not available. Running OpenCPU without security profile but with rlimits.
AppArmor not available. Running OpenCPU without security profile but with rlimits.
Using locale: en_US.UTF-8
Using locale: en_US.UTF-8
AppArmor not available. Running OpenCPU without security profile but with rlimits.
AppArmor not available. Running OpenCPU without security profile but with rlimits.
Loading config from /usr/lib/opencpu/library/opencpu/config/defaults.conf
Loading config from /usr/lib/opencpu/library/opencpu/config/defaults.conf
Loading config from /etc/opencpu/server.conf
Loading config from /usr/lib/opencpu/library/opencpu/config/defaults.conf
Loading config from /etc/opencpu/server.conf
Loading config from /usr/lib/opencpu/library/opencpu/config/defaults.conf
OpenCPU cloud server ready.
OpenCPU cloud server ready.
Loading config from /etc/opencpu/server.conf
Loading config from /etc/opencpu/server.conf
OpenCPU cloud server ready.
OpenCPU cloud server ready.
Loading config from /usr/lib/opencpu/library/opencpu/config/defaults.conf
Loading config from /etc/opencpu/server.conf
OpenCPU cloud server ready.
rserver[8]: ERROR system error 10 (No child processes); OCCURRED AT: rstudio::core::Error rstudio::server::app_armor::enforceRestricted() /home/ubuntu/rstudio/src/cpp/server/ServerAppArmor.cpp:90; LOGGED FROM: int main(int, char* const*) /home/ubuntu/rstudio/src/cpp/server/ServerMain.cpp:513
Terminated
答案 0 :(得分:0)
也许这可以给你一些提示......这不是解决方案,但如果给你一个高水平的原因可能导致解决方案。enter link description here
答案 1 :(得分:0)
这似乎是rstudio-server
包的问题。我将上面建议的解决方法(server-app-armor-enabled=0
)添加到opencpu docker映像。
请注意,opencpu/base
图片会安装rstudio,因此您可能需要尝试使用此功能。
答案 2 :(得分:0)
什么是输出
sudo docker logs <container-name>
?
最有可能是表明httpd pid存在的东西。这意味着您需要删除容器中的apache2.pid。但是现在,由于容器无法启动,因此可以修改位于/var/lib/docker/containers/<container-long-id>/
中的容器的config.v2.json文件
在CMD部分中,将“ service cron start && apachectl -DFOREGROUND”更改为“ rm -f /var/run/apache2/apache2.pid && service cron start && apachectl -DFOREGROUND”。这将确保您的容器将启动。为我工作!