Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shiny App not working on Shiny Server with no log file present

I have an application that works on a local R server (port 8787). When I move it to Shiny Server (port 3838), I receive the message

ERROR: An error has occurred. Check your logs or contact the app author for clarification.

And there is no log file present in /var/log/shiny-server.log

This is my configuration file:

# Instruct Shiny Server to run applications as local user
run_as : HOME_USER:;

# Define a server that listens on port 3838
server {
  listen 3838;

#preserve_logs true;
  # 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;
preserve_logs true;
# 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;
 }
} 

Could someone check my configuration file? Thank you

like image 755
A. Ganady Avatar asked Mar 14 '17 17:03

A. Ganady


People also ask

Why does my app work locally but not on my Shiny server?

Your application may be dependent on packages that are installed and loaded in your environment, but aren't installed for the correct user on the Shiny Server. Make sure that all necessary packages are installed for the same user set under run_as in your Shiny Server configuration file.

How do you publish a Shiny app on a Shiny server?

Publish your Shiny App to RStudio ConnectAt the top of the editor, click Publish. In the Publish to Server window, confirm that your account is shown in the Publish To Account section and click Publish.

Where is the Shiny server config file?

The server will load its configuration from a file stored at /etc/shiny-server/shiny-server.


2 Answers

Apparently sanitize error messages is true by default for my configuration. Add
options(shiny.sanitize.errors = FALSE) to your app.

In the configuration file, place

sanitize_errors false;
preserve_logs true;

within server to resolve permanently.

like image 84
A. Ganady Avatar answered Oct 06 '22 14:10

A. Ganady


Shiny also dumps errors and messages on the Console. You can access it by pressing Ctrl + Shift + J in your chrome or Opera browser.

enter image description here

like image 3
M.Qasim Avatar answered Oct 06 '22 12:10

M.Qasim