My computer lies to me :-(( "shiny-server.conf" does not exist

521 views
Skip to first unread message

Dieter Menne

unread,
Jun 8, 2014, 5:50:46 AM6/8/14
to shiny-...@googlegroups.com
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-ubuntu

Note: 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;
  }
}

Jeff Allen

unread,
Jun 9, 2014, 10:34:49 AM6/9/14
to shiny-...@googlegroups.com
Sorry you're having trouble. Thanks for sharing this script; I imagine it will be helpful to many.

I'm on my laptop right now which is unfortunately short on disk space for an extra VM, so I can't test out your VM right now, but I don't see any obvious problems with what you're doing, but I have not seen a bug like this before in Shiny Server, so I'm not sure what the issue is.

Do note that we have a few Vagrant images available in the repo, as well: https://github.com/rstudio/shiny-server/tree/master/vagrant, but nothing fancy that uses Puppet like yours.

I'll take your VM for a spin when I'm on another machine and see what I can figure out.

Jeff

Jeff Allen

unread,
Jun 9, 2014, 10:37:37 AM6/9/14
to shiny-...@googlegroups.com
Oh! It looks like you're using the unsupported version of Shiny Server from npm. 

Check out our recent shiny-server pages for the pre-baked installers that you can use which is much simpler than installing everything yourself: http://www.rstudio.com/products/shiny/shiny-server/

If you still have any issues on version 1.1, let me know and I'll take a look.

Jeff

On Sunday, June 8, 2014 4:50:46 AM UTC-5, Dieter Menne wrote:

Dieter Menne

unread,
Jun 9, 2014, 10:48:00 AM6/9/14
to shiny-...@googlegroups.com
Hi, Jeff,

brrrrrrrr... npm...  not in my dreams. See the top line in the puppet script which points to the real location. And to a slightly daring RStudio daily build, because I need one of you more recent buttons for knitr etc. But RStudio works anyway.

Since my app also use a few of the more recent markdown feature (those in the red-header docs), I also have to manually install the latest version of Haskell, Pandoc, because there is no current prebuild version available. Which by far needs the most time in the script.

In a similar case, I noted the message "file not found" also comes up when the file has Windows CR/LF format, but I crosschecked, and on the initial run we anyway have the virgin unix file (even if it is editable in etc/shiny-server from Windows).

Dieter

Dieter Menne

unread,
Jun 9, 2014, 10:51:54 AM6/9/14
to shiny-...@googlegroups.com
I did not bother posting the shiny server version I installed, because you can see it from the first line of the var-log in my original posting.

Yihui Xie

unread,
Jun 9, 2014, 12:22:18 PM6/9/14
to Dieter Menne, shiny-discuss
I'm not sure if you are aware of this (you can make symlinks from the
Pandoc executables shipped in RStudio):
https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md The version
of Pandoc in RStudio is currently not the absolutely latest one,
though.

Regards,
Yihui

Jeff Allen

unread,
Jun 9, 2014, 1:07:41 PM6/9/14
to shiny-...@googlegroups.com
Oh ok. I was looking at the GitHub repo you referenced as your inspiration and thought that was the code you were using.

In that case, I'm not sure. I have noticed that running a Vagrant Linux guest on a Windows machine can make the encodings really strange on any shared folders before in unpredictable ways. I'm not sure if that's your environment or not, but something to be aware of.

I'll try to take a look at your machine, but sadly may not have a chance to get to it today.

As Yihui suggested, using the Pandoc bundled into RStudio may save you a few headaches when provisioning.

Jeff

On Sunday, June 8, 2014 4:50:46 AM UTC-5, Dieter Menne wrote:

Dieter Menne

unread,
Jun 9, 2014, 1:21:44 PM6/9/14
to shiny-...@googlegroups.com, menne...@googlemail.com
<<symlinks from RSTudion Pandoc>>

Thanks, I will certainly do that, because this Haskell building process needs 2/3 of the installation time.

Dieter

Reply all
Reply to author
Forward
0 new messages