0

I installed opencpu Docker image using

docker pull opencpu/ubuntu-16.04.

The very first time it starts sucessfully. But if I terminate the process and try to start it again using command

docker run -it imageID

It gets terminated each time. Need suggestion about how to start it successfully.

    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
Vivek
  • 1
  • 2

3 Answers3

0

Perhaps this can give you some hint... this is not exactly the solution but if gives you at a high level what could be the cause and lead to the solutioni.enter link description here

Soumen Mukherjee
  • 2,953
  • 3
  • 22
  • 34
0

This seems to be a problem with the rstudio-server package. I will add the workaround suggested above (server-app-armor-enabled=0) to the opencpu docker images.

Note that the opencpu/base image does install rstudio, so you may want to try this one.

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
0

What is the output of sudo docker logs <container-name> ? Most likely it would be something indicating the httpd pid exists. Which means you need to delete the apache2.pid in the container. But now since the container does not boot up a hack is to edit your container's config.v2.json file located in /var/lib/docker/containers/<container-long-id>/ In the CMD section, change "service cron start && apachectl -DFOREGROUND" to "rm -f /var/run/apache2/apache2.pid && service cron start && apachectl -DFOREGROUND". This will ensure your container will start. Worked for me!

AMN
  • 1
  • 1