4

My operation system is ubuntu.

I run a shiny app successfully in rstudio.

I have copied all files in the shiny server file. But when I try to run the app from shiny server I see in browser this error:

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

However when I go to logs I can't find log for the specific app.

Is there any workaround for that kind of issues?

Niemik
  • 73
  • 8
  • maybe this could help: http://stackoverflow.com/questions/39377437/accessing-error-log-in-shiny-server-deployed-on-aws-instance – MLavoie Feb 15 '17 at 23:36
  • @MLavoie thanks for your answer. I found the same but I found the file shiny-server.conf in 3 different files. In which path should I replace this and also how can I restart shiny server (needs only a ubuntu system restart and it is ok?) – Niemik Feb 15 '17 at 23:53
  • you could use "sudo service shiny-server restart" to restart and if I remember correctly (well that is the one I changed) you set the one located in /etc/shiny-server/shiny-server.conf – MLavoie Feb 16 '17 at 00:47
  • Use absolute path while setting working directory. Also check your [user permissions](http://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/). – Karthik Arumugham Feb 16 '17 at 00:59

1 Answers1

1

I can't comment so I'm putting this as an answer. Are all of the packages your app needs installed on the server?

Logs are not stored if the R process end successfully, and if I remember right that includes when packages are not installed.

From the Shiny Server Configuration Guide

A log file will be created for each R process when it is started. However, if a process closes successfully, the error log associated with that process will be automatically deleted. The only error log files that will remain on disk are those associated with R processes that did not exit as expected.

You can override this behavior using the preserve_logs configuration option. If you set preserve_logs true; in your configuration file, Shiny Server will never delete the logs from your R processes, regardless of their exit code. Be aware that this will cause log files to accumulate very quickly on a busy server. This setting is only recommended for debugging purposes; if it were to be enabled on a production server, you would need to pay close attention to the rotation and archiving of logs to prevent your file system becoming overwhelmed with log files.

jpshanno
  • 261
  • 2
  • 7