Accessing Error log in shiny-server deployed on AWS instance

谁说我不能喝 提交于 2019-11-30 14:51:07
Fabian Haribo

I found the solution. One hast to add sanitize_errors false; to the shiny-server.conf and then restart shiny-server. Then the error log is displayed in the browsers console.

To see logs:

Add the following line to your ui.R | server.R | app.R

options(shiny.sanitize.errors = FALSE)

Edit your shiny server .conf file:

sudo nano /etc/shiny-server/shiny-server.conf

add this line after "run_as" (don't forget ";" at the end)

preserve_logs true;

Note 1: You may need to add this preserve_log to force shiny server to save logs to files. (Remember to delete this setting after your debugging session. Shiny will start to create logs even for succesful app sessions and this can generate LOTS of log files)

Go to your log path:

$ cd /var/log/shiny-server/

Check the logs and see what's going on

$ nano appName-shinyuser-yyyymmdd-hhmmss-41509.log

In my case, the problem was just a missing package.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!