In my vagrant based RStudio /Shiny installation, I have problem autostarting Shiny. Manual start (
sudo start shiny-server) works without problems, and RStudio server never has similar problems.
https://bitbucket.org/dmenne/rstudio-shiny-server-on-ubuntuNote: if you run this for the first time (
vagrant up), shiny server starts ok because it is started by provision. If you run again with
vagrant reload, it does not start. Works ok when you started with
vagrant provision or
vagrant reload --provision.
Here is the log:
2014-06-08 09:33:30.581] [INFO] shiny-server - Shiny Server v1.1.0.10000 (Node.js v0.10.21)
2014-06-08 09:33:30.582] [INFO] shiny-server - Using pidfile /var/run/shiny-server.pid
2014-06-08 09:33:30.583] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
2014-06-08 09:33:30.589] [ERROR] shiny-server -Error loading config: File "/etc/shiny-server/shiny-server.conf" does not exist
2014-06-08 09:33:30.589] [INFO] shiny-server - Shutting down worker processes
But shiny-server.conf exists and is totally open (probably not a recommended setting)
-rwxrwxrwx 1 vagrant vagrant 573 Jun 7 15:43 /etc/shiny-server/shiny-server.conf*
And this is how it look like and is used for manual start:
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}